You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was using sacremoses truecase and encountered following error:
File "/home/kiyono/.pyenv/versions/miniconda-3.9.1/envs/chainer4/bin/sacremoses", line 11, in <module>
sys.exit(cli())
File "/home/kiyono/.pyenv/versions/miniconda-3.9.1/envs/chainer4/lib/python3.6/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/kiyono/.pyenv/versions/miniconda-3.9.1/envs/chainer4/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/kiyono/.pyenv/versions/miniconda-3.9.1/envs/chainer4/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/kiyono/.pyenv/versions/miniconda-3.9.1/envs/chainer4/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/kiyono/.pyenv/versions/miniconda-3.9.1/envs/chainer4/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/kiyono/.pyenv/versions/miniconda-3.9.1/envs/chainer4/lib/python3.6/site-packages/sacremoses/cli.py", line 195, in truecase_file
print(moses.truecase(line, return_str=True), end="\n", file=fout)
File "/home/kiyono/.pyenv/versions/miniconda-3.9.1/envs/chainer4/lib/python3.6/site-packages/sacremoses/truecase.py", line 265, in truecase
tokens = self.split_xml(text)
File "/home/kiyono/.pyenv/versions/miniconda-3.9.1/envs/chainer4/lib/python3.6/site-packages/sacremoses/truecase.py", line 349, in split_xml
and len(words) > 0
NameError: name 'words' is not defined
I have not looked into the details of the code, but it seems that the variable words is indeed not defined in the method.
Maybe it should be tokens instead?
The text was updated successfully, but these errors were encountered:
I also ran into this issue and attempted to fix it. It seems to work for me but the pull request with my changes has not been approved. You could try pulling from my fork to fix the issue or just do the changes yourself.
Hi, thank you for your great work.
I was using
sacremoses truecase
and encountered following error:I have not looked into the details of the code, but it seems that the variable
words
is indeed not defined in the method.Maybe it should be
tokens
instead?The text was updated successfully, but these errors were encountered: