diff --git a/jarvis/skills/entertainement/decide/__init__.py b/jarvis/skills/entertainement/decide/__init__.py index c40b1e3..43324e7 100644 --- a/jarvis/skills/entertainement/decide/__init__.py +++ b/jarvis/skills/entertainement/decide/__init__.py @@ -1,22 +1,17 @@ import random -from adapt.intent import IntentBuilder - from jarvis.skills import Skill, SkillRegistering -from jarvis.skills.decorators import intent_handler +from jarvis.skills.decorators import intent_file_handler class DecideSkill(Skill, metaclass=SkillRegistering): def __init__(self, data=dict): super().__init__("DecideSkill", data) - @intent_handler(IntentBuilder("DecideIntent").require("choice1").require("choice2").optionally("OrKeyword")) - # @intent_file_handler("decide.intent", "DecideIntent") - def handle_decide(self, data): + @intent_file_handler("decide.intent", "DecideIntent") + def handle_decide_intent(self, data): print("decide") - print(data) - if 'choice1' in data and 'choice2' in data: choice = bool(random.getrandbits(1)) diff --git a/jarvis/skills/entertainement/decide/regex/en-us/Choice1.rx b/jarvis/skills/entertainement/decide/regex/en-us/Choice1.rx deleted file mode 100755 index 6e7c449..0000000 --- a/jarvis/skills/entertainement/decide/regex/en-us/Choice1.rx +++ /dev/null @@ -1,2 +0,0 @@ -(.* (?P.*) or (?P.*)) -between ((?P.*) and (?P.*)) \ No newline at end of file diff --git a/jarvis/skills/entertainement/decide/regex/en-us/Choice2.rx b/jarvis/skills/entertainement/decide/regex/en-us/Choice2.rx deleted file mode 100755 index 579b5ec..0000000 --- a/jarvis/skills/entertainement/decide/regex/en-us/Choice2.rx +++ /dev/null @@ -1,2 +0,0 @@ -(.* (?P.*) or (?P.*)) -between ((?P.*) and (?P.*)) diff --git a/jarvis/skills/entertainement/decide/regex/fr-fr/choice1.rx b/jarvis/skills/entertainement/decide/regex/fr-fr/choice1.rx deleted file mode 100644 index be22006..0000000 --- a/jarvis/skills/entertainement/decide/regex/fr-fr/choice1.rx +++ /dev/null @@ -1 +0,0 @@ -(?P\w+|(\w+ au \w+)) (?:ou|et) (?P\w+|(\w+ au \w+)) \ No newline at end of file diff --git a/jarvis/skills/entertainement/decide/regex/fr-fr/choice2.rx b/jarvis/skills/entertainement/decide/regex/fr-fr/choice2.rx deleted file mode 100644 index 22c7a24..0000000 --- a/jarvis/skills/entertainement/decide/regex/fr-fr/choice2.rx +++ /dev/null @@ -1 +0,0 @@ -(?P\w+|(\w+ au \w+)) (?:ou|et) (?P\w+|(\w+ au \w+)) \ No newline at end of file diff --git a/jarvis/skills/entertainement/decide/vocab/en-us/DecideKeyword.voc b/jarvis/skills/entertainement/decide/vocab/en-us/DecideKeyword.voc deleted file mode 100755 index 27c27d2..0000000 --- a/jarvis/skills/entertainement/decide/vocab/en-us/DecideKeyword.voc +++ /dev/null @@ -1,4 +0,0 @@ -Decide -What should I wear -What should I eat -game \ No newline at end of file diff --git a/jarvis/skills/entertainement/decide/vocab/fr-fr/OrKeyword.voc b/jarvis/skills/entertainement/decide/vocab/fr-fr/OrKeyword.voc deleted file mode 100644 index bcfc20a..0000000 --- a/jarvis/skills/entertainement/decide/vocab/fr-fr/OrKeyword.voc +++ /dev/null @@ -1,3 +0,0 @@ -ou -et -entre \ No newline at end of file diff --git a/jarvis/skills/entertainement/decide/vocab/fr-fr/decide.intent b/jarvis/skills/entertainement/decide/vocab/fr-fr/decide.intent index f98a9ba..bd3bcd8 100644 --- a/jarvis/skills/entertainement/decide/vocab/fr-fr/decide.intent +++ b/jarvis/skills/entertainement/decide/vocab/fr-fr/decide.intent @@ -4,4 +4,4 @@ tu pense (que|) c'est {choice1} ou {choice2} qui gagne entre {choice1} et {choice2} {choice1} ou {choice2} tu prefère (le|les|la) {choice1} (ou|ou bien) (le|les|la) {choice2} -choisi entre {choice1} et {choice2} +(choisi|choisis) entre {choice1} et {choice2}