Sentiment Analysis (SA) is a crucial aspect of Natural Language Processing (NLP), addressing subjective assessments in textual content. Syntactic parsing is useful in SA because explicit syntactic information can improve accuracy while providing explainability, but it tends to be a computational bottleneck in practice due to the slowness of parsing algorithms. This paper addresses said bottleneck by using a SEquence Labeling Syntactic Parser (SELSP) to inject syntax into SA. By treating dependency parsing as a sequence labeling problem, we greatly enhance the speed of syntax-based SA. SELSP is trained and evaluated on a ternary polarity classification task, demonstrating its faster performance and better accuracy in polarity prediction tasks compared to conventional parsers like Stanza and to heuristic approaches that use shallow syntactic rules for SA like VADER. This increased speed and improved accuracy make SELSP particularly appealing to SA practitioners in both research and industry. In addition, we test several sentiment dictionaries on our SELSP to see which one improves the performance in polarity prediction tasks. Moreover, we compare the SELSP with Transformer-based models trained on a 5-label classification task. The results show that dictionaries that capture polarity judgment variation provide better results than dictionaries that ignore polarity judgment variation. Moreover, we show that SELSP is considerably faster than Transformer-based models in polarity prediction tasks.
翻译:情感分析是自然语言处理的关键领域,致力于处理文本内容中的主观性评估。句法解析在情感分析中具有重要价值,因为显式的句法信息既能提升分析准确性,又能提供可解释性;然而在实践中,由于解析算法速度较慢,句法解析往往成为计算瓶颈。本文通过使用序列标注句法解析器将句法信息注入情感分析,以解决上述瓶颈问题。通过将依存句法解析视为序列标注任务,我们显著提升了基于句法的情感分析速度。SELSP在三元极性分类任务上进行了训练与评估,结果表明:相较于传统解析器(如Stanza)以及使用浅层句法规则进行情感分析的启发式方法(如VADER),SELSP在极性预测任务中展现出更快的处理速度和更高的准确率。这种速度与精度的双重提升使得SELSP对学术界和工业界的情感分析实践者具有特殊吸引力。此外,我们在SELSP上测试了多种情感词典,以探究何种词典能提升极性预测任务的性能。同时,我们将SELSP与基于Transformer的模型(在五标签分类任务上训练)进行了比较。实验结果表明:能够捕捉极性判断变化的词典比忽略极性判断变化的词典获得更优的结果。此外,我们证明在极性预测任务中,SELSP的速度显著优于基于Transformer的模型。