alex_bn_lee

导航

2020年5月16日 #

【464】文本转字符向量bag of words

摘要: 利用 sklearn.feature_extraction.text 中的 CountVectorizer 来实现 首先获取所有的文本信息 然后将文本信息转化为从 0 开始的数字 获取转换后的字符向量 参见如下代码: >>> text_01 = "My name is Alex Lee." >>> 阅读全文

posted @ 2020-05-16 20:55 McDelfino 阅读(247) 评论(0) 推荐(0)