1. 首页
  2. 人工智能
  3. 机器学习
  4. 演示内容:文档的向量化.py

演示内容:文档的向量化.py

上传者: 2020-07-25 12:28:28上传 PY文件 1.24KB 热度 14次
# -*- 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
用户评论