trankit
trankit copied to clipboard
Can't load customized pipeline
Hi! I trained a customized pipeline for customized-mwt using my data, and I get this message during verifying it:
Training done
Customized pipeline is ready to use!
It can be initialized as follows:
-----------------------------------
from trankit import Pipeline
p = Pipeline(lang='customized-mwt', cache_dir='./save_dir')
However, when I try to use it, I receive next error:
File "aug_trankit.py", line 70, in <module>
p = Pipeline(lang='customized-mwt', cache_dir='./save_dir')
File "/home/uaparsers/trankit/trankit/pipeline.py", line 78, in __init__
self._load_vocabs()
File "/home/uaparsers/trankit/trankit/pipeline.py", line 276, in _load_vocabs
'{}/{}.vocabs.json'.format(lang, lang))) as f:
FileNotFoundError: [Errno 2] No such file or directory: './save_dir/xlm-roberta-base/customized-mwt/customized-mwt.vocabs.json'
Why do I get this error if pipeline is verified? this is my code:https://pastebin.com/2BRmrHYL
Hi @olexandryermilov, Thanks for reporting the error. We have fixed this in the new version v1.1.0 of trankit. The new version can be installed via pip with the command:
pip install trankit==1.1.0
Please try it and let us know. Thanks.