Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update_opm #3

Merged
merged 2 commits into from
Aug 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def handle_search(self, message):
@intent_handler("definition.intent")
def handle_definition(self, message):
query = message.data["query"]
res = self.wordnet.search(query, context={"lang": self.lang}).get("definition")
res = self.wordnet.search(query, lang=self.lang).get("definition")
if res:
self.speak(res)
else:
Expand All @@ -45,7 +45,7 @@ def handle_definition(self, message):
@intent_handler("lemma.intent")
def handle_lemma(self, message):
query = message.data["query"]
res = self.wordnet.search(query, context={"lang": self.lang}).get("lemmas")
res = self.wordnet.search(query, lang=self.lang).get("lemmas")
if res:
self.speak(random.choice(res))
else:
Expand All @@ -54,7 +54,7 @@ def handle_lemma(self, message):
@intent_handler("antonym.intent")
def handle_antonym(self, message):
query = message.data["query"]
res = self.wordnet.search(query, context={"lang": self.lang}).get("antonyms")
res = self.wordnet.search(query, lang=self.lang).get("antonyms")
if res:
self.speak(random.choice(res))
else:
Expand All @@ -63,7 +63,7 @@ def handle_antonym(self, message):
@intent_handler("holonym.intent")
def handle_holonym(self, message):
query = message.data["query"]
res = self.wordnet.search(query, context={"lang": self.lang}).get("holonyms")
res = self.wordnet.search(query, lang=self.lang).get("holonyms")
if res:
self.speak(random.choice(res))
else:
Expand All @@ -72,7 +72,7 @@ def handle_holonym(self, message):
@intent_handler("hyponym.intent")
def handle_hyponym(self, message):
query = message.data["query"]
res = self.wordnet.search(query, context={"lang": self.lang}).get("hyponyms")
res = self.wordnet.search(query, lang=self.lang).get("hyponyms")
if res:
self.speak(random.choice(res))
else:
Expand All @@ -81,7 +81,7 @@ def handle_hyponym(self, message):
@intent_handler("hypernym.intent")
def handle_hypernym(self, message):
query = message.data["query"]
res = self.wordnet.search(query, context={"lang": self.lang}).get("hypernyms")
res = self.wordnet.search(query, lang=self.lang).get("hypernyms")
if res:
self.speak(random.choice(res))
else:
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ ovos_workshop~=0.0, >=0.0.11
ovos-classifiers
ovos-translate-server-plugin
ovos-config~=0.0, >=0.0.11
ovos-plugin-manager>=0.0.26a38
Loading