admin管理员组文章数量:1650835
1,参数
sklearn.feature_extraction.text.CountVector是sklearn.feature_extraction.text提供的文本特征提取方法的一种。
sklearn.feature_extraction.text 的4中文本特征提取方法:
- CounterVector
- TfidfVectorizer
- TfidfTransformer
- HashingVectorizer
看看这个函数的参数:
sklearn.feature_extraction.text.CountVectorizer(
input=’content’, #输入,可以是文件名字,文件,文本内容
encoding=’utf-8’, #默认编码方式
decode_error=’strict’, # 编码错误的处理方式,有三种{'strict','ignore','replace}
strip_accents=None, # 去除音调,三种{'ascill','unicode',None},ascii处理的速度快,但只适用于ASCll编码,unicode适用于所有的字符,但速度慢
lowercase=True, # 转化为小写
preprocessor=None,
tokenizer=None, #
stop_words=None,
token_pattern=’(?u)\b\w\w+\b’, ngram_range=(1, 1),
analyzer=’word’, #停止词,一些特别多,但没有意义的词,例如 a ,the an
ma
本文标签: featureextractionsklearnCountVectorText
版权声明:本文标题:sklearn.feature_extraction.text.CountVector 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dongtai/1729534245a1205210.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论