---
title: "Learning to Predict Code-Switching Points — Solorio 2008"
description: "The paper asks whether a classifier can learn where bilingual speakers are likely to switch languages… 15 references, cited by 77 papers here."
authors: ["Thamar Solorio", "Yang Liu"]
year: 2008
venue: "Proceedings of the 2008 Conference on Empirical Methods in Natural Language Processing"
source: "https://aclanthology.org/D08-1102/"
licence: "CC BY-NC-SA 3.0 (ACL Anthology, before 2016)"
licence_url: "https://creativecommons.org/licenses/by-nc-sa/3.0/"
summary_licence: "Elamur Cosmic License"
canonical: "https://research.elamur.ai/free/en/papers/solorio-2008-learning-predict-code-switching-points/"
---
[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/solorio-2008-learning-predict-code-switching-points/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2008](https://md.research.elamur.ai/free/en/papers/2008/) / Learning to Predict Code-Switching Points

# Learning to Predict Code-Switching Points

**Authors:** [Thamar Solorio](https://md.research.elamur.ai/free/en/authors/thamar-solorio/) and [Yang Liu](https://md.research.elamur.ai/free/en/authors/yang-liu/) · **Year:** 2008 · **Venue:** [Proceedings of the 2008 Conference on Empirical Methods in Natural Language Processing](https://md.research.elamur.ai/free/en/venues/emnlp/) ([EMNLP 2008](https://md.research.elamur.ai/free/en/venues/emnlp/2008/)) · **Publisher:** [Association for Computational Linguistics](https://md.research.elamur.ai/free/en/publishers/association-for-computational-linguistics/) · **Licence:** [CC BY-NC-SA 3.0 (ACL Anthology, before 2016)](https://creativecommons.org/licenses/by-nc-sa/3.0/)

**Links:** [Publisher's page](https://aclanthology.org/D08-1102/) · [PDF](https://aclanthology.org/D08-1102.pdf) · [OpenAlex](https://openalex.org/W2013489815)

**Citations:** 131 citations (OpenAlex, 2026-10-14) · [77](https://md.research.elamur.ai/free/en/papers/solorio-2008-learning-predict-code-switching-points/cited-by/) in our library, of the 141,840 papers whose bibliographies we read

## 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
- **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.
- **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.
- **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.
- **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.
- **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.

*Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.*

## Institutions

- [The University of Texas at Dallas](https://md.research.elamur.ai/free/en/universities/the-university-of-texas-at-dallas/) — University, Richardson, United States · 47 works · 5,363 citations

📚 Shelves (4): [🖥️ Computer Science](https://md.research.elamur.ai/free/en/shelves/computer-science/) · 9,086 works · [🤖 Artificial Intelligence](https://md.research.elamur.ai/free/en/shelves/computer-science/artificial-intelligence/) · 8,889 works · [🎭 Arts and Humanities](https://md.research.elamur.ai/free/en/shelves/arts-and-humanities/) · 9,296 works · [🗣️ Language and Linguistics](https://md.research.elamur.ai/free/en/shelves/arts-and-humanities/language-and-linguistics/) · 9,206 works

🧭 Topics (1): [🌍 Multilingual & cross-lingual NLP](https://md.research.elamur.ai/free/en/topics/multilingual-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.

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@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}
}
```

- [← previous A Generative Model for Parsing Natural Language to Meaning Representations](https://md.research.elamur.ai/free/en/papers/lu-2008-generative-model-parsing-natural-language/)
- [next → Easily Identifiable Discourse Relations](https://md.research.elamur.ai/free/en/papers/pitler-2008-easily-identifiable-discourse-relations/)
- [↑ back to papers of 2008](https://md.research.elamur.ai/free/en/papers/2008/)

## References

15 references, 1 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

1. G. Demiroz and H. A. Guvenir. 1997. Classification by voting feature intervals. In European Conference on Machine Learning, ECML-97, pages 85–92. [find](https://scholar.google.com/scholar?q=G%2E+Demiroz+and+H%2E+A%2E+Guvenir%2E+1997%2E+Classification+by+voting+feature+intervals%2E+In+European+Conference+on+Machine+Learning%2C+ECML%2D97%2C+pages+85%E2%80%9392%2E)
2. 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](https://scholar.google.com/scholar?q=P%2E+Goyal%2C+Manav+R%2E+Mital%2C+A%2E+Mukerjee%2C+Achla+M%2E+Raina%2C+D%2E+Sharma%2C+P%2E+Shukla%2C+and+K%2E+Vikram%2E+2003%2E+A+bilingual+parser+for+Hindi%2C+English+and+code%2Dswitching+structures%2E+In+Computational+Linguistics+for+)
3. A. Joshi. 1982. Processing of sentences with intrasentential code-switching. In Ján Horecký, editor, COLING-82, pages 145–150, Prague, July. [find](https://scholar.google.com/scholar?q=A%2E+Joshi%2E+1982%2E+Processing+of+sentences+with+intrasentential+code%2Dswitching%2E+In+Ja%CC%81n+Horecky%CC%81%2C+editor%2C+COLING%2D82%2C+pages+145%E2%80%93150%2C+Prague%2C+July%2E)
4. J. Lipski. 1978. Code-switching and the problem of bilingual competence. In M. Paradis, editor, Aspects of bilingualism, pages 250–264. Hornbeam. [find](https://scholar.google.com/scholar?q=J%2E+Lipski%2E+1978%2E+Code%2Dswitching+and+the+problem+of+bilingual+competence%2E+In+M%2E+Paradis%2C+editor%2C+Aspects+of+bilingualism%2C+pages+250%E2%80%93264%2E+Hornbeam%2E)
5. C. Montes-Alcalá. 2005. Mándame un e-mail: cambio de códigos español-inglés online. In Luis Ortiz and Manel Lacorte, editors, In Contacto y contextos lingüı́sticos: El español en los Estados Unidos y en contacto con otras lenguas. Iberoamericana/Vervuert. [find](https://scholar.google.com/scholar?q=C%2E+Montes%2DAlcala%CC%81%2E+2005%2E+Ma%CC%81ndame+un+e%2Dmail%3A+cambio+de+co%CC%81digos+espan%CC%83ol%2Dingle%CC%81s+online%2E+In+Luis+Ortiz+and+Manel+Lacorte%2C+editors%2C+In+Contacto+y+contextos+lingu%CC%88%C4%B1%CC%81sticos%3A+El+espan%CC%83ol+en+los+Estados+Un)
6. C. Montes-Alcalá. 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](https://scholar.google.com/scholar?q=C%2E+Montes%2DAlcala%CC%81%2E+2007%2E+Blogging+in+two+languages%3A+Code%2Dswitching+in+bilingual+blogs%2E+In+Jonathan+Holmquist%2C+Augusto+Lorenzino%2C+and+Lotfi+Sayahi%2C+editors%2C+In+Selected+Proc%2E+of+the+Third+Workshop+on+S)
7. C. Myers-Scotton. 1997. Duelling Languages: Grammatical Structure in Codeswitching. Oxford University Press, 2nd edition. [find](https://scholar.google.com/scholar?q=C%2E+Myers%2DScotton%2E+1997%2E+Duelling+Languages%3A+Grammatical+Structure+in+Codeswitching%2E+Oxford+University+Press%2C+2nd+edition%2E)
8. 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](https://scholar.google.com/scholar?q=A%2E+Ng+and+M%2E+Jordan%2E+2002%2E+On+discriminative+vs%2E+generative+classifiers%3A+A+comparison+of+logistic+regression+and+Naive+Bayes%2E+In+Advances+in+Neural+Information+Processing+Systems+%28NIPS%29+15%2E+MIT+Press%2E)
9. S. Poplack. 1980. Sometimes I’ll start a sentence in Spanish y termino en español: toward a typology of code-switching. Linguistics, 18(7/8):581–618. [find](https://scholar.google.com/scholar?q=S%2E+Poplack%2E+1980%2E+Sometimes+I%E2%80%99ll+start+a+sentence+in+Spanish+y+termino+en+espan%CC%83ol%3A+toward+a+typology+of+code%2Dswitching%2E+Linguistics%2C+18%287%2F8%29%3A581%E2%80%93618%2E)
10. 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](https://scholar.google.com/scholar?q=M%2E+Rosner+and+P%2E+J%2E+Farrugia%2E+2007%2E+A+tagging+algorithm+for+mixed+language+identification+in+a+noisy+domain%2E+In+INTERSPEECH+2007%2C+pages+190%E2%80%93193%2C+Antwerp%2C+Belguim%2C+August%2E)
11. D. Sankoff. 1998a. A formal production-based explanation of the facts of code-switching. Bilingualism, Language and Cognition, (1):39–50. [find](https://scholar.google.com/scholar?q=D%2E+Sankoff%2E+1998a%2E+A+formal+production%2Dbased+explanation+of+the+facts+of+code%2Dswitching%2E+Bilingualism%2C+Language+and+Cognition%2C+%281%29%3A39%E2%80%9350%2E)
12. D. Sankoff. 1998b. The production of code-mixed discourse. In 36th ACL, volume I, pages 8–21, Montreal, Quebec, Canada, August. [find](https://scholar.google.com/scholar?q=D%2E+Sankoff%2E+1998b%2E+The+production+of+code%2Dmixed+discourse%2E+In+36th+ACL%2C+volume+I%2C+pages+8%E2%80%9321%2C+Montreal%2C+Quebec%2C+Canada%2C+August%2E)
13. H. Schmid. 1994. Probabilistic part-of-speech tagging using decision trees. In International Conference on New Methods in Language Processing, September. [find](https://scholar.google.com/scholar?q=H%2E+Schmid%2E+1994%2E+Probabilistic+part%2Dof%2Dspeech+tagging+using+decision+trees%2E+In+International+Conference+on+New+Methods+in+Language+Processing%2C+September%2E)
14. T. Solorio and Y. Liu. 2008. [Part-of-speech tagging for English-Spanish code-switched text](https://md.research.elamur.ai/free/en/papers/solorio-2008-part-speech-tagging-english-spanish/). In EMNLP-2008, Honolulu, Hawai, October.
15. I. H. Witten and E. Frank. 1999. Data Mining, Practical Machine Learning Tools and Techniques with Java Implementations. Morgan Kaufmann. [find](https://scholar.google.com/scholar?q=I%2E+H%2E+Witten+and+E%2E+Frank%2E+1999%2E+Data+Mining%2C+Practical+Machine+Learning+Tools+and+Techniques+with+Java+Implementations%2E+Morgan+Kaufmann%2E)

*Updated 24 October 2026*
