hupili / python-for-data-and-media-communication-gitbook

An open source book on Python tailed for communication students with zero background
115 stars 62 forks source link

Cannot use spacy.load('zh') to install model for no shortcut link #137

Closed ZhangHuimin97 closed 5 years ago

ZhangHuimin97 commented 5 years ago

Troubleshooting

Describe your environment

Describe your question

Example: I cannot load any packages from spacy.lang. I cannot use shortcut links to find the file. If I set up a link for the model, it will remind me that the meta.json in the file cannot be read.

2018-12-14 6 22 11

The minimum code (snippet) to reproduce the issue

Example:

spacy.load('en')
spacy.load('zh')

Describe the efforts you have spent on this issue

Example:

I download a Chinese model from github and have successfully installed it in my current working file. But I cannot link it with spacy. So so sad. crying。。。

link for the model : https://github.com/howl-anderson/Chinese_models_for_SpaCy

Have you Google/ Stackover flow anything?

Do they solve or partially solve your question?

What is the closest answer you can find?

ZhangHuimin97 commented 5 years ago

@hupili

ChicoXYC commented 5 years ago

@ZhangHuimin97 does this help? I found this in their test example :https://github.com/howl-anderson/Chinese_models_for_SpaCy/blob/master/test.py

import zh_core_web_sm
nlp = zh_core_web_sm.load()
ChicoXYC commented 5 years ago

@ZhangHuimin97 has your problem solved?

hupili commented 5 years ago

This is too specific. We'll get back if someone else encounter this problem in the future.