LSTM Recurrent Neural Networks for Short Text and Sentiment Classication文章阅读笔记

一、文本预处理

1、删除所有符号,例如:%

2、所有数字用例如'SPEC——NUM'来代替

3、为数据集创建词典


二、词向量化

采用one-hot来表示单词


三、词典大小

不需太大,原文中的词典大小是9000


四、数据集样本数不平衡

原文中Bad和Neutal类的样本数远远少于Good分类,因此将Bad和Neutral的样本数扩大了一倍

LSTM Recurrent Neural Networks for Short Text and Sentiment Classication文章阅读笔记

四、LSTM、BLSTM、GRU对比

 it has been shown in the experiments that GRU is well suited in simple cases where

we want to obtain fast results. Advantages of GRU are faster training as they

require less number of epochs to obtain the nal result. Results achived by LSTM

and BLSTM networks are more precise, but it is necessary to spend more time

for the training process. GRU does not work with very short phrases such as in

the case of third dataset. 

即GRU训练时间更短,但是只适合简单情况下的,不适合非常短的文本

LSTM、BLSTM更精确,但是训练时间更长。