Sebastian, Basti, Wastl?! Recognizing Named Entities in Bavarian Dialectal Data

Siyao Peng, Zihang Sun, Huangyan Shan, Marie Kolm, Verena Blaschke, Ekaterina Artemova, Barbara Plank

Abstract

Named Entity Recognition (NER) is a fundamental task for extracting key information from texts, yet annotated resources remain scarce for dialects. This paper introduces BarNER, the first dialectal NER dataset for German, featuring 161K tokens annotated across Bavarian Wikipedia articles (bar-wiki) and tweets (bar-tweet). Using a schema adapted from German CoNLL 2006 and GermEval, we conduct comprehensive experiments—including in-domain, cross-domain, and multi-task learning—on Bavarian and German corpora. Our results show that incorporating knowledge from larger German datasets improves performance on Bavarian data, while multi-task learning with dialect identification achieves state-of-the-art results on bar-wiki. This work substantiates the necessity of low-resource dialectal corpora and the importance of linguistic diversity in enhancing model robustness.

Introduction

While Named Entity Recognition (NER) is considered a solved problem for many high-resource languages, dialects remain a significant "blind spot" in Natural Language Processing (NLP). Bavarian (Bairisch), spoken by over 10 million people, is more than just "German with an accent"; it features distinct phonology, syntax, and a unique lexicon. For instance, naming conventions often involve diminutives (e.g., Basti or Wastl for Sebastian) or placing family names before given names.

Because of these linguistic shifts, state-of-the-art models trained on Standard German perform poorly on dialectal text. This study aims to bridge the gap by creating a gold-standard dataset and establishing strong baselines for Bavarian NER.

The BarNER Dataset

The core contribution of this research is BarNER, which consists of two distinct sub-corpora:

  • bar-wiki: 75,687 tokens from Bavarian Wikipedia.
  • bar-tweet: 86,090 tokens from Bavarian Twitter.

To facilitate transfer learning, the researchers compared BarNER against three established German datasets: NoSta-D (de-wiki), MobIE (de-tweet), and CoNLL 2006 (de-news). Analysis of these datasets shows significant variation in entity distribution across genres and languages.

Entity frequency per 1,000 tokens across Bavarian and German corpora

Methodology

The study utilized the MaChAmp framework for multi-task learning, employing XLM-RoBERTa (XLM-R) and GBERT as backbone models. The researchers explored several training strategies:

  • In-domain: Training and testing on the same Bavarian sub-corpus.
  • Cross-domain: Testing models trained on Standard German directly on Bavarian data.
  • Sequential Training: Pre-training on large German datasets before fine-tuning on Bavarian.
  • Multi-Task Learning (MTL): Simultaneously training the model on NER and Dialect Identification (DID).

Key Insights: The Dialect Gap

A critical finding of this work is that dialectal variation is more than just a "domain" shift. Lexical analysis using Jaccard similarity revealed that the distance between Bavarian and Standard German is often larger than the distance between different genres within Standard German (e.g., news vs. tweets).

Lexical similarity (Jaccard) heatmap between dialectal and standard corpora

This "dialect gap" explains why models trained on Standard German news saw a massive performance drop of 15.46 to 24.18 F1 points when tested on Bavarian. The success of Multi-Task Learning (MTL) proved to be the most effective solution; by forcing the model to identify the dialect while performing NER, it learned to navigate these nuances more effectively.

Results and Performance

  • MTL Breakthrough: The MTL setup achieved a new state-of-the-art (SOTA) on bar-wiki with an F1 score of 84.17, representing an 11.26 point improvement over the in-domain baseline.
  • Genre Consistency: Models generally performed better on bar-tweet (F1 ~77-78) than bar-wiki (F1 ~72-73). This is likely because the informal nature of social media is more consistent across languages than the formal, edited style of Wikipedia.
  • Mutual Benefit: Interestingly, the relationship is reciprocal. Training on Bavarian data provided a slight performance boost to the 20-year-old German CoNLL benchmark, suggesting that dialectal diversity improves the overall robustness of "standard" models.

Conclusion

This research highlights the necessity of dedicated dialectal resources like BarNER. While Standard German models struggle with the unique naming conventions and syntax of Bavarian, multi-task learning offers a promising path forward. Future work will explore token-level dialect identification to handle code-switching and translation-based transfer learning to further support low-resource dialects.

Reference: Peng, S., et al. (2024). Sebastian, Basti, Wastl?! Recognizing Named Entities in Bavarian Dialectal Data. Proceedings of LREC-COLING 2024.

Summary updated

BibTeX
@inproceedings{peng2024sebastian,
  author = {Siyao Peng and Zihang Sun and Huangyan Shan and Marie Kolm and Verena Blaschke and Ekaterina Artemova and Barbara Plank},
  title = {{Sebastian, Basti, Wastl?! Recognizing Named Entities in Bavarian Dialectal Data}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2024},
  url = {https://openreview.net/forum?id=toBIOHyxnc},
}
Figure