Can#39;t find model #39;en_core_web_md#39;. It doesn#39;t seem to be a shortcut link, a Python package or a valid path to a data directory(找不到型号en_core_web_md;。它看起来不像是快捷方式链接、Python包或指向数据目录的有效路径)
本文介绍了找不到型号&en_core_web_md;。它看起来不像是快捷方式链接、Python包或指向数据目录的有效路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已安装Spacy并使用以下命令下载了en_core_web_sm: PIP安装空间 Python-m空格下载en_core_web_sm 也试过了 PIP3安装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] Can't find model 'en_core_web_md'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.
*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-masterAutomatic-Question-Generator-masterAutomaticQuestionGeneratorDBdb.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)
aqg.display(questionList)
#aqg.DisNormal(questionList)
return 0
# Call Main Function
if __name__ == "__main__":
main()*
推荐答案
在Jupyter笔记本中使用:
!python -m spacy download en_core_web_md
然后:
[Ctrl+M] or `Restart runtime` from menu bar
这篇关于找不到型号&en_core_web_md;。它看起来不像是快捷方式链接、Python包或指向数据目录的有效路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
沃梦达教程
本文标题为:找不到型号&en_core_web_md;。它看起来不像是快捷方式链接、Python包或指向数据目录的有效路径


基础教程推荐
猜你喜欢
- 在同一图形上绘制Bokeh的烛台和音量条 2022-01-01
- 求两个直方图的卷积 2022-01-01
- PANDA VALUE_COUNTS包含GROUP BY之前的所有值 2022-01-01
- 无法导入 Pytorch [WinError 126] 找不到指定的模块 2022-01-01
- 包装空间模型 2022-01-01
- Plotly:如何设置绘图图形的样式,使其不显示缺失日期的间隙? 2022-01-01
- 使用大型矩阵时禁止 Pycharm 输出中的自动换行符 2022-01-01
- 在Python中从Azure BLOB存储中读取文件 2022-01-01
- PermissionError: pip 从 8.1.1 升级到 8.1.2 2022-01-01
- 修改列表中的数据帧不起作用 2022-01-01