演示内容:文档的向量化.py
# -*- coding: utf-8 -*- """ 演示内容:文档的向量化 """ from sklearn.feature_extraction.text import CountVectorizer corpus = [ 'Jobs was the chairman of Apple Inc., and he was very famous', 'I like to use apple computer', 'And I also like to eat apple' ] #未经停用词过滤的文档向量化 vectorizer =CountVectorizer
用户评论