diff --git a/__init__.py b/__init__.py index 6981895..25a3fe4 100644 --- a/__init__.py +++ b/__init__.py @@ -18,7 +18,7 @@ from adapt.intent import IntentBuilder from mycroft.skills.core import MycroftSkill, intent_handler from mycroft.util.log import getLogger -from fuzzywuzzy import fuzz +from rapidfuzz import fuzz import requests import json @@ -167,7 +167,7 @@ def findItemName(self, itemDictionary, messageItem): try: for itemName, itemLabel in list(itemDictionary.items()): - score = fuzz.ratio(messageItem, itemLabel) + score = fuzz.ratio(messageItem, itemLabel, score_cutoff=bestScore) if score > bestScore: bestScore = score bestItem = itemName diff --git a/requirements.txt b/requirements.txt index 2485ffc..310a13c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,2 @@ requests>=2.10.0 -fuzzywuzzy==0.14.0 -python-Levenshtein==0.12.0 \ No newline at end of file +rapidfuzz==0.7.6 \ No newline at end of file