EuskañolDS: A Naturally Sourced Corpus for Basque-Spanish Code-Switching

Maite Heredia, Jeremy Barnes, Aitor SoroaNAACL 2025

TL;DR

This paper introduces EuskañolDS, the first naturally sourced corpus for Basque-Spanish code-switching, addressing a critical data gap for NLP research in this area. By combining parliamentary transcripts and social media data, they provide a valuable resource for developing and evaluating models that can understand and generate mixed-language content.

What Problem Does This Paper Address?

Code-switching (CS), the practice of alternating between languages within a single discourse, is a common phenomenon in multilingual communities. However, for Natural Language Processing (NLP), it presents a significant challenge due to a lack of relevant data. This is particularly true for language pairs involving low-resource languages like Basque. While CS between Basque and Spanish is known to occur frequently in both formal and informal settings, existing resources for analyzing and modeling this phenomenon are scarce. This paper aims to bridge this gap by creating a comprehensive, naturally sourced corpus of Basque-Spanish code-switching.

Methods

The authors employed a semi-supervised approach to build their corpus. First, they utilized a language identification model (FastText) to automatically identify potential code-switched instances from existing corpora. This initial filtering was followed by manual validation to ensure the accuracy and reliability of the selected instances. They specifically filtered for sentences containing more than two words in each language and grammatical features from both, while excluding instances with proper nouns that lack direct translation or where the content of both languages is identical. This aggressive filtering aimed to isolate clear instances of code-switching.

Datasets

The EuskañolDS dataset is built from three primary sources:

  • BasqueParl: A corpus of Basque parliamentary transcriptions, known for its "heavy Basque-Spanish code-switching."
  • HelduGazte: A collection of nearly 6 million tweets from Basque speakers, used for analyzing formal and informal speech.
  • Covid-19: A corpus of 8 million tweets from Basque speakers during the COVID-19 pandemic, used to study diachronic language use trends.

The final EuskañolDS dataset is presented in two versions:

  • Silver Set: Automatically classified instances, containing 20,008 instances.
  • Gold Set: Manually validated subset, containing 927 instances, intended for high-precision analysis.

Key Insights and Ideas

  • Data scarcity is a major bottleneck for low-resource CS research: The paper highlights that despite the prevalence of code-switching, the lack of readily available, naturally sourced data hinders progress in NLP for many language pairs.
  • Parliamentary and social media data offer complementary perspectives: Combining formal (BasqueParl) and informal (Twitter) sources provides a richer dataset that captures a wider range of code-switching phenomena and linguistic varieties.
  • Automatic filtering is a useful first step, but manual validation is crucial: While language identification models can efficiently identify potential CS instances, human review is essential for ensuring high precision and for nuanced distinctions, especially in distinguishing CS from borrowings.
  • Inter-sentential CS is the dominant type: The analysis of the gold set revealed that inter-sentential code-switching (alternating between sentences) is the most prevalent type in their corpus, likely due to the nature of the source data.

Key Results

The EuskañolDS dataset comprises 20,008 instances in its silver set and 927 in its gold set. The silver set has a higher number of instances but fewer tokens per instance on average, reflecting the shorter nature of tweets. The gold set, while smaller, offers a more reliable subset for in-depth analysis. Qualitative analysis of the gold set showed that inter-sentential CS accounts for 73.68% of instances, followed by intra-sentential CS (23.09%) and emblematic CS (3.24%). The dataset captures various linguistic features, including dialectal variations within Basque.

Limitations and Future Work

The authors acknowledge that the low-resource status of Basque and limited prior research on Basque-Spanish CS have presented challenges. The closure of the X API has also limited access to spontaneous data from Twitter. Furthermore, their corpus specifically focuses on Basque-Spanish CS and does not include other contact pairs like Basque-French.

Future work could involve expanding the corpus to include more data, potentially from other sources or language pairs. The dataset is intended to be a valuable resource for theoretical studies of code-switching, as well as for developing NLP tasks such as language identification, stance detection, and for training and evaluating code-switching models.

Summary updated

BibTeX
@inproceedings{heredia2025euskanolds,
  author = {Maite Heredia and Jeremy Barnes and Aitor Soroa},
  title = {{EuskañolDS: A Naturally Sourced Corpus for Basque-Spanish Code-Switching}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2025},
}
Figure