diff --git a/src/utils/utils.py b/src/utils/utils.py index 5364a98a7a..52c123ea0d 100644 --- a/src/utils/utils.py +++ b/src/utils/utils.py @@ -713,8 +713,7 @@ def string_suggestions(string, vocabulary, cutoff=0.6, maxnum=3): Returns: list of suggestions from vocabulary (could be empty if there are no matches) """ - if string in vocabulary: - return [string] - # no exact match. Determine suggestions and return sorted with highest match first. + #if string in vocabulary: + # return [string] return [tup[1] for tup in sorted([(string_similarity(string, sugg), sugg) for sugg in vocabulary], key=lambda tup: tup[0], reverse=True) if tup[0] >= cutoff][:maxnum]