-
Notifications
You must be signed in to change notification settings - Fork 48
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
maybe detect acronyms? #47
Comments
the main problem here is knowing if you have an acronym or not. once we know that, we can easily set the correct options: https://leeoniya.github.io/uFuzzy/demos/compare.html?libs=uFuzzy&search=t%20m%20n%20t&interLft=2 how do we know that lowercase |
I see. I think it probably goes more into search relevance than fuzzy search can handle. But I believe there are some rules we can use to get close to good results. Exact full term matches:
Exact acronym matches:
Partial acronym matches:
|
im not sure this belongs in the core, honestly. you can simply pre-process the needle and create a few different needles + ufuzzy options, and just do a several independent searches, then combine and sort the results as you see fit. it will be slightly slower but that's an okay trade-off to keeping the internals relatively unopinionated and straightforward.
that's just your preference. many others (myself included) would expect the prefix match first. it's not black and white, unfort. |
an option to detect acronyms in the needle might be interesting, but also tricky
searching for
TMNT
would modify the term tot m n t
and maybeinterLft: 2
. not sure this can actually work. e.g. NASA and NBA is never actually spelled out. plusinterLft: 2
affects the whole needle, so would have unwanted side-effects. always possible to do better discarding for acronyms after initial filter, or maybe not...The text was updated successfully, but these errors were encountered: