rsennrich / subword-nmt

Unsupervised Word Segmentation for Neural Machine Translation and Text Generation
MIT License
2.18k stars 464 forks source link

subword-nmt #101

Closed jh072535 closed 2 years ago

jh072535 commented 3 years ago

Traceback (most recent call last): File "subword-nmt/apply_bpe.py", line 1, in subword_nmt/apply_bpe.py NameError: name 'subword_nmt' is not defined

rsennrich commented 3 years ago

thanks for your bug report. What command did you try to execute, and how did you install subword-nmt?

jhkd-kevin commented 3 years ago

I clone the code "PyTorch /fairseq "from Github. And I use the command "pip install subword-Nmt" to install the package. However, as I run the data processing the NameError occurred.

rsennrich commented 3 years ago

Fairseq uses Python3; depending on your OS setup, it's possible that you installed subword-nmt in your Python2 environment. Try running "pip3 subword-nmt" instead.