Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用报错 #129

Closed
HankLiu10 opened this issue Oct 30, 2023 · 5 comments · Fixed by #131
Closed

使用报错 #129

HankLiu10 opened this issue Oct 30, 2023 · 5 comments · Fixed by #131
Assignees
Labels
bug Something isn't working

Comments

@HankLiu10
Copy link

您好,上周解决后,这周再次出现相同报错,已安装wetextprocessing包:
(wenetITN) liuhangchen@G08:~/WeNetITN$ weitn --text "二点五平方电线"
Traceback (most recent call last):
File "/storage1/liuhangchen/anaconda3/envs/wenetITN/bin/weitn", line 8, in
sys.exit(main())
File "/storage1/liuhangchen/anaconda3/envs/wenetITN/lib/python3.8/site-packages/itn/main.py", line 43, in main
normalizer = InverseNormalizer(
File "/storage1/liuhangchen/anaconda3/envs/wenetITN/lib/python3.8/site-packages/itn/chinese/inverse_normalizer.py", line 42, in init
self.build_fst('zh_itn', cache_dir, overwrite_cache)
File "/storage1/liuhangchen/anaconda3/envs/wenetITN/lib/python3.8/site-packages/tn/processor.py", line 74, in build_fst
self.build_tagger()
File "/storage1/liuhangchen/anaconda3/envs/wenetITN/lib/python3.8/site-packages/itn/chinese/inverse_normalizer.py", line 45, in build_tagger
tagger = (add_weight(Date().tagger, 1.02)
File "/storage1/liuhangchen/anaconda3/envs/wenetITN/lib/python3.8/site-packages/itn/chinese/rules/date.py", line 25, in init
self.build_tagger()
File "/storage1/liuhangchen/anaconda3/envs/wenetITN/lib/python3.8/site-packages/itn/chinese/rules/date.py", line 29, in build_tagger
digit = string_file('itn/chinese/data/number/digit.tsv') # 1 ~ 9
File "extensions/_pynini.pyx", line 1033, in _pynini.string_file
File "extensions/_pynini.pyx", line 1109, in _pynini.string_file
_pywrapfst.FstIOError: Read failed

@HankLiu10
Copy link
Author

您好,上周解决后,这周再次出现相同报错,已安装wetextprocessing包: (wenetITN) liuhangchen@G08:~/WeNetITN$ weitn --text "二点五平方电线" Traceback (most recent call last): File "/storage1/liuhangchen/anaconda3/envs/wenetITN/bin/weitn", line 8, in sys.exit(main()) File "/storage1/liuhangchen/anaconda3/envs/wenetITN/lib/python3.8/site-packages/itn/main.py", line 43, in main normalizer = InverseNormalizer( File "/storage1/liuhangchen/anaconda3/envs/wenetITN/lib/python3.8/site-packages/itn/chinese/inverse_normalizer.py", line 42, in init self.build_fst('zh_itn', cache_dir, overwrite_cache) File "/storage1/liuhangchen/anaconda3/envs/wenetITN/lib/python3.8/site-packages/tn/processor.py", line 74, in build_fst self.build_tagger() File "/storage1/liuhangchen/anaconda3/envs/wenetITN/lib/python3.8/site-packages/itn/chinese/inverse_normalizer.py", line 45, in build_tagger tagger = (add_weight(Date().tagger, 1.02) File "/storage1/liuhangchen/anaconda3/envs/wenetITN/lib/python3.8/site-packages/itn/chinese/rules/date.py", line 25, in init self.build_tagger() File "/storage1/liuhangchen/anaconda3/envs/wenetITN/lib/python3.8/site-packages/itn/chinese/rules/date.py", line 29, in build_tagger digit = string_file('itn/chinese/data/number/digit.tsv') # 1 ~ 9 File "extensions/_pynini.pyx", line 1033, in _pynini.string_file File "extensions/_pynini.pyx", line 1109, in _pynini.string_file _pywrapfst.FstIOError: Read failed

补充一下,pynini版本为2.1.5

@xingchensong
Copy link
Member

需要在git clone的目录下运行weitn

@xingchensong
Copy link
Member

找到问题了等会改一下

@xingchensong
Copy link
Member

fixed

#131

@xingchensong xingchensong self-assigned this Oct 30, 2023
@xingchensong xingchensong added the bug Something isn't working label Oct 30, 2023
@HankLiu10
Copy link
Author

谢谢,完美解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants