-
Notifications
You must be signed in to change notification settings - Fork 11
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
Feature request: Searching by name #1
Comments
Hello, What you request is a full text index on name data. Providing a full text search algorithm is well outside the scope of this library, but there are tools which can provide this feature, like sqlite. I may implement a few helper methods to help with scenarios like this one, allowing to enumerate things like valid code points or known names, but that would be it. |
Okay, fair enough. Probably not a good fit for this project. Thanks for the reply! |
Actually you'll be surprised how simple it is, even without a full text search engine. Here's the sample code that works for me:
|
The performance on my machine is about 70-80 ms per lookup, so of course having an in-memory trie or other index can significantly speed it up, however if you're OK with these numbers then it works great and is super simple. |
Nice solution with so little code. 👍 I did write some code that you can use to create an index of Unicode characters, but it's not production ready. You can try it and/or benchmark it if you want: |
BTW I'm using my naive lookup algorithm here: You can try searching for various emoji names, paste emoji to view their info, etc. |
FYI I've now implemented fast indexed lookup of unicode characters here: It requires creating an index like this: The helper code is here: Hope this helps! |
I really just want and easy |
I want to make an app that searches unicode characters by name. It looks like the UnicodeInfo class only lets me search by character. Ex: If I want to find a Unicode music note, I want to call something like:
The text was updated successfully, but these errors were encountered: