小编shu*_* k.的帖子

AttributeError:当我尝试安装 en_core_web_sm 时,模块“click.utils”没有属性“_expand_args”

我正在尝试安装“en_core_web_sm”,我运行的命令是:

  1. pip install spacy (完美运行并安装)
  2. python -m spacy download en_core_web_sm (这里我收到错误“AttributeError:模块'click.utils'没有属性'_expand_args'”)

在此输入图像描述

请帮我解决这个问题。

#代码

导入nl_core_news_sm

加载预训练的荷兰语语言模型

nlp = nl_core_news_sm.load()

文件扩展名。设置为“pdf”或“doc(x)”

扩展名='pdf'

def create_tokenized_texts_list(extension): '''创建两个列表,一个包含候选人姓名,另一个包含从 .pdf 或 .doc 中提取的标记化简历文本'''resume_texts,resume_names = [], []

# Loop over the contents of the directory containing the resumes, filtering by .pdf or .doc(x)
for resume in list(filter(lambda x: extension in x, os.listdir(PROJECT_DIR + '/CV'))):
    if extension == 'pdf':
        # Read in every resume with pdf extension in the directory
        resume_texts.append(nlp(extract_text_from_pdf(PROJECT_DIR + '/CV/' + resume)))
    elif 'doc' in …
Run Code Online (Sandbox Code Playgroud)

nlp python-3.x spacy spacy-3

3
推荐指数
1
解决办法
3500
查看次数

标签 统计

nlp ×1

python-3.x ×1

spacy ×1

spacy-3 ×1