【发布时间】:2021-02-13 04:37:30
【问题描述】:
一个特定的实例是"Queens Stop 'N' Swap"。改造后,我只得到了三个特征['Queens', 'Stop', 'SWap']。 'N' 已被忽略。如何捕获'N'?。所有参数都是我代码中的默认设置。
### Create the vectorizer method
tfidf_vec = TfidfVectorizer()
### Transform the text into tf-iwine vectors
text_tfidf = tfidf_vec.fit_transform(title_text)
【问题讨论】:
-
还有其他例句吗?否则,您可以去掉标点符号,将其作为一个单词处理。
标签: python-3.x scikit-learn nlp tf-idf tfidfvectorizer