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

Accent-stripping example? #84

Open
ccleve opened this issue Nov 3, 2021 · 0 comments
Open

Accent-stripping example? #84

ccleve opened this issue Nov 3, 2021 · 0 comments

Comments

@ccleve
Copy link

ccleve commented Nov 3, 2021

Would it be possible to add an example of stripping accents to the documentation? (This is commonly needed for search applications.)

As I understand it, the right way to do this is to determine if each character IS_LETTER and in one of these Unicode blocks: LATIN_1_SUPPLEMENT, LATIN_EXTENDED_ADDITIONAL, LATIN_EXTENDED_A, LATIN_EXTENDED_B. If it is, then decompose it, remove any NON_SPACING_MARKs, and recompose.

I haven't been able to figure out if a character is a non-spacing mark or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant