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

纯数有问题 #1

Open
Darius-H opened this issue Feb 26, 2024 · 1 comment
Open

纯数有问题 #1

Darius-H opened this issue Feb 26, 2024 · 1 comment

Comments

@Darius-H
Copy link

Darius-H commented Feb 26, 2024

print(Text(raw_text='纯数:2983.07克或12345.60米。').normalize())
结果是 纯数:二九八三.零七克或一二三四五.六十米。
点没有正确识别

需要把

chn_text_norm/text.py

Lines 114 to 120 in 8210575

# 规范化数字编号
pattern = re.compile(r"(\d{4,32})")
matchers = pattern.findall(text)
if matchers:
# print('digit')
for matcher in matchers:
text = text.replace(matcher, Digit(digit=matcher).digit2chntext(), 1)
规范化数字编号挪到规范化纯数后面

@657374201
Copy link

657374201 commented Feb 26, 2024 via email

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