Skip to content

Commit

Permalink
[Chinese text normalization] speed up graph building (#5128)
Browse files Browse the repository at this point in the history
Signed-off-by: 彭震东 <275331498@qq.com>

Signed-off-by: 彭震东 <275331498@qq.com>
  • Loading branch information
pengzhendong committed Oct 14, 2022
1 parent 4fc5385 commit a213f9e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def __init__(
)
token = pynutil.insert("tokens { ") + classify + pynutil.insert(" } ")

tagger = pynini.cdrewrite(token.optimize(), "", "", NEMO_SIGMA).optimize()
tagger = token.optimize().star

preprocessor = PreProcessor(remove_interjections=True, fullwidth_to_halfwidth=True,)
self.fst = preprocessor.fst @ tagger

0 comments on commit a213f9e

Please sign in to comment.