Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Error #21

Open
shibin2018 opened this issue Jun 23, 2020 · 4 comments
Open

Error #21

shibin2018 opened this issue Jun 23, 2020 · 4 comments

Comments

@shibin2018
Copy link

F:\Anaconda\envs\Transformer-master\python.exe E:/Transformer-master/train.py -src_data english.txt -trg_data french.txt -src_lang en -trg_lang fr -epochs 10
loading spacy tokenizers...
Traceback (most recent call last):
File "E:/Transformer-master/train.py", line 184, in
main()
File "E:/Transformer-master/train.py", line 96, in main
SRC, TRG = create_fields(opt)
File "E:\Transformer-master\Process.py", line 35, in create_fields
t_src = tokenize(opt.src_lang)
File "E:\Transformer-master\Tokenize.py", line 7, in init
self.nlp = spacy.load(lang)
File "F:\Anaconda\envs\Transformer-master\lib\site-packages\spacy_init_.py", line 15, in load
return util.load_model(name, **overrides)
File "F:\Anaconda\envs\Transformer-master\lib\site-packages\spacy\util.py", line 119, in load_model
raise IOError(Errors.E050.format(name=name))
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.

@JennieCheng
Copy link

+1

@donglinz
Copy link

donglinz commented Jul 2, 2020

@shibin2018 @JennieCheng Try this:
python -m spacy download en

@IDWAGirl
Copy link

The problem still exists. What should I do

@kijlk
Copy link

kijlk commented Nov 12, 2022

you can use :
"fr_core_news_sm" instead of "fr"
"en_core_web_sm" instead of "en"
eg:
t_src = tokenize("fr_core_news_sm")
t_trg = tokenize("en_core_web_sm")

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants