【发布时间】:2019-12-16 20:22:21
【问题描述】:
这是我的代码:
count = CountVectorizer(lowercase = False)
vocabulary = count.fit_transform([words])
print(count.get_feature_names())
例如,如果:
words = "Hello @friend, this is a good day. #good."
我想把它分成这个:
['Hello', '@friend', 'this', 'is', 'a', 'good', 'day', '#good']
目前,它是这样分成的:
['Hello', 'friend', 'this', 'is', 'a', 'good', 'day']
【问题讨论】:
标签: python machine-learning scikit-learn