zh_itn_text = "你好 WeTextProcessing 一点零,船新版本儿,船新体验儿,简直六六六,九和六"
en_tn_text = "Hello WeTextProcessing 1.0, life is short, just use wetext, 666, 9 and 10"
zh_tn_model = ZhNormalizer(remove_erhua=True, overwrite_cache=True)
zh_itn_model = InverseNormalizer(enable_0_to_9=False, overwrite_cache=True)
en_tn_model = EnNormalizer(overwrite_cache=True)
print("中文 TN (去除儿化音,重新在线构图):\n\t{} => {}".format(zh_tn_text, zh_tn_model.normalize(zh_tn_text)))
print("中文ITN (小于10的单独数字不转换,重新在线构图):\n\t{} => {}".format(zh_itn_text, zh_itn_model.normalize(zh_itn_text)))
print("英文 TN (暂时还没有可控的选项,后面会加...):\n\t{} => {}\n".format(en_tn_text, en_tn_model.normalize(en_tn_text)))
zh_tn_model = ZhNormalizer(overwrite_cache=False)
zh_itn_model = InverseNormalizer(overwrite_cache=False)
en_tn_model = EnNormalizer(overwrite_cache=False)
print("中文 TN (复用之前编译好的图):\n\t{} => {}".format(zh_tn_text, zh_tn_model.normalize(zh_tn_text)))
print("中文ITN (复用之前编译好的图):\n\t{} => {}".format(zh_itn_text, zh_itn_model.normalize(zh_itn_text)))
print("英文 TN (复用之前编译好的图):\n\t{} => {}\n".format(en_tn_text, en_tn_model.normalize(en_tn_text)))
zh_tn_model = ZhNormalizer(remove_erhua=False, overwrite_cache=True)
zh_itn_model = InverseNormalizer(enable_0_to_9=True, overwrite_cache=True)
print("中文 TN (不去除儿化音,重新在线构图):\n\t{} => {}".format(zh_tn_text, zh_tn_model.normalize(zh_tn_text)))
print("中文ITN (小于10的单独数字也进行转换,重新在线构图):\n\t{} => {}\n".format(zh_itn_text, zh_itn_model.normalize(zh_itn_text)))
![image](https://github.com/wenet-e2e/WeTextProcessing/assets/13466943/3ff49959-5fbe-4ff7-b0d5-a1d0298f9a9a)
Minor changes
* [refactor] support building fst online by xingchensong in https://github.com/wenet-e2e/WeTextProcessing/pull/230
* [fix] remove redundant mapping in whitelist by xingchensong in https://github.com/wenet-e2e/WeTextProcessing/pull/231
* [tn] english tn, support range by xingchensong in https://github.com/wenet-e2e/WeTextProcessing/pull/233
* [fix] fix itn 三四十万 一万六七 by xingchensong in https://github.com/wenet-e2e/WeTextProcessing/pull/234
* [fix] fix itn 洞>0,拐>7 by xingchensong in https://github.com/wenet-e2e/WeTextProcessing/pull/235
* [fix] fix tn, remove useless mapping in english tn by xingchensong in https://github.com/wenet-e2e/WeTextProcessing/pull/236
**Full Changelog**: https://github.com/wenet-e2e/WeTextProcessing/compare/0.2.1...1.0.0