RRisto / seq2seq

upgrade on pytorch seq2seq tutorial
10 stars 5 forks source link

self.lang='en' #4

Open ChristopherLu opened 5 years ago

ChristopherLu commented 5 years ago

Due to the update in spacy, you need to change self.lang = 'en' to self.lang = 'en_core_web_sm' in several places to run seq2seq.data.data_manager import Seq2SeqDataManager in the example jupyter code.

RRisto commented 5 years ago

Have yout tried self.lang = 'en' ? Spacy documentation shows that shortcut 'en' should also work:

To load a model, use spacy.load with the model’s shortcut link, package name or a path to the data directory

ChristopherLu commented 5 years ago

Yes, I tried and it gave me the following error:

OSError: [E050] Can't find model 'en'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.

RRisto commented 5 years ago

it worked for me. Probably because I downloaded spacy model with the following command: python -m spacy download en.