【发布时间】:2018-02-20 03:31:07
【问题描述】:
CountVectorizer 忽略大写单词的原因是什么?
cv = CountVectorizer(stop_words=None,analyzer='word',token_pattern='.*',max_features=None)
text = ['this','is','a','Test','!']
fcv = cv.fit_transform(list)
fcv = [cv.vocabulary_.get(t) for t in text]
print fcv
返回
[5, 3, 2, None, 1]
【问题讨论】:
标签: python pandas numpy scikit-learn