use rapidfuzz instead of fuzzywuzzy (#92)

Signed-off-by: maxbachmann <ssh@maxbachmann.de>
pull/102/head
Max Bachmann 2020-07-13 12:03:59 +02:00 committed by GitHub
parent 155def8db8
commit 4508d0bced
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -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

View File

@ -1,3 +1,2 @@
requests>=2.10.0
fuzzywuzzy==0.14.0
python-Levenshtein==0.12.0
rapidfuzz==0.7.6