-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
On Chinese numerals #338
Comments
Since it's an interesting task parsing Chinese numerals, I wrote a simple one in PEG using LPeg.re. Link: chinese_number.lua |
Thanks for pointing out the issues! The Chinese numerals have always been the hard part.
Thank you! |
I would propose a new approach. How about we implemented a I am not very good at wenyan so please feel free to make suggestions to the wording. |
Surely it sounds more common, but it's in spoken language. Actually too spoken. |
我这有个算法不知道有没有漏洞: 从左往右读, 每一读一位乘十加上后一位, 但如果是倍数词那得乘上相应的倍数 然后读到 因为只有 这个算法好处是同时支持 一个 python 的示例实现如下: https://github.com/GalAster/WenyanLanguage/blob/master/packages/wenyan-parser-py/source/hanzi2num.py |
十二
which means 12, is ouput as一十二
, which is not the common form.一百一
should be parsed as 101 instead of 110. But wenyan-lang seems to do the latter.The text was updated successfully, but these errors were encountered: