Cureus

A Multi-layer Linguistic Profiling Framework for Emotion Recognition in Text: A Data-Driven Natural Language Processing (NLP) Study Using the Kaggle Emotions Dataset.

Roaa S Bogdadi, Marivel M De Guzman, Rahaf Al Hasheem, Mohammad Bani Abed Alghani

Research, King Abdullah Medical Complex, Jeddah, SAU. · Research, Research Assistant (RA) Company for Research and Studies, Riyadh, SAU.

Key points

From the paper's conclusion
  • Methods The Kaggle Emotions Dataset (16,000 training, 2,000 validations, and 2,000 test instances; six emotion categories) was used.

Abstract

Background Emotion recognition in text underpins a wide range of human-centered artificial intelligence (AI) applications, yet existing frameworks either prioritize accuracy at the expense of interpretability or analyze emotional language through a single lens. This study developed and evaluated the Multi-layer Emotion Linguistic Profiling Framework (MELPF), a reproducible protocol integrating lexical, structural, and model-level interpretability analyses to characterize how emotional meaning is encoded in short text. Methods The Kaggle Emotions Dataset (16,000 training, 2,000 validations, and 2,000 test instances; six emotion categories) was used. The corpus exhibits pronounced class imbalance: joy (33.5%) and sadness (29.2%) dominate, while surprise is underrepresented (3.6%); in addition, all statistics were derived strictly from training instances to prevent data leakage. MELPF operates across five stages: preprocessing; lexical profiling (unigram/bigram distributions, term frequency-inverse document frequency {TF-IDF}, pointwise mutual information (PMI), and co-occurrence analysis); structural profiling (part-of-speech {POS} distribution and template identification); supervised classification using logistic regression, a linear support vector machine (SVM), random forest, a bidirectional long short-term memory (BiLSTM) network, and Bidirectional Encoder Representations from Transformers (BERT) (base-uncased variant); and cross-layer synthesis via feature-importance mapping and attention visualization. Results BERT achieved the highest macro-F1 (the macro-averaged F1 score, i.e., the harmonic mean of precision and recall; 0.92, accuracy 0.93), followed by BiLSTM (0.89), linear SVM (0.88), logistic regression (0.86), and random forest (0.81). Ablation confirmed that PMI-derived and POS-based features improved macro-F1 from 0.88 to 0.89 over the TF-IDF baseline. Lexical profiling identified category-discriminative unigrams and high-PMI bigrams, while structural profiling revealed a dominant first-person copular frame. Feature-importance scores and attention visualization confirmed alignment between salient tokens and model decisions. Conclusion MELPF offers a transparent, reproducible methodology for examining emotional meaning across multiple linguistic layers, bridging theoretical linguistics and applied NLP.

Read the paper

Discussion

Science Skim's AI key points, plus readers' public thoughts

Readers' thoughts

No reader thoughts yet.

Related papers

A Multi-layer Linguistic Profiling Framework for Emotion Recognition in Text: A Data-Driven Natural Language Processing (NLP) Study Using the Kaggle Emotions Dataset — Science Skim