taishi-i / nagisa

A Japanese tokenizer based on recurrent neural networks
https://huggingface.co/spaces/taishi-i/nagisa-demo
MIT License
379 stars 22 forks source link

install error on UBUNTU 18.04--python3.6 #20

Closed myrainbowandsky closed 4 years ago

myrainbowandsky commented 4 years ago

home/wentao/programming/weibospider/config/conf.py:12: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. cf = load(cont) [dynet] random seed: 1234 [dynet] allocating memory: 32MB [dynet] memory allocation done. Traceback (most recent call last): File "multi_token.py", line 12, in import nagisa File "/home/wentao/programming/tweet/py3_all/lib/python3.6/site-packages/nagisa/init.py", line 3, in from nagisa.train import fit File "/home/wentao/programming/tweet/py3_all/lib/python3.6/site-packages/nagisa/train.py", line 12, in import prepro File "/home/wentao/programming/tweet/py3_all/lib/python3.6/site-packages/nagisa/prepro.py", line 11, in OOV = utils.OOV AttributeError: module 'utils' has no attribute 'OOV'

my working dir has no utils.py

taishi-i commented 4 years ago

Hi, @myrainbowandsky Thank you for using nagisa.

Did you solve this issue? If you have any questions, don't hesitate to contact me.

Thank you

myrainbowandsky commented 4 years ago

@taishi-i Yes. I fixed that. I was using virtualenv, then I have ' AttributeError: module 'utils' has no attribute 'OOV'' problem. I resintall Nagisa in a terminal and then launch virtualenv. that woks.