Skip to content

Commit

Permalink
fix(tn): add >= <= (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
xingchensong authored Nov 15, 2023
1 parent 14286c4 commit e91e6f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions tn/chinese/rules/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ def build_tagger(self):
number = Cardinal().number
tagger = (number + ((delete(' ').ques + operator + delete(' ').ques +
number).plus).ques)
tagger |= operator
tagger = insert('value: "') + tagger + insert('"')
self.tagger = self.add_tokens(tagger)
1 change: 1 addition & 0 deletions tn/chinese/test/data/normalizer.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ B2B => B to B
雪の花 => 雪<oov>の</oov>花
给12315打个电话 => 给幺二三幺五打个电话
人均200以内 => 人均两百以内
当场票数≥100万 => 当场票数大于等于一百万

0 comments on commit e91e6f8

Please sign in to comment.