use rapidfuzz instead of fuzzywuzzy (#92)
Signed-off-by: maxbachmann <ssh@maxbachmann.de>pull/102/head
parent
155def8db8
commit
4508d0bced
|
@ -18,7 +18,7 @@ from os.path import dirname
|
|||
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 @@ class openHABSkill(MycroftSkill):
|
|||
|
||||
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
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
requests>=2.10.0
|
||||
fuzzywuzzy==0.14.0
|
||||
python-Levenshtein==0.12.0
|
||||
rapidfuzz==0.7.6
|
Reference in New Issue