EUVIMEDEUVIMED entdecken
Open Access · CC BY 4.0

Cross-domain sentiment classification in Slovak: a comparative analysis of transformer-based models

Lívia Kelebercová, Dávid Držík

PeerJ Computer Science · 17.03.2026 · 12 · e3641

DOI: 10.7717/peerj-cs.3641 ↗

Kurz gefasst

Fachartikel in der Zeitschrift PeerJ Computer Science, online erschienen am 17.03.2026. Verfasst von Lívia Kelebercová und 1 weiteren Autor:innen. Die Arbeit nennt 49 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0). Gefördert von: Scientific Grant Agency of the Ministry of Education of the Slovak Republic, Slovak Academy of Sciences, Slovak Research and Development Agency.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

Background

Three-class sentiment classification (positive, negative, neutral) is a critical aspect of various natural language processing (NLP) applications. However, for the Slovak language, it presents significant challenges, primarily due to limited linguistic resources and less research attention compared to major languages. Currently, there is no sentiment classifier for Slovak capable of effectively classifying text across multiple domains. This study presents the comprehensive evaluation of multi-domain sentiment classification for the Slovak language, addressing a significant gap in existing NLP research.

Methods

We compiled and preprocessed five balanced sentiment datasets (positive, neutral, negative), combining Slovak and machine-translated Czech resources. Five transformer-based language models were fine-tuned using stratified 10-fold cross-validation: Cross-lingual Language Model-Robustly optimized Bidirectional Encoder Representations from Transformers approach (XLM-RoBERTa) (Base), SlovakBERT, DistilBERT, and two compact Slovak-specific models—Slovak Byte-Pair Encoding Baby Language Model (SK_BPE_BLM) and its morphological variant Slovak Morphological Baby Language Model (SK_Morph_BLM). Model performance was assessed using accuracy, precision, recall, and F1-score. To determine domain effects and model differences, we performed Friedman tests and Nemenyi post-hoc comparisons. Per-class F1-scores, training dynamics, and computational efficiency were also analyzed.

Results

Sentiment classification performance varied significantly across domains for all models (Friedman p < 0.005), confirming strong domain dependency. SlovakBERT achieved the highest mean F1-scores in the banking, social media, and politics domains, while SK_Morph_BLM led in the movie domain, and XLM-RoBERTa performed best in the reviews domain. The Slovak-specific models exhibited the greatest stability, with SK_Morph_BLM achieving the smallest neutral–positive F1 disparity (ΔF1 ≈ 0.06). SlovakBERT and SK_Morph_BLM provided the most balanced per-class performance. Computationally, SK_BPE_BLM and SK_Morph_BLM were the fastest (≈532 s/fold), while XLM-RoBERTa required the most time (≈1,673 s/fold). Overall, SlovakBERT delivered the strongest cross-domain performance, whereas the Slovak-specific models offered the best efficiency–accuracy trade-off.

Förderung

  • Scientific Grant Agency of the Ministry of Education of the Slovak Republic
  • Slovak Academy of Sciences
  • Slovak Research and Development Agency
  • Czech Science Foundation

Zitieren

APA

Kelebercová, L., & Držík, D. (2026). Cross-domain sentiment classification in Slovak: a comparative analysis of transformer-based models. PeerJ Computer Science, 12, e3641. https://doi.org/10.7717/peerj-cs.3641

Vancouver

Kelebercová L, Držík D. Cross-domain sentiment classification in Slovak: a comparative analysis of transformer-based models. PeerJ Computer Science. 2026;12:e3641. doi:10.7717/peerj-cs.3641

BibTeX
@article{Kelebercov2026,
  author = {Kelebercová, Lívia and Držík, Dávid},
  title = {Cross-domain sentiment classification in Slovak: a comparative analysis of transformer-based models},
  journal = {PeerJ Computer Science},
  year = {2026},
  volume = {12},
  pages = {e3641},
  doi = {10.7717/peerj-cs.3641}
}
Kostenlos starten →