Abstract
We address the problem of Part of Speech tagging (POS) in the context of linguistic code switching (CS). CS is the phenomenon where a speaker switches between two languages or variants of the same language within or across utterances, known as intra-sentential or inter-sentential CS, respectively. Processing CS data is especially challenging in intra-sentential data given state of the art monolingual NLP technology since such technology is geared toward the processing of one language at a time. In this paper we explore multiple strategies of applying state of the art POS taggers to CS data. We investigate the landscape in two CS language pairs, Spanish-English and Modern Standard Arabic-Arabic dialects. We compare the use of two POS taggers vs. a unified tagger trained on CS data. Our results show that applying a machine learning framework using two state of the art POS taggers achieves better performance compared to all other approaches that we investigate.
Introduction
Most Natural Language Processing (NLP) tools are built on a fundamental assumption: the input will be in one language at a time. However, multilingual speakers frequently engage in Code-Switching (CS), alternating between languages (like Spanish and English) or dialects (like Modern Standard Arabic and Egyptian Arabic) within a single sentence. When a standard monolingual POS tagger encounters a foreign word or a different grammatical structure, its performance degrades sharply, creating a bottleneck for downstream tasks like machine translation or information extraction.
Methodology
The researchers explored two main architectural philosophies to address this challenge:
- Integrated (INT): Training a single tagger on various data mixes, including code-switched data (INT1), a massive merge of monolingual data (INT2), or a combination of both (INT3).
- Combined (COMB): Leveraging existing, high-quality monolingual taggers (e.g., MADAMIRA for Arabic, TreeTagger for Spanish-English). Strategies included using Language Identification (LID) to route words (COMB1/2), using confidence scores to pick a winner (COMB3), or a Machine Learning (SVM) framework (COMB4) that "stacks" the outputs and confidence scores of both taggers to predict the final tag.
A key finding in the methodology was the importance of context. As illustrated in the architecture above, feeding the whole sentence to monolingual taggers before extracting relevant tags outperformed methods that split the sentence into isolated language chunks, which often confused the taggers' syntactic understanding.
Datasets
The study utilized three primary datasets representing different types of code-switching:
- ARZ (Arabic): Egyptian discussion forums featuring Modern Standard Arabic (MSA) and Egyptian Arabic (EGY).
- Spanglish: Transcribed Spanish-English conversations.
- Bangor Miami: A large corpus of conversational Spanish-English speech involving 84 speakers.
Results and Discussion
The COMB4 (MonoLT-SVM) approach was the clear winner across all datasets. By using an SVM to "triangulate" the correct part of speech from multiple monolingual inputs, the system learns the specific strengths and weaknesses of each underlying model.
As shown in the results for the Spanglish dataset, the COMB4 approach achieved an overall accuracy of 90.61%, significantly outperforming simpler LID-based combinations. Similar trends were observed in the Arabic (ARZ) dataset, where COMB4 reached 90.56% accuracy. The most dramatic improvement was seen in the Bangor Miami corpus, where performance jumped to 96.31%, suggesting that meta-learners are particularly effective at bridging the gap between standard taggers and conversational speech.
Conclusion
This research demonstrates that we do not necessarily need to "reinvent the wheel" by annotating massive new code-switched datasets for every language pair. Instead, a machine learning framework that intelligently stacks existing monolingual resources can achieve state-of-the-art results. Future work will explore adding deep learning-based features like word embeddings and providing even more meaningful context to the underlying monolingual taggers.
Summary updated