A Syntax-Injected Approach for Faster and More Accurate Sentiment Analysis

Bibliographic citation

Imran M, Kellert O, Gómez-Rodríguez C. 2026. A syntax-injected approach for faster and more accurate sentiment analysis. PeerJ Computer Science 12:e3519 https://doi.org/10.7717/peerj-cs.3519

Type of academic work

Academic degree

Abstract

[Abstract]: Sentiment Analysis (SA) is a crucial aspect of Natural Language Processing (NLP), focusing on identifying and interpreting subjective assessments in textual content. Syntactic parsing is useful in SA as it improves accuracy and provides explainability; however, it often becomes a computational bottleneck due to slow parsing algorithms. This article proposes a solution to this bottleneck by using a Sequence Labeling Syntactic Parser (SELSP) to integrate syntactic information into SA via a rule-based sentiment analysis pipeline. By reformulating dependency parsing as a sequence labeling task, we significantly improve the efficiency of syntax-based SA. SELSP is trained and evaluated on a ternary polarity classification task, demonstrating greater speed and accuracy compared to conventional parsers like Stanza and heuristic approaches such as Valence Aware Dictionary and sEntiment Reasoner (VADER). The combination of speed and accuracy makes SELSP especially attractive for sentiment analysis applications in both academic and industrial contexts. Moreover, we compare SELSP with Transformer-based models trained on a 5-label classification task. In addition, we evaluate multiple sentiment dictionaries with SELSP to determine which yields the best performance in polarity prediction. The results show that dictionaries accounting for polarity judgment variation outperform those that ignore it. Furthermore, we show that SELSP outperforms Transformer-based models in terms of speed for polarity prediction.

Description

The following information was supplied regarding data availability: The OpeNERen, OpeNERes, UD_English-EWT and UD_Spanish-AnCora datasets are available at Zenodo: Muhammad Imran. (2025). chimran135/syntax-injected-sentimentanalysis: Syntax-injected Sentiment Analysis (1.0.0). Zenodo. https://doi.org/10.5281/zenodo.15323755. The Rest-Mex 2023 shared task website provides access to the training data for registered participants. The data are held privately for assessment purposes and can be obtained from Rest-Mex 2023 organizers https://sites.google.com/cimat.mx/rest-mex2023 by contacting Miguel Ángel Álvarez Carmona at miguel.alvarez@cimat.mx. The Rest-Mex 2023 dataset was used under license for this study.

Rights

Attribution 4.0 International
Attribution 4.0 International

Except where otherwise noted, this item's license is described as Attribution 4.0 International