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

Add a more advanced normalize function #374

Closed
bact opened this issue Mar 31, 2020 · 2 comments · Fixed by #389
Closed

Add a more advanced normalize function #374

bact opened this issue Mar 31, 2020 · 2 comments · Fixed by #389
Labels
enhancement enhance functionalities

Comments

@bact
Copy link
Member

bact commented Mar 31, 2020

Common normalize function that do more than reordering of Thai characters. Something that can be used quickly for matching, searching, sorting, and preparing data for classification tasks.

Some ideas;

  • Remove non-visible characters, like zero-width chars Add a function to remove zero-width characters #373
  • Remove unnecessary spaces
  • Normalize repetitions
  • Normalize "obvious" mistakes like
    • consonant + tonemark A + tonemark B <--- may be we can remove tonemark A

Note that for Unicode normalization, Python does already have unicodedata.normalize().

@bact bact added the enhancement enhance functionalities label Mar 31, 2020
@p16i
Copy link
Contributor

p16i commented Apr 1, 2020

How about the case of ? I sometimes see PDF parsers return it as ◌̊ and .

@bact
Copy link
Member Author

bact commented Apr 2, 2020

Current normalize() will group Nikhahit and Sara Aa together and emit Sara Am

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

Successfully merging a pull request may close this issue.

2 participants