-
-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
First of all, thank you so much for making this work publicly available :)
Describe the bug
Not sure this is a bug. If it's not, take it as a clarification request.
The max_cost
argument is documented as being the "maximum edit distance" allowed between the query and the results. It's not totally clear what it's meant by that (I'd expect the used edit distance corresponds to thefuzz.partial_ratio). Nonetheless, setting max_cost
to zero, I still get matches that don't contain the query.
To Reproduce
from fast_autocomplete import AutoComplete
autocomplete = AutoComplete({
"spiaggia": {},
"spiaggia al tramonto": {},
"spiaggia all'alba": {},
})
print(autocomplete.search("spiagggg", max_cost=0))
Output:
[['spiaggia'], ["spiaggia all'alba"], ['spiaggia al tramonto']]
Expected behavior
I'd expect no results are returned.
OS, DeepDiff version and Python version (please complete the following information):
- OS: Windows 10
nathancday
Metadata
Metadata
Assignees
Labels
No labels