Skip to content
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

Migrate to leven to find the closest match for an unknown command #428

Closed
jamesgeorge007 opened this issue Mar 8, 2020 · 2 comments · Fixed by #436
Closed

Migrate to leven to find the closest match for an unknown command #428

jamesgeorge007 opened this issue Mar 8, 2020 · 2 comments · Fixed by #436
Assignees
Labels
help wanted Issues identified as good community contribution opportunities

Comments

@jamesgeorge007
Copy link
Contributor

As of now didyoumean.js matching engine is used to suggest matching commands if the user mistypes. But it is not longer actively maintained. Instead I would suggest switching over to leven which is the fastest JS implementation of the Levenshtein distance algorithm.

leven returns the distance between 2 strings which can be made use of to find the exact match.

@jamesgeorge007
Copy link
Contributor Author

@joaomoreno I can work on a PR 👍

@joaomoreno
Copy link
Member

Sure!

@joaomoreno joaomoreno added the help wanted Issues identified as good community contribution opportunities label Mar 31, 2020
@joaomoreno joaomoreno self-assigned this Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants