https://github.com/jadore801120/attention-is-all-you-need-pytorch
根据这个项目的第1步 输入后提示无法找到de model。 可是我已经输入python -m spacy download de安装成功了 没有提示link什么的。 spacy版本是3.0 。
但是这两个Model都可以正常加载 如图:
报错提示如下:
(py36) PS D:\Transformer Project\attention-is-all-you-need-pytorch-master> python preprocess.py -lang_src de -lang_trg en -share_vocab -save_data m30k_deen_shr.pkl Namespace(data_src=None, data_trg=None, keep_case=False, lang_src='de', lang_trg='en', max_len=100, min_word_count=3, save_data='m30k_deen_shr.pkl', share_vocab=True) Traceback (most recent call last): File "preprocess.py", line 335, in <module> main_wo_bpe() File "preprocess.py", line 270, in main_wo_bpe src_lang_model = spacy.load(opt.lang_src) File "D:\IDE\ANACONDA\envs\py36\lib\site-packages\spacy\__init__.py", line 47, in load return util.load_model(name, disable=disable, exclude=exclude, config=config) File "D:\IDE\ANACONDA\envs\py36\lib\site-packages\spacy\util.py", line 328, in load_model raise IOError(Errors.E941.format(name=name, full=OLD_MODEL_SHORTCUTS[name])) OSError: [E941] Can't find model 'de'. It looks like you're trying to load a model from a shortcut, which is deprecated as of spaCy v3.0. To load the model, use its full name instead: nlp = spacy.load("de_core_news_sm") For more details on the available models, see the models directory: https://spacy.io/models. If you want to create a blank model, use spacy.blank: nlp = spacy.blank("de")