Font Size: a A A

Improvement And Application Of Text Classification Based On RNN

Posted on:2021-03-06Degree:MasterType:Thesis
Country:ChinaCandidate:J Y YangFull Text:PDF
GTID:2428330623478264Subject:Computational Mathematics
Abstract/Summary:PDF Full Text Request
Text classification refers to the selection of a category matching a text as an important means of output for a given piece of text information.Text classification is a basic problem in the field of natural language processing.It is a very active research direction in the field of machine learning and has many important practical applications.Therefore,it is of great theoretical and practical significance to study text classification algorithms with high accuracy and strong robustness.This paper selects LSTM(Long Short-Term Memory),a variant of classical RNN,as the basic tool of text classification for the following reasons: On the one hand,the LSTM model,due to the introduction of a new "door" structure,can solve the problem of insufficient learning ability due to too long sample length in the text training process,which makes words that are far away from keywords retain well in the learning process.When the dataset is large,the original text can be better learned to express the meaning,which enhances the robustness of the algorithm and effectively improves the generalization ability of the model.On the other hand,the model can show high accuracy in the experimental process,making our prediction process closer to the facts from the beginning.This paper mainly studies one-hot model,word2 vec model and other word embedding models,text CNN,Bi LSTM and other neural network frameworks,attention model,etc.for supervised learning of neural networks.Finally,some unsupervised learning models recently proposed by Google,such as BERT algorithm,are briefly described.The innovations of this paper are as follows: The selection of word embedding has a great impact on the generalization ability of the neural network.At present,one-hot model is a commonly used word embedding model.Due to its design flaws,it will lead to excessive dimension,occupy too much memory space,and can not express the relationship between words during training.In order to solve this problem,the word2 vec model is proposed.The principle of this model is to reduce the dimension of the data after one-hot model processing,and map words with similar meaning to similar locations in vector space,which perfectly solves the disadvantage of dimension disasters and lexical gaps in the original model.At the same time,in order to further improve the prediction accuracy,this paper adds the attention model to the basic model and compares it with the original model and the text CNN model.The final experiment shows that although the new model takes longer than the text CNN model in terms of training time,the method of replacing the word embedding model and increasing the attention model can make the computer solve both the memory explosion problem caused by large datasets and limited device conditions in text classification tasks,and achieve the final experimental results compared with the original one.Experimentation objectives for higher accuracy of models and text CNN models.In addition,it is found that increasing the training cycle and the size of the hidden layer will improve the accuracy.However,when the learning rate is too high,the model will not converge.
Keywords/Search Tags:Machine learning, Natural Language Processing, Text Classification, Neural Network, Word-Embedding, RNN, LSTM, Attention
PDF Full Text Request
Related items