mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
Update money.py (#971)
Maybe it would be better surrport "thiry one cent" -> "$0.31" conversion. Some people say this way, and sometimes ASR make mistakes.
This commit is contained in:
parent
bf4b3ef9cb
commit
c1d01605bf
@ -53,7 +53,7 @@ class MoneyFst(GraphFst):
|
|||||||
+ pynini.union(
|
+ pynini.union(
|
||||||
pynutil.add_weight(((DAMO_SIGMA - "one") @ cardinal_graph), -0.7) @ add_leading_zero_to_double_digit
|
pynutil.add_weight(((DAMO_SIGMA - "one") @ cardinal_graph), -0.7) @ add_leading_zero_to_double_digit
|
||||||
+ delete_space
|
+ delete_space
|
||||||
+ pynutil.delete("cents"),
|
+ (pynutil.delete("cents") | pynutil.delete("cent")),
|
||||||
pynini.cross("one", "01") + delete_space + pynutil.delete("cent"),
|
pynini.cross("one", "01") + delete_space + pynutil.delete("cent"),
|
||||||
)
|
)
|
||||||
+ pynutil.insert("\"")
|
+ pynutil.insert("\"")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user