Skip to content

Commit

Permalink
fix(tn): 人均200 (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
xingchensong authored Nov 13, 2023
1 parent ed61bf9 commit 52f2504
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tn/chinese/rules/cardinal.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def build_tagger(self):
cross('二百', '两百')
| cross('二千', '两千')
| cross('二万', '两万'))
self.number = accep('约').ques + number.optimize()
self.number = accep('约').ques + accep('人均').ques + number.optimize()

# cardinal string like 127.0.0.1, used in ID, IP, etc.
cardinal = digits.plus + (dot + digits.plus)**3
Expand Down
1 change: 1 addition & 0 deletions tn/chinese/test/data/normalizer.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ B2B => B to B
我们안녕 => 我们<oov>안</oov><oov>녕</oov>
雪の花 => 雪<oov>の</oov>花
给12315打个电话 => 给幺二三幺五打个电话
人均200以内 => 人均两百以内

0 comments on commit 52f2504

Please sign in to comment.