Code-switching
One sentence, three languages
A North African speaker may move between Darija, French, Arabic and English inside a single clause. It is ordinary register, not an edge case — and most pipelines assume an utterance has one language.
No examples are published yet.
Why it breaks
Four places a pipeline loses the meaning
Language identification returns one label
Given a mixed sentence, a detector picks whichever language has the more recognisable tokens — usually French — and the Darija clause carrying the actual request is treated as noise.
Tokenisation fragments borrowed words
A French noun with an Arabic definite article attached is not a word either vocabulary knows. Subword models split it in ways that lose the relationship between the article and the noun.
The reply comes back in the wrong register
A system that recognises “Arabic” often answers in Modern Standard Arabic. To someone who wrote half their message in French, a formal Arabic reply reads as a refusal to meet them where they are.
Evaluation sets do not contain it
Benchmarks built from monolingual corpora cannot measure any of this, so a system can score well and still fail its first real user.
What we do about it
Annotate the switch, then measure whether the meaning survived
Native speakers who use both languages daily mark where each segment begins and which language it is in. We then measure whether a system recovered the intent of the whole utterance — not of one language's worth of it.
Test your system on real mixed input
We build code-switched evaluation sets from the way your users actually write and speak, and score them with people who read both halves.