Learning to Predict Code-Switching Points
Paper · 2008 · Thamar Solorio and Yang Liu
Summary
The paper asks whether a classifier can learn where bilingual speakers are likely to switch languages in Spanish-English mixed speech. Such a model could help reduce language-model perplexity for speech recognition and support parsing of mixed text. The authors recorded about 40 minutes of conversation among three bilinguals who switch habitually, transcribed it, and annotated POS tags and switch points. This became the Spanglish data set. Every word boundary is treated as a candidate switch, and features are taken only from the one or two preceding tokens, so the method could run in real time. Naive Bayes and VFI were trained in WEKA.
Because switching is optional and no single answer is correct, the authors evaluate in two ways:
- standard precision, recall and F-measure against the transcript;
- bilingual judges rating the naturalness of artificial mixed sentences built from classifier predictions.
Naive Bayes did best overall. Its generated sentences scored close to human-written mixes and far above random switching. This is early evidence that switching behaviour can be learned from limited data.
Key points
- Spanglish data set: roughly 8k words and 922 sentences, with 239 manually marked switches. English dominates, with 576 monolingual sentences.
- Class imbalance: about 96% of boundaries are non-switches. Accuracy is therefore ignored in favour of precision, recall and F-measure under 10-fold cross-validation.
- Features (all for the preceding token):
- word form, language id and gold POS;
- BIO chunk labels from FreeLing;
- POS, probability and lemma from both the English and the Spanish Tree Tagger.
- Best configuration: Naive Bayes with a one-word context, excluding word forms and lemmas.
- Test on 30 sentences from different speakers: Naive Bayes reached an F-measure of 0.418 and VFI 0.351.
Interesting ideas
- I1. Generation-based evaluation. When a task has many acceptable outputs, the authors use predictions to generate artifacts and ask native speakers to rate them. This avoids penalising valid but unannotated answers and could suit tasks like paraphrasing or Ukrainian-Russian surzhyk analysis.
- I2. Building test items from parallel sentences. Predicted switch points are used to splice aligned monolingual versions of the same sentence. This gives a cheap way to produce controlled mixed-language test items without collecting new natural data.
- I3. Past-only features. Restricting features to preceding tokens avoids the shortcut of simply detecting the language of the next word. It also keeps the model usable for streaming applications such as ASR language models.
- I4. Noisy monolingual taggers as features. Running both monolingual taggers over mixed text, and using their confidence scores, provides signal without needing a dedicated bilingual tagger.
- I5. Random baseline in human evaluation. Including randomly switched sentences gives judges' scores a floor. This shows whether a model's outputs are genuinely better than chance rather than merely fluent-looking.
Institutions
📚 Shelves 4 Computer Science · 9,086 works Artificial Intelligence · 8,889 works Arts and Humanities · 9,296 works Language and Linguistics · 9,206 works
🧭 Topics 1 Multilingual & cross-lingual NLP · 467 works
Cite
Cite as Thamar Solorio and Yang Liu. 2008. Learning to Predict Code-Switching Points. Proceedings of the 2008 Conference on Empirical Methods in Natural Language Processing.
@inproceedings{solorio2008learning,
title = {{Learning to Predict Code-Switching Points}},
author = {Thamar Solorio and Yang Liu},
booktitle = {Proceedings of the 2008 Conference on Empirical Methods in Natural Language Processing},
year = {2008},
doi = {10.3115/1613715.1613841},
url = {https://doi.org/10.3115/1613715.1613841}
}References
- G. Demiroz and H. A. Guvenir. 1997. Classification by voting feature intervals. In European Conference on Machine Learning, ECML-97, pages 85–92. find
- P. Goyal, Manav R. Mital, A. Mukerjee, Achla M. Raina, D. Sharma, P. Shukla, and K. Vikram. 2003. A bilingual parser for Hindi, English and code-switching structures. In Computational Linguistics for South Asian Languages –Expanding Synergies with Europe, EACL-2003 Workshop, Budapest, Hungary. find
- A. Joshi. 1982. Processing of sentences with intrasentential code-switching. In Ján Horecký, editor, COLING-82, pages 145–150, Prague, July. find
- J. Lipski. 1978. Code-switching and the problem of bilingual competence. In M. Paradis, editor, Aspects of bilingualism, pages 250–264. Hornbeam. find
- C. Montes-Alcalá. 2005. Mándame un e-mail: cambio de códigos español-inglés online. In Luis Ortiz and Manel Lacorte, editors, In Contacto y contextos lingüı́sticos: El español en los Estados Unidos y en contacto con otras lenguas. Iberoamericana/Vervuert. find
- C. Montes-Alcalá. 2007. Blogging in two languages: Code-switching in bilingual blogs. In Jonathan Holmquist, Augusto Lorenzino, and Lotfi Sayahi, editors, In Selected Proc. of the Third Workshop on Spanish Sociolinguistics, pages 162–170, Somerville, MA. Cascadilla Proceedings Project. find
- C. Myers-Scotton. 1997. Duelling Languages: Grammatical Structure in Codeswitching. Oxford University Press, 2nd edition. find
- A. Ng and M. Jordan. 2002. On discriminative vs. generative classifiers: A comparison of logistic regression and Naive Bayes. In Advances in Neural Information Processing Systems (NIPS) 15. MIT Press. find
- S. Poplack. 1980. Sometimes I’ll start a sentence in Spanish y termino en español: toward a typology of code-switching. Linguistics, 18(7/8):581–618. find
- M. Rosner and P. J. Farrugia. 2007. A tagging algorithm for mixed language identification in a noisy domain. In INTERSPEECH 2007, pages 190–193, Antwerp, Belguim, August. find
- D. Sankoff. 1998a. A formal production-based explanation of the facts of code-switching. Bilingualism, Language and Cognition, (1):39–50. find
- D. Sankoff. 1998b. The production of code-mixed discourse. In 36th ACL, volume I, pages 8–21, Montreal, Quebec, Canada, August. find
- H. Schmid. 1994. Probabilistic part-of-speech tagging using decision trees. In International Conference on New Methods in Language Processing, September. find
- T. Solorio and Y. Liu. 2008. Part-of-speech tagging for English-Spanish code-switched text. In EMNLP-2008, Honolulu, Hawai, October.
- I. H. Witten and E. Frank. 1999. Data Mining, Practical Machine Learning Tools and Techniques with Java Implementations. Morgan Kaufmann. find
Updated
This page in Markdown → https://md.research.elamur.ai/free/en/papers/solorio-2008-learning-predict-code-switching-points/