Negation Handling on XLNet Using Dependency Parser for Sentiment Analysis

Ferdinand Winaya, Abba Suganda Girsang · 2024

Negation handling is often overlooked in Indonesian sentiment analysis, making it difficult to automatically and accurately determine the polarity of sentences containing negation words. Negation is a challenging issue in natural language processing, as it can drastically alter the meaning of a sentence. For example, common Indonesian negation words such as “tidak” (no/not), “belum” (not yet), or “jangan” (do not) can reverse the sentiment polarity in a text. Previous studies have proposed rule-based approaches, relying on linguistic rules or dependency parse trees to handle negation. However, negation is a complex problem that cannot be effectively addressed by simple rules alone, as they often lack flexibility in handling diverse sentence structures and negation complexities. Therefore, a more dynamic approach is needed, such as combining a dependency parser with an embedding layer, which can map syntactic relationships between words and learn vector representations of negation. This allows the model to flexibly determine the scope of negation words, enabling more accurate sentiment analysis even in complex sentences. This study evaluates the impact of negation handling on a transformer-based model, specifically XLNet, in Indonesian sentiment analysis. Using the proposed method, the model's F1 score increased by 2.13%, from 71.42% to 73.55%, compared to the baseline model. This demonstrates that the proposed negation handling strategy enhances sentiment prediction accuracy, making the model more effective at handling texts with negation.

Read the paper · More papers on PaperTik