Skip to content

Commit

Permalink
[tn] english, support money
Browse files Browse the repository at this point in the history
  • Loading branch information
xingchensong committed Jun 2, 2024
1 parent 596c8e3 commit 447e241
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tn/english/rules/money.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ def build_tagger(self):
final_graph |= pynutil.add_weight(decimal_graph_with_minor, -0.0001)

if not self.deterministic:
final_graph |= integer_graph_reordered | decimal_default_reordered
final_graph |= pynutil.add_weight(
integer_graph_reordered | decimal_default_reordered, -0.1)
# to handle "$2.00" cases
final_graph |= pynini.compose(
pynini.closure(self.VCHAR) + pynutil.delete(".") +
Expand Down

0 comments on commit 447e241

Please sign in to comment.