相关疑难解决方法(0)

找不到模型“en_core_web_md”。它似乎不是快捷方式链接、Python 包或数据目录的有效路径

我已经安装了 spacy 并下载了 en_core_web_sm : pip install spacy python -m spacy download en_core_web_sm 还尝试了 pip3 install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.2.0/en_core_web_sm-2.2。 0.tar.gz

我的spaCy版本:2.2.0 我的Python版本:3.7.4

但是,它仍然显示错误: OSError:[E050]找不到模型'en_core_web_md'。它似乎不是快捷方式链接、Python 包或数据目录的有效路径。

*import aqgFunction
import spacy
import en_core_web_sm
nlp = en_core_web_sm.load()
# Main Function
def main():
    # Create AQG object
    aqg = aqgFunction.AutomaticQuestionGenerator()
    inputTextPath = "E:\Automatic-Question-Generator-master\Automatic-Question-Generator-master\AutomaticQuestionGenerator\DB\db.txt"
    readFile = open(inputTextPath, 'r+', encoding="utf8")
    #readFile = open(inputTextPath, 'r+', encoding="utf8", errors = 'ignore')
    inputText = readFile.read()
    #inputText = '''I am Dipta. I love codding. I build my carrier with this.'''
    questionList = aqg.aqgParse(inputText) …
Run Code Online (Sandbox Code Playgroud)

python text nlp python-3.x spacy

11
推荐指数
2
解决办法
3万
查看次数

标签 统计

nlp ×1

python ×1

python-3.x ×1

spacy ×1

text ×1