-
Notifications
You must be signed in to change notification settings - Fork 108
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
Kyujitai / Shinjitai Text preprocessors #1357
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mentioned in discord that this probably shouldnt use regex but after testing it looks like this is the right way to go. Any other way I could think of handling this benchmarked much slower. Probably hitting a sweet spot in browser optimization there for the number of possible replaces that are required here.
Co-authored-by: Kuuuube <[email protected]> Signed-off-by: Cashew <[email protected]>
In the case there is a direct match on the kyuujitai prior to conversion, it shows that first, right? |
Yes, thats right. That is true for preprocessors in general. |
CodSpeed Performance ReportMerging #1357 will not alter performanceComparing Summary
|
related: #620, #1356
This PR adds a Kyujitai (旧字体) to Shinjitai (新字体) text preprocessor, which is useful when reading older texts.
Based on https://github.com/DrTurnon/kyujipy/blob/master/kyujipy/basic_converter.py
This PR does not include transformations caused by the 同音による書き換え reform
it does not include 俗字, 別体, 誤字 or other uncommon forms/variants.