【发布时间】:2016-09-16 11:49:29
【问题描述】:
在词袋模型中,我知道我们应该在训练之前删除停用词和标点符号。但是在 RNN 模型中,如果我想做文本分类,我是否也应该删除停用词?
【问题讨论】:
标签: machine-learning nlp deep-learning text-classification recurrent-neural-network
在词袋模型中,我知道我们应该在训练之前删除停用词和标点符号。但是在 RNN 模型中,如果我想做文本分类,我是否也应该删除停用词?
【问题讨论】:
标签: machine-learning nlp deep-learning text-classification recurrent-neural-network
这取决于您的模型分类。如果您正在做的事情是通过停用词辅助分类 - 例如,某种程度的语法理解 - 那么您需要保留停用词或更改您的停用词列表,这样您就不会丢失该信息。例如,删除所有表示存在的动词(is、are、should be、...)可能会弄乱在某种程度上依赖于句子结构的 NN。
但是,如果您的分类是基于主题的(正如您的词袋参考所建议的那样),那么请以相同的方式处理输入:在它们消耗宝贵的训练时间之前删除那些讨厌的停用词。
【讨论】:
If you working with LSTM’s or other models which capture the semantic meaning and the meaning of a word depends on the context of the previous text, then it becomes important not to remove stopwords. towardsdatascience.com/…