基于改進BERT-BiGRU模型的文本情感分類研究
2023年電子技術應用第2期
李蕓1,2,潘雅麗1,肖冬1
1.杭州電子科技大學 電子信息學院,浙江 杭州 310018;2.浙江省裝備電子研究重點實驗室,浙江 杭州 310018
摘要: 針對目前網絡評論文本情感分類準確性不高的問題,提出一種基于BERT和雙向門控循環單元(BiGRU)的改進模型,使用能夠表征文本豐富語義特征的BERT模型進行詞向量表示,結合能夠長期保留文本上下文關聯信息的BiGRU神經網絡提高模型的分類效果,并在此基礎上引入注意力機制,突出文本中更能表達分類結果的情感詞權重,提高情感分類的準確率。將上述模型分別在Acllmdb_v1和酒店評論兩個公開數據集上進行測試,實驗結果表明,該模型在中、英文文本情感分類任務中都獲得了良好的性能。
中圖分類號:TP391.1
文獻標志碼:A
DOI: 10.16157/j.issn.0258-7998.223108
中文引用格式: 李蕓,潘雅麗,肖冬. 基于改進BERT-BiGRU模型的文本情感分類研究[J]. 電子技術應用,2023,49(2):9-14.
英文引用格式: Li Yun,Pan Yali,Xiao Dong. Research on text emotion classification based on improved BERT-BiGRU model[J]. Application of Electronic Technique,2023,49(2):9-14.
文獻標志碼:A
DOI: 10.16157/j.issn.0258-7998.223108
中文引用格式: 李蕓,潘雅麗,肖冬. 基于改進BERT-BiGRU模型的文本情感分類研究[J]. 電子技術應用,2023,49(2):9-14.
英文引用格式: Li Yun,Pan Yali,Xiao Dong. Research on text emotion classification based on improved BERT-BiGRU model[J]. Application of Electronic Technique,2023,49(2):9-14.
Research on text emotion classification based on improved BERT-BiGRU model
Li Yun1,2,Pan Yali1,Xiao Dong1
1.School of Electronics Information, Hangzhou Dianzi University, Hangzhou 310018, China; 2.Zhejiang Provincial Key Laboratory of Equipment Electronics, Hangzhou 310018, China
Abstract: Aiming at the problem that the accuracy of text emotion classification of online comment is not high, an improved model based on BERT and bidirectional gated recurrent unit (BiGRU) is proposed. The word vector representation is carried out by using the BERT model which can represent the rich semantic features of the text. The classification effect of the model is improved by combining the BiGRU neural network which can retain the text context related information for a long time. On this basis, the attention mechanism is introduced, to highlight the weight of emotional words which can better express the classification results in the text, and improve the accuracy of emotional classification. The above model was tested on Acllmdb_v1 data set and hotel reviews data set, which are public data set. The experimental results show that the model achieves good performance in both Chinese and English text emotion classification tasks.
Key words : text emotion classification;BERT;BiGRU;attention mechanism
0 引言
文本情感分類[1]是自然語言處理(Natural Language Processing, NLP)的一個重要任務。隨著互聯網的飛速發展,人們不僅能夠從網上獲取信息,還能通過各種平臺隨心所欲地發表包含自己主觀情緒的觀點和看法,例如網絡購物、微博評論等。對含有豐富情感信息的文本數據進行分析具有非常重要的現實意義,它被廣泛應用于產品推薦、搜索排名等領域。但由于一些平臺字符長度有限,而且用戶表達較隨意,存在用詞不規范和詞語拼寫錯誤等問題,傳統的情感分類方法在許多方面表現效果差強人意,實現高效準確的自動文本情感分類方法是本文的主要研究內容。
本文詳細內容請下載:http://www.viuna.cn/resource/share/2000005161。
作者信息:
李蕓1,2,潘雅麗1,肖冬1
(1.杭州電子科技大學 電子信息學院,浙江 杭州 310018;2.浙江省裝備電子研究重點實驗室,浙江 杭州 310018)
此內容為AET網站原創,未經授權禁止轉載。