AttributeError: ‘CRF‘ object has no attribute ‘keep_tempfiles‘

AttributeError: ‘CRF’ object has no attribute ‘keep_tempfiles’ :

问题描述

在使用sklearn 提供的 sklearn_crfsuite进行命名实体识别时,报错:
AttributeError: ‘CRF’ object has no attribute ‘keep_tempfiles’ AttributeError: ‘CRF‘ object has no attribute ‘keep_tempfiles‘_第1张图片

原因分析:

使用的sklearn版本过高


解决方案:

使用0.24以下版本的scikit-learn

$ pip install -U 'scikit-learn<0.24'

我这里使用的是:

pip install scikit-learn==0.23.1

你可能感兴趣的:(nlp)