我正在尝试使用spacy
Traceback (most recent call last):
File "ts.py", line 3, in <module>
nlp = spacy.load('en_vectors_web_lg')
File "/home/ubuntu/miniconda2/envs/py36/lib/python3.6/site-packages/spacy/__init__.py", line 15, in load
return util.load_model(name, **overrides)
File "/home/ubuntu/miniconda2/envs/py36/lib/python3.6/site-packages/spacy/util.py", line 112, in load_model
return load_model_from_link(name, **overrides)
File "/home/ubuntu/miniconda2/envs/py36/lib/python3.6/site-packages/spacy/util.py", line 129, in load_model_from_link
return cls.load(**overrides)
File "/home/ubuntu/miniconda2/envs/py36/lib/python3.6/site-packages/spacy/data/en_vectors_web_lg/__init__.py", line 12, in load
return load_model_from_init_py(__file__, **overrides)
File "/home/ubuntu/miniconda2/envs/py36/lib/python3.6/site-packages/spacy/util.py", line 173, in load_model_from_init_py
return load_model_from_path(data_path, meta, **overrides)
File "/home/ubuntu/miniconda2/envs/py36/lib/python3.6/site-packages/spacy/util.py", line 156, in load_model_from_path
return nlp.from_disk(model_path)
File "/home/ubuntu/miniconda2/envs/py36/lib/python3.6/site-packages/spacy/language.py", line 653, in from_disk
util.from_disk(path, deserializers, exclude)
File "/home/ubuntu/miniconda2/envs/py36/lib/python3.6/site-packages/spacy/util.py", line 511, in from_disk
reader(path / key)
File "/home/ubuntu/miniconda2/envs/py36/lib/python3.6/site-packages/spacy/language.py", line 641, in <lambda>
self.vocab.from_disk(p) and _fix_pretrained_vectors_name(self))),
File "vocab.pyx", line 380, in spacy.vocab.Vocab.from_disk
File "vectors.pyx", line 391, in spacy.vectors.Vectors.from_disk
File "/home/ubuntu/miniconda2/envs/py36/lib/python3.6/site-packages/spacy/util.py", line 511, in from_disk
reader(path / key)
File "vectors.pyx", line 384, in spacy.vectors.Vectors.from_disk.load_vectors
File "/home/ubuntu/miniconda2/envs/py36/lib/python3.6/site-packages/numpy/lib/npyio.py", line 419, in load
pickle_kwargs=pickle_kwargs)
File "/home/ubuntu/miniconda2/envs/py36/lib/python3.6/site-packages/numpy/lib/format.py", line 681, in read_array
array.shape = shape
ValueError: cannot reshape array of size 112320492 into shape (1070971,300)
然而,它失败并显示以下错误消息
conda
请帮我解决问题。
我使用spacy validate
Installed models (spaCy v2.0.11)
/home/ubuntu/miniconda2/envs/py36/lib/python3.6/site-packages/spacy
TYPE NAME MODEL VERSION
package en-vectors-web-lg en_vectors_web_lg 2.0.0 ✔
package en-core-web-sm en_core_web_sm 2.0.0 ✔
package en-core-web-lg en_core_web_lg 2.0.0 ✔
link en_vectors_web_lg en_vectors_web_lg 2.0.0 ✔
link en en_core_web_sm 2.0.0 ✔
link en_core_web_lg en_core_web_lg 2.0.0 ✔
来管理环境
[
{
"connection": {
"id": "br0",
"uuid": "ab1dd903-4786-4c7e-a4b4-3339b144d6c7",
"stable-id": "",
"type": "bridge",
"interface-name": "br0",
"autoconnect": "no",
"autoconnect-priority": "0",
"autoconnect-retries": "-1",
"auth-retries": "-1",
"timestamp": "44444",
"read-only": "no",
"permissions": "",
"zone": "WAN",
"master": "",
"slave-type": "",
"autoconnect-slaves": "1",
"secondaries": "",
"gateway-ping-timeout": "0",
"metered": "unknown",
"lldp": "default"
},
"ipv4": {
"method": "manual",
"dns": "192.168.1.1,192.168.2.1",
"dns-search": "",
"dns-options": " ",
"dns-priority": "0",
"addresses": "192.168.1.3/24",
"gateway": "",
"routes": "192.168.10.0/24 192.168.1.1",
"route-metric": "-1",
"route-table": "0",
"ignore-auto-routes": "no",
"ignore-auto-dns": "no",
"dhcp-client-id": "",
"dhcp-timeout": "0",
"dhcp-send-hostname": "yes",
"dhcp-hostname": "",
"dhcp-fqdn": "",
"never-default": "no",
"may-fail": "yes",
"dad-timeout": "-1"
}
},
{
"connection": {
...
},
}
]