-
Notifications
You must be signed in to change notification settings - Fork 248
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
Fuzzy header search #380
base: main
Are you sure you want to change the base?
Fuzzy header search #380
Conversation
It should show recommendation if there is a typo but if an exact substring match exists, it should show only them. |
@animator I have a suggestion to implement this. in
when we obtain Example: every suggestion that exactly Let me know if this is desirable. |
Doing this also passes the one test case I had to edit. This should do better than the previous approach. |
Passes all test cases and does not show approximate suggestions if no typo exists. If typo exists then it shows fuzzy suggestions. |
@PratyushChauhan For the case, when the user just types |
@ashitaprasad worked on your suggestion, now the first character match is given preference in predictions. |
@PratyushChauhan Why is |
@animator this most likely happens when we re-order the predictions {in case of typo} to include first character matching strings near the top.
In case of a typo each string that has a matching first character is pushed to position 0. Hence the order given by the fuzzy finder is reversed which makes A way to fix this would be to introduce a Fix:
|
@animator @ashitaprasad is this implementation fine? |
PR Description
Previously we were only checking if a pattern is present in a header string. As a result you would not get suggestions if you made a typo.
BEFORE:
This PR attempts to fix this issue using Fuzzy package.
AFTER:
Related Issues
Checklist
main
branch before making this PRflutter test
) and all tests are passingAdded/updated tests?
All previous tests except one have been added for the new function.