【发布时间】:2018-08-07 14:17:40
【问题描述】:
如果我将自定义停用词列表传递给TfidfVectorizer,何时会准确删除停用词?根据the documentation:
stop_words:
string{‘english’}、list或None(默认)...
如果是一个列表,则假定该列表包含停用词,所有这些 将从生成的令牌中删除。仅适用于
analyzer == 'word'。
所以似乎该过程发生在标记化之后,对吗?产生疑问是因为如果标记化还涉及词干提取,我认为存在错误地跳过(不删除)停用词的风险,因为在词干提取之后,它不再被识别。
【问题讨论】:
标签: python scikit-learn nlp stop-words tfidfvectorizer