-
-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tolerance #11
Tolerance #11
Conversation
Thank you @mateonunez, this is gold. I'll review the code tomorrow morning and let you know how we want to proceed. I actually planned to introduce a |
Sounds great @micheleriva! Can't wait for the new release and the new features. 👌 |
@mateonunez this PR looks really good! I just left a few minor comments, it would be awesome if you could address them. In a future release, as an improvement, we should aim at running the Levenshtein algorithm against the tree instead of words. Let me give you an example:
This is something to consider for future releases, as for now, I am happy with the current PR |
I got the point about the next Levenshtein algorithm implementation @micheleriva. It might be fun to work on it. |
LGTM |
This PR is a proposal to resolve the problem of #2.
The changes don't implement a
boolean
to manage the typo errors. Instead of that, a new parameter has been added to thesearch
method.As the documentation shows: tolerance is the maximum distance between the searched term and a word inside a document.
I've added a few tests for this implementation.
Coverage
Without Tolerance implementation:
With Tolerance implementation:
Time elapsed
Without Tolerance implementation:
With Tolerance implementation: