摘要
目前针对文本情感分析的研究大多集中在商品评论和微博的情感分析领域,对金融文本的情感分析研究较少。针对该问题,文中提出一种基于Transformer编码器的金融文本情感分析方法。Transformer编码器是一种基于自注意力机制的特征抽取单元,在处理文本序列信息时可以把句中任意两个单词联系起来不受距离限制,克服了长程依赖问题。文中所提方法使用Transformer编码器构建情感分析网络。Transformer编码器采用多头注意力机制,对同一句子进行多次计算以捕获更多的隐含在上下文中的语义特征。文中在以金融新闻为基础构建的平衡语料数据集上进行实验,并与以卷积神经网络和循环神经网络为基础构建的模型进行对比。实验结果表明,文中提出的基于Transformer编码器的方法在金融文本情感分析领域效果最好。
Sentiment analysis plays an important role in many fields,but most of these studies focus on the field of commodity reviews and microblogs,and lack of sentiment analysis of financial texts.To solve this problem,a financial text sentiment analysis method based on Transformer encoder is presented in this paper.Transformer encoder is a feature extraction unit based on the self-attention mechanism.When Transformer encoder processes text sequence information,it can link any two words in a sentence without distance restriction,which overcomes the problem of long-term dependencies.The multi-head attention mechanism is used to calculate the same sentence several times and capture more semantic features implied in the context.The experiment is car+ried out on a balanced corpus data set based on financial news.The experimental results show that the method based on Transformer encoder has best effect in the field of financial text sentiment analysis compared with the models based on convolution neural network and recurrent neural network.
作者
李福鹏
付东翔
LI Fupeng;FU Dongxiang(School of Optical-Electrical and Computer Engineering,University of Shanghai for Science and Technology,Shanghai 200093,China)
出处
《电子科技》
2020年第9期10-15,共6页
Electronic Science and Technology
基金
国家自然科学基金(61703277,61605114)。