print("stopwords are:")
print(tfidf_vectorizer.get_stop_words())
print("Features are:")
print(tfidf_vectorizer.get_feature_names())
此处停用词正在打印但在打印功能时出现此错误:
文件" C:\ Users \ HP \ Anaconda3 \ lib \ site-packages \ sklearn \ utils \ validation.py",第768行,在check_is_fitted中 引发NotFittedError(msg%{' name':type(estimator)。 name })
NotFittedError: TfidfVectorizer - Vocabulary wasn't fitted.