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

金额读成数字问题 #283

Open
dawenxi-only opened this issue Dec 31, 2024 · 1 comment
Open

金额读成数字问题 #283

dawenxi-only opened this issue Dec 31, 2024 · 1 comment

Comments

@dawenxi-only
Copy link

在执行以下代码:
from tn.chinese.normalizer import Normalizer
normalizer = Nrmalizer()
text = '起始金额一共有500、1000两个金额档'
text_norm = normalizer.normalize(text)

输出text_norm为:起始金额一共有五零零、一千两个金额档。
将500读成了五零零,希望读成五百。

请问怎么正确的将500读成五百

@FlynnFlag
Copy link

应该是tn/chinese/rules/cardinal.py里

phone = phone_digits**3 | phone_digits**5 | phone_digits**11

这一行的问题,迫使3位和5位数字都这么念了。我是注释掉了,重写了一个只对11位电话号码有效的处理

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

2 participants