Elamur Research

Mixed Language and Code-Switching in the Canadian Hansard

Paper · 2014 · Marine Carpuat

Summary

A bilingual parliament can publish proceedings in both languages even when a speaker uses only one. Finding where a speaker actually changes languages therefore requires looking past the existence of a translation and examining the words recorded in the original. Marine Carpuat’s study asks whether those changes can be found in the Canadian Hansard, a collection of parliamentary proceedings available in English and French. The collection records the original language of each intervention and pairs the transcribed speech with a direct translation. These features let the study look for passages that contain words from both languages and then examine which passages show speakers switching languages.

The detection procedure first looks for a frequent word associated with the other language and for wording shared with the translation. A word-level tagger then reads the selected sentences and assigns a language to each word in context. A bilingual annotator checks whether the selected passage really is mixed, whether the tagger has marked the right boundaries, and what the speaker expresses in the other language. These questions matter separately. A detector can identify a genuinely mixed sentence while putting the start of an inserted expression in the wrong place. A correct language label can also mark an organization’s name or a borrowing, where a speaker has adopted an expression into ordinary use, without settling whether the speaker switched languages.

In the manual review of passages flagged by the tagger, detection precision was 98.4% for originally French committee passages and 96.8% for originally French House passages. The corresponding figures for originally English passages were 72.6% and 45.9%. Common words with the same spelling in both languages accounted for most false alarms in the reviewed English material. Finding the full boundaries was harder than recognizing that a passage was mixed. A separate, small evaluation also found that the detector recovered few of the known mixed passages in originally French speech, so the high precision on flagged passages gives a limited picture of coverage.

The reviewed passages establish that code-switching occurs in the record. Speakers switch to quote someone, use a familiar expression, or address an audience with a greeting or another courtesy formula. In the reviewed committee material, idioms and other multiword expressions were prominent among the English insertions in French speech, while courtesy formulas were especially visible among the French insertions in English speech. The paper treats that difference as a question about how the languages are used in Parliament, with several possible explanations. The paired translations also show why the function of an insertion matters. A translator may retain a quotation, preserve the wording of a term under discussion, or adjust a form of address to match the conventions of the translated record. These are distinct decisions for machine translation.

Deep dive: Mixed Language and Code-Switching in the Canadian Hansard

How a study of the Canadian Hansard used English and French translations to find code-switching in parliamentary speech and assess detection errors. · about 34 minutes to read

The problem and its context

Language choice in a bilingual record

The paper begins with a question about how people use the languages available to them inside a multilingual institution. In the Canadian House of Commons, speakers can use either French or English. A meeting can therefore contain both languages for several reasons. Speakers can take turns in different languages, someone can make separate interventions in different languages, and a speaker can change languages within a single contribution. The study uses code-switching for alternation by a speaker in the course of a conversation. Its search concentrates on alternation visible within a segment of the transcript, where the switch can be located in a particular stretch of words.

The distinction between a bilingual meeting and a mixed segment determines what the researcher must observe. Meeting metadata can show that business was conducted in both languages. A speaker’s name attached to interventions in French and English can show that the record associates that name with both. To find a switch of the kind studied here, the researcher needs evidence from inside an intervention. A brief insertion may matter to the people listening even though the intervention still has a clear main language. The search thus moves from an institutional property, the presence of both languages, to an event in someone’s speech.

The setting made the question open. The House and its committees produce public proceedings, and some contributions are prepared speeches. The paper expected this formal material to contain fewer switches than settings such as informal conversation or online writing. Parliament also provides opportunities to use both languages, and the bilingual operation of the House gave the researcher reason to expect that some changes of language would appear. The paper cites a survey in which candidates reported different degrees of bilingualism across parties and expressed differing views about language and identity. These observations motivate the search. They give no count of switches in the parliamentary record.

The record holds several speaking situations within the same institution. A prepared address can give a speaker time to decide how to quote a source or name an organization. An interactive committee discussion can involve addressing witnesses, responding to a phrase just used by someone else, or clarifying the wording of a term. The paper does not label individual switches by the degree of preparation behind them. The variety of situations explains why the researcher asks what the inserted language is doing, in addition to asking where it occurs. The function is something the surrounding words may reveal after the passage has been found.

The paper places this inquiry alongside earlier fieldwork on language choice in European Union institutions. That work observed multilingual interaction directly. In the Hansard study, the evidence is the written record of proceedings and the information that accompanies it. The attraction of this approach is that a searchable collection can lead a researcher to examples across many meetings. Direct observation and a searchable record provide different views of the same broad subject. A transcript supports close attention to recorded wording, while the setting in which people spoke may offer cues that the written record leaves out.

A new question for a familiar kind of corpus

The Canadian Hansard was already important to translation research. A parallel corpus pairs passages in one language with corresponding passages in another. The electronic bilingual Hansard made early statistical work on translation possible, as the paper notes in its discussion of A Statistical Approach to Machine Translation. Proceedings from other institutions supplied parallel material too. The paper points to translations from the Hong Kong Legislative Council, the European Parliament, and the United Nations. The United Nations example is MultiUN.

A pairing can carry information other than the words a translator chose. Earlier methods used aligned text to transfer linguistic annotation, the addition of labels that describe properties of a text, from a language with more resources to one with fewer. A tool can analyze a passage in one language and use the alignment to help assign labels to the matching passage in another. The paper situates this practice through work on multilingual text analysis by projection and bilingual graph-based projections for part-of-speech tagging.

Carpuat uses correspondence between the texts to ask a different question. If the transcript of an originally French passage contains an English phrase, some of that phrase may survive unchanged when the rest is translated into English. The target text can thus help identify words whose presence in the transcript deserves a closer look. The language metadata also establishes which side records the original intervention. That distinction gives a match a direction. An English expression shared across an originally French passage and its English translation might be evidence of a switch into English by the speaker. The same surface match has to be interpreted differently if English was the original language.

The paper favors the Hansard’s direct French–English translations for this reason. It contrasts them with a possible arrangement in a collection of European Parliament proceedings, where a French and an English sentence could correspond through a translation chain that began in German. In that arrangement neither available sentence necessarily records what the speaker said, and successive translations can affect the wording. Here, the record identifies the original language and the other version translates directly from it. A researcher has a clearer basis for examining how a translator dealt with an insertion and whether its wording survived.

What earlier detection studies looked for

The code-switching studies discussed in the paper approached mixed language from several directions. Some looked for the points at which a speaker or writer changes languages. One early study used transcribed conversation, the setting of Learning to Predict Code-Switching Points. The paper also situates itself among studies of Arabic and of informal material found online. The Hansard adds an institutional record with direct translations and original-language labels, so the available evidence differs as much as the setting does.

Another line of research treated an entire document as the unit of language identification. A document detector can ask whether several languages are present and which ones they are. The paper describes an approach that represents a document as a mixture and can work without being told in advance which languages occur in it. The Hansard task begins with the two languages already specified and asks for labels at individual word positions. These are different outputs. A document-level answer might establish that a passage contains French and English, while the parliamentary analysis also needs to tell where each language begins and ends. The document-level approach is described in Automatic Detection and Language Identification of Multilingual Documents.

For the word-level task, the paper adopts King and Abney’s technique for learning from single-language text. Their approach matters here because the Hansard has labels for the original language of interventions, but the paper began without a set of mixed passages marked word by word. The method can learn from examples of ordinary French and English and apply what it learns to sequences in which the languages alternate. Parliamentary language poses its own test of that transfer. The two languages share many written forms, the proceedings include names from various origins, and the paper expects most segments to use only their original language.

Earlier work at the intersection of translation and mixed language had also considered tasks where the mixture arose for a particular reason. The paper mentions disambiguating words in mixed-language queries, helping learners translate short fragments, and handling words coined by bilingual writers in email. It also describes research that used switch detection to improve word alignment and thereby improve translation quality. The Hansard study asks a prior question about an existing collection used for translation. It looks for the mixture in transcribed institutional speech and examines the different jobs that speakers and translators give it.

The method, step by step

From meeting files to aligned sentences

The collection contains manual transcriptions and translations of House of Commons proceedings and committee meetings from 2001 to 2009. The paper uses Hansard for the overall collection and also for the House proceedings when distinguishing them from the committee partition. The distinction matters when interpreting results because the paper evaluates the two partitions separately. Each meeting file begins with information about the event and contains a sequence of fragments. A fragment holds a stretch of speech attributed to one person and can extend over several paragraphs.

The fragment is also the unit handled by translators. Its original-language label says whether the text was originally in French or English and determines the direction of translation. The paper treats that manually assigned label as the reference for the primary language of each sentence in the fragment. A sentence can inherit a French original-language label while containing an English expression. The label supplies the direction in which to search for mixing. It does not supply a word-by-word account of the sentence or a lasting description of the speaker’s language abilities.

The corpus preparation follows procedures used for translation data. Sentence segmentation divides each fragment into sentences, and alignment connects material that corresponds across the original and translated versions within the fragment. Tokenization then separates running text into units such as words and punctuation for comparison and tagging. This processing produced 8,194,055 parallel sentences. After setting aside subsets reserved for translation evaluation, the study worked with 8,160,352 parallel segments. The paper says the raw and processed corpus are available on request.

The resulting unit of analysis has three pieces of information. It has words transcribed from an intervention, an original-language label inherited from the fragment, and a corresponding translation. The label establishes what counts as the other language for a given segment. The translation supplies wording against which the original can be checked. The detector returns to the words in the original when it decides whether that passage contains a mixture. Without this separation of roles, evidence from an ordinary translation could be mistaken for language used by the speaker.

Finding and reviewing mixed language in the Canadian Hansard

The steps in order.

Finding and reviewing mixed language in the Canadian HansardStep 1: Align transcribed sentences with their direct translations1. Align transcribed sentences with their direct translationsStep 2: Read the original language from fragment metadata2. Read the original language from fragment metadataStep 3: Build frequent-word lists and remove shared entries3. Build frequent-word lists and remove shared entriesStep 4: Select sentences using vocabulary and translation overlap4. Select sentences using vocabulary and translation overlapStep 5: Train a word tagger on likely monolingual samples5. Train a word tagger on likely monolingual samplesStep 6: Tag the words in selected sentences6. Tag the words in selected sentencesStep 7: Review detected passages for boundaries and function7. Review detected passages for boundaries and function

Using common words and shared wording to select candidates

A mixed-language segment is defined operationally by the presence of words from the other language. In an originally French segment, an English word can make the segment mixed. In an originally English segment, a French word can do the same. The paper confines the detector to this pair. It mentions occasional material in languages such as Spanish and Italian, but the task specifies French and English, and the tagger is used to distinguish between them.

The candidate search begins with the top 1000 words by frequency on each side of the parallel corpus. These lists come from the French and English sides, so a side includes text in the language in which it is published and can contain both originals and translations. The method removes entries present on both lists. An example is on, which can serve as a French pronoun or an English preposition. Its frequency in one list gives little reason to flag an original segment when it is also frequent enough to appear in the other.

The comparison is between the top lists, so removal has a specific meaning. A surviving word can appear in both languages if it is common enough to make one list and falls below the cutoff in the other. The list is a practical clue from corpus frequency. It does not define a vocabulary exclusive to either language. This distinction later helps explain how a pipeline with a shared-word filter can still have difficulty with frequent forms that English and French have in common.

The second signal comes from the translation. Suppose a speaker uses an English expression inside an otherwise French sentence. A translator preparing the English version may keep that expression in its original wording while translating the material around it. An identical word in the two aligned segments is then evidence that the translator may have carried it across. The paper excludes numbers, punctuation marks, and acronyms from the overlap check. These items can be repeated across the pair without providing the sort of lexical evidence the selection rule is designed to use.

For an originally French sentence to become a candidate, it must contain at least one word from the filtered English list, and at least two words in the original must overlap with the English translation. The method applies the corresponding conditions to originally English sentences, consulting the filtered French list and the French translation. The two requirements work together at the sentence level. The paper does not require every overlapping word to belong to the inserted expression. A segment can satisfy both tests while the words responsible for one test differ from those responsible for the other.

The rule thus narrows a large search by asking for a clue in the original and supporting evidence from its paired text. It yields a set of sentences worth tagging, each with its original and its alignment still identifiable. A name repeated by a translator can contribute to overlap. A frequent word can also be ambiguous in context. Cases like these are reasons to assign languages to the words before treating a selected sentence as a positive prediction. Conversely, a genuine insertion can be missed at selection if it leaves too little overlap or contains no word that survives the frequency filter.

Teaching the tagger from likely single-language text

Once a sentence has been selected, the next task is sequence labeling. Each word receives a language label, and the tagger considers the ordered sequence instead of looking up each word in isolation. The paper uses King and Abney’s conditional random field, or CRF. A CRF assigns scores to possible label sequences given the observed words. This lets evidence about an individual word and about neighboring label decisions contribute to the same sentence-level prediction. The relevant output here is an ordered series of English and French tags.

King and Abney train their CRF with generalized expectation criteria. In this use of weak supervision, expectations derived from single-language material guide learning when examples of mixed text with a correct label for every word are unavailable. The Hansard study reuses their approach. It does not introduce a new CRF or supply new equations for the learning criterion. Its method contribution is to put that word tagger inside a procedure that uses the parallel collection both to select the sentences it will see and to obtain training samples.

The training selection uses aligned wording in the opposite way from candidate selection. A sentence with no vocabulary overlap with its translation is assumed to be single-language for the purpose of constructing a training sample. The reasoning is that a phrase in the target language, if already present in the original, might reappear in the translation and produce overlap. The absence of shared words provides a way to choose plausible single-language material at scale. The paper presents this as an assumption. A translator could rephrase a genuine insertion, so the absence of matching words cannot verify the language of every word.

From the resulting pool, the study randomly selects 1000 French segments and 1000 English segments. The English sample contains about 21k word tokens and 4k word types. The French sample contains about 24k word tokens and 4.6k word types. A token is an occurrence in running text, while a type is a distinct form counted across those occurrences. The segments carry primary-language labels from the transcript, and their lack of overlap is the criterion used to treat them as single-language training material.

The paper explains the sample size by reference to King and Abney’s earlier experiments. Those experiments covered 30 languages, some with scarce resources, and used much smaller samples for the low-resource languages. Their learning curves suggested that accuracy leveled off quickly. In the Hansard, drawing larger samples was easy because the collection contains abundant material. The paper does not present a Hansard learning curve, so the sample size describes the training setup and the availability of data.

The trained CRF is applied to each candidate sentence. If it assigns the other language to words in the original, the sentence becomes a positive prediction for mixed-language detection. A stretch of consecutive words assigned to the other language also gives a predicted insertion and its boundaries. This produces two outputs the researcher can inspect. The sentence label can be right even when a token immediately before or after the insertion has been placed on the wrong side of a boundary.

Checking the prediction and interpreting the insertion

The paper relies on a bilingual human annotator to assess the output. The first judgment concerns whether the passage genuinely contains both languages. The second asks whether the boundaries are correct. This is a judgment about the predicted segmentation of the sentence as a whole. The third asks what the words in the other language express. The annotator could describe a quotation, an idiom, an organization’s name, or another function seen in the material. Categories were allowed to emerge from the passages under review.

One example illustrates why the boundary check matters. In a French passage containing an English expression about coming out of the closet, the tagger assigns the last word of the preceding French expression to English as well. The annotator agrees that the sentence contains English and identifies the nature of the English material. The span nonetheless begins too early. Another example, a French contribution containing an English quotation attributed to the prime minister, receives agreement on both the presence of mixed language and its boundaries. The sentence-level result is the same in both examples, while the output available for studying the insertion differs.

The manual questions also clarify the division of labor between detection and interpretation. The automatic stages supply candidates and predicted languages. The annotator can read the sentence to determine whether the putative insertion is an established borrowing, the name of an organization, a quotation, or a conversational expression. An organization’s official name can remain in its original language inside a sentence with a clear primary language. A quotation can preserve another person’s wording. The procedure can point to both, while their significance for code-switching comes from examining the surrounding speech.

Experiments and results

The distribution of languages before tagging

The corpus profile establishes what the detector encounters. The paper reports that English accounts for 80% of the original-language segments. In the committee partition, 4,316,239 segments are originally English and 915,354 are originally French. In the House partition, the corresponding counts are 2,189,792 and 738,967. French is more prominent relative to English in the House partition than in the committee partition. That distribution describes the starting material, before any decision about whether a particular sentence contains both languages.

To examine the presence of both languages across proceedings, the paper groups the material into meetings using the document-title metadata. It reports French and English segments in 4740 committee meetings and 927 House meetings. These are meetings in which both languages occur in the record. Someone who speaks French after another person speaks English can produce such a record without creating the kind of within-segment switch the tagger seeks.

The speaker-level analysis associates a speaker name with the original-language labels of that name’s fragments. Under this operational definition, a name associated with both types of fragment counts as bilingual. The paper reports 56% for House speakers and 26.5% for committee speakers. It relates the contrast to the different populations appearing in the records. House speakers are mainly parliamentarians and ministers, while committees hear from a wider range of people. This measure describes recorded use under a name, and the paper warns that different people with the same name can be counted as one bilingual speaker.

The language distribution matters for the experiment because a detector of mixed language is searching for an exceptional event among many passages in the primary language. Assigning the other language to an ambiguous word can turn an entirely single-language segment into a false positive. In this setting, evaluating a system by how frequently it agrees with the most common kind of segment would reveal little about how well it finds useful examples. The paper evaluates positive predictions directly and uses a separate sample to examine how many annotated positives the system recovers.

What the broader manual check says about coverage

The first evaluation compares automatic decisions with the bilingual annotator’s judgments on a small collection of segments in each original language. The paper describes the intended sample as 100 segments per original language. The reported confusion matrices contain 139 originally English segments and 122 originally French segments. A confusion matrix crosses what the system predicted with what the annotator judged. Its cells distinguish correct detections, false alarms, missed mixed segments, and correct rejections.

Precision asks how often a positive prediction is correct. The relevant pool is the set of passages the tagger flags as mixed. Recall asks how often a genuinely mixed passage is detected. For recall, the relevant pool is all positives judged by the annotator in the evaluation sample, including the ones the tagger misses. A detector can produce a small set of highly credible passages and still leave many mixed passages unidentified. The first evaluation provides information about both quantities because it includes segments predicted to be negative.

For originally French segments containing English, the annotator found 16 positive passages. The tagger detected 3 of these and missed 13. There was 1 false alarm and there were 105 correct negative decisions. The paper reports 75% detection precision and 18.75% recall in this sample. Those figures rest on only 4 positive predictions, a fact the paper emphasizes when discussing the result. The misses are direct evidence that the detector’s yield covers only part of what a person can find in originally French material.

The originally English matrix calls for a careful reading. It shows 21 correctly flagged passages, 8 false alarms, 1 missed positive, and 109 correctly rejected passages. The table and the accompanying discussion print 95.4% as precision and 72.4% as recall. The metric labels appear to be interchanged. There are 29 positive predictions, the denominator for precision, and 22 annotated positives, the denominator for recall. The printed 72.4% aligns with the precision calculation from those counts, while the printed 95.4% is assigned to recall by the counts. The rows and columns show the substantive result independently of the labels. Within this sample, the English-original detector found almost all the annotated positives and generated several false alarms.

The reversal matters because the paper’s prose also describes recall as lower than precision for both languages. That description fits the French-original matrix. The English-original cells show the opposite ordering under the usual meanings of the metrics. The larger review of positive predictions supplies separate evidence about the frequency of false alarms in English. Its precision estimates can be reported on their own terms without treating the printed English-original metric labels in the first evaluation as settled.

How many segments the stages returned

The full-corpus counts show how the automatic stages narrow the material. In the committee partition, candidate selection forwarded 62,069 originally English segments and 13,278 originally French segments to the word tagger. The tagger returned 7,713 originally English segments and 317 originally French segments as positive predictions. In the House partition, candidate selection forwarded 42,180 originally English segments and 13,558 originally French segments. The tagger returned 3,993 originally English segments and 164 originally French segments as positives.

These figures are counts of what each stage outputs. A selected sentence is one that met the vocabulary and overlap conditions. A tagged positive is one where the CRF found evidence of words in the other language. Even the latter count includes false alarms, and some genuine examples may have been screened out at either stage. The paper reports more than 10,000 tagged passages to draw from. The value of that scale is that it makes a review of different uses possible even though only a small part of the corpus is flagged.

The count of candidates shows the amount of material passed to the more detailed stage. It cannot serve as the precision of the selection rule, since the paper does not manually assess every selected candidate. Likewise, how many candidates the tagger rejects cannot tell us which ones were rejected correctly. The baseline for the reported detection judgments is the annotator’s reading. The paper reports a single pipeline and compares its outputs across original languages, corpus partitions, and levels of judgment. It gives no performance comparison against another complete detector on the same Hansard sample.

What the review of flagged passages establishes

The first manual evaluation produced few confirmed examples, especially for originally French segments. To get more material for studying the phenomenon, the paper drew a random sample of 60+ positive predictions for each combination of original language and corpus partition. The annotator again checked the detection, judged the boundaries, and described the inserted content. Since this sample was drawn from passages already tagged positive, it estimates how much of the flagged material is usable. It gives no estimate of recall among all corpus segments.

Mixed-language detection precision on flagged Canadian Hansard segments

Positive predictions are more reliable in originally French passages in both partitions.

Mixed-language detection precision on flagged Canadian Hansard segmentsHouse proceedings, English original: 45.9House proceedings, English original45.9Committees, English original: 72.6Committees, English original72.6House proceedings, French original: 96.8House proceedings, French original96.8Committees, French original (this paper): 98.4Committees, French original (this paper)98.4
The numbers
System or settingDetection precision %
House proceedings, English original45.9
Committees, English original72.6
House proceedings, French original96.8
Committees, French original (this paper)98.4

The precision pattern is consistent across the two partitions. In the review of tagged committee passages, 98.4% of the predictions for French originals and 72.6% of those for English originals were judged to contain mixed language. In the House review, the figures were 96.8% for French originals and 45.9% for English originals. The French-original estimates support the paper’s characterization of high precision in that direction. The English-original estimate varies substantially across the partitions, with the House output requiring more manual rejection.

The annotation identifies a common source of English-original errors. Forms such as province, Premier, and plus occur in both languages, and the tagger sometimes reads them as French when they serve an English role in the sentence. An ambiguous spelling can occur in a selected sentence even if neither the spelling nor its particular occurrence was decisive at selection. The eventual sentence-level decision depends on what the tagger does with the candidate as a whole. This helps explain why the frequency filter removes some sources of ambiguity while shared forms remain prominent among the final errors.

Exact language-boundary precision in the Canadian Hansard positive-prediction review

The strongest boundary result is for originally French House proceedings.

Exact language-boundary precision in the Canadian Hansard positive-prediction reviewHouse proceedings, English original: 28.6House proceedings, English original28.6Committees, English original: 44.4Committees, English original44.4Committees, French original: 67.7Committees, French original67.7House proceedings, French original (this paper): 75.4House proceedings, French original (thispaper)75.4
The numbers
System or settingSegmentation precision %
House proceedings, English original28.6
Committees, English original44.4
Committees, French original67.7
House proceedings, French original (this paper)75.4

The boundary figures describe a binary judgment on the predicted language segmentation of a sentence. In the English-original groups, segmentation precision was 44.4% in the committee review and 28.6% in the House review. In the French-original groups, it was 67.7% for committees and 75.4% for the House. This measure requires the boundary to be correct. It is different from an accuracy score that gives partial credit for each word tagged correctly. When the model finds most of an insertion and includes an adjacent word in error, the insertion may still be easy for a reviewer to recognize, while the segmentation judgment records a failure.

The two charts describe different kinds of usable output. For a researcher who will read and interpret each selected sentence, a correct positive flag can be enough to locate an example. For an analysis that uses the extracted phrase as its input, the edges of the phrase also matter. The House French-original group has the highest reported segmentation precision, while the committee French-original group has the highest reported detection precision. The groups with the most reliable flags and the most reliable boundaries therefore differ even within the same original language.

What the ablations show

The paper reports no component ablations. Its main analyses compare original languages, corpus partitions, and annotation judgments, then examine what speakers express in the passages judged to be mixed. Those comparisons describe where the pipeline succeeds and fails, and what the annotated sample contains. Estimates of the individual contributions of the vocabulary filter, translation overlap, and the CRF would require running configurations that change those components and evaluating them on common material.

Comparing the two directions of detection

The procedure is designed symmetrically. It consults a frequent-word list in the other language, looks for overlap with the translation, and applies the same kind of sequence tagger in either direction. The results differ by original language. In the review of positive predictions, French originals produce more reliable flags than English originals in both partitions. This reveals a practical asymmetry even though the selection rules have the same form.

The original-language comparison becomes more informative through the error descriptions. The study finds that most false positives in the reviewed English material are attributable to common forms shared with French. The problem is visible at the token level. The surface form can provide evidence for a French tag, while the sentence supports an English reading. Under the sentence-level rule, a wrong French tag can be sufficient for a positive prediction. Thus a local ambiguity can account for an error in the broader decision about whether a segment is mixed.

The comparison also gives different evidence for false alarms and omissions. French-original predictions were highly reliable in the positive-only review. The broader evaluation of French originals contains many annotated positives that received a negative prediction. Together, those findings describe the pipeline’s behavior in that direction. It finds a usable collection of examples, and a researcher looking for all switches would need evidence about the segments the procedure leaves behind. The paper does not locate every omission at a particular stage, so the results cannot say whether candidate selection or sequence tagging accounts for most of the misses.

Comparing the House and committee partitions adds another qualification. Within English originals, the samples have different precision, and the boundary evaluation favors the committee material. Within French originals, the positive-prediction precision is high in both partitions, and the strongest segmentation result is in the House material. The partition is a property of the data, not a change to the detector. These are comparisons across applications of the pipeline to different material. They leave open which properties of the text, the speakers, or the samples contributed to the differences.

Comparing the segment decision with the marked span

The paired annotation judgments let the paper inspect a failure that a segment-only evaluation would miss. Suppose the detector correctly recognizes an English insertion in French speech. It can still include a preceding French word, cut off the last English word, or place a return to French at the wrong position. The annotator’s yes or no decision about mixed language and the separate judgment on the span register these outcomes differently. In the paper’s idiom example, the sentence is a useful find even though extracting the predicted English span would carry a French word with it.

This comparison also indicates what the word tagger contributes to later analysis. It supplies a plausible location for the interesting material inside a retrieved sentence, which helps a reviewer see what prompted the flag. The annotated boundaries show how often that location can be used as delivered under the study’s strict judgment. The paper notes that the edges are often troublesome, especially around switches. The result is evidence about output quality. It does not isolate whether the mistakes come from the evidence about individual words, the way neighboring tags are scored, or features of the text around a switch.

A further distinction concerns what can be learned from the output counts. The tagger returns fewer positives than the candidate filter passes to it, but the two stages make different decisions. The filter asks whether the sentence merits inspection, while the tagger proposes token labels from which a mixed-language decision follows. The counts establish the workload after each stage. They leave the accuracy of candidate selection alone unmeasured, and they give no answer about how the tagger would perform if applied to every segment without the filter.

What speakers use the other language for

Once a passage is confirmed as mixed, the annotator considers the inserted material in context. The paper distinguishes such uses as quotations, discussion of translations, courtesy formulas, idioms and other multiword expressions, titles, organization names, and borrowings. A multiword expression is a group of words used together as a recognizable unit. An idiom is a case where the conventional meaning of the expression can extend beyond a literal reading of its parts. An established borrowing can be familiar in the surrounding language even when its historical source is another language. These distinctions help the study discuss what a sentence-level language label can encompass.

The examples make the categories concrete. In an originally French contribution, a speaker can cite an English statement made by the prime minister or refer to an English-language book by its title. In an originally English contribution, a speaker can mention Pascal’s idea of life as a wager and insert the French expression associated with it. A contribution can also discuss a correction to the French wording of a text by citing the original and replacement words. That last use makes the wording itself the subject of the intervention. It differs in function from greeting a witness or taking up an idiom, even when each produces a visible change of language.

The comparison of categories plotted for the committee material shows a difference in the examples recovered for the two original languages. Idioms and other multiword expressions account for more than 40% of the English uses in the originally French segments. The paper reports no French idiom examples in the corresponding distribution for originally English segments. In the original English texts, over 30% of the instances correctly identified as mixed use are politeness formulas. The corresponding share of politeness formulas in the French originals is fewer than 5%.

The absence of French idioms in that committee distribution has a specific scope. The paper’s wider illustration of categories includes French phrases in English contexts and distinguishes examples it treats as idioms or multiword expressions from others it treats as borrowings. An English passage can contain an expression like fait accompli without the annotator treating it as a new switch into French in the same way as an extended French insertion. The distribution summarizes the checked committee material used for the figure. The example inventory illustrates functions and includes material beyond what a single plotted category comparison can establish.

The paper considers several interpretations of the broader directional pattern. It raises the possibility that switches by French speakers reflect greater command of English, and it also proposes that speakers use the other language for different purposes in parliamentary settings. The observed categories offer reasons to investigate those possibilities. Courtesy formulas are recognizable responses to particular social situations, for example, while a quotation can preserve something said in another language. The experiment does not measure the speakers’ proficiency or control the situation in which a phrase is used, so the category differences leave the explanations open.

What the translations do with the insertion

The parallel sentences let the author ask a further question after finding an example. How does the translated record represent a phrase that was already in the target language? The paper observes that English idioms, quotations, and names in French speech can sometimes be carried directly into English. The translated words around them change, while the inserted expression can remain available in its original form. This is the translation behavior that makes vocabulary overlap useful as a search criterion.

Other cases involve a different translation decision. A passage that discusses how a particular French word should be expressed depends on the identity of that word. Translating the word under discussion can remove the distinction the speaker is making, so preserving it can be necessary for the translated passage to convey the point. A courtesy formula can call for a conventional form of address in the target record. The paper observes that reference translations may adjust titles and capitalization, even when copying the English wording from the French original would leave the intended greeting understandable.

This analysis connects the function of the insertion to the treatment of the aligned text. The same surface operation, copying words, can preserve a quotation or preserve the subject matter of a discussion about wording. In a greeting, a different rendering can preserve the social function and follow the conventions of the translated record. The paper draws these distinctions from human translations already in the corpus. It does not run a translation experiment that compares the effect of different treatments.

Limitations

Limits identified in the paper

The author calls for larger sets of manually annotated examples. At the start of the study, the Hansard lacked reference labels for code-switching and word-level language identification. The evaluation therefore depends on small samples assessed by a bilingual annotator. The precision estimates refer to those groups, and the French-original recall result rests on few detected positives. The study establishes that accurate finds are possible and supplies verified examples for closer analysis. It leaves the overall coverage of the detector across the corpus uncertain.

The paper also identifies word boundaries as a remaining technical problem. Its strict segmentation judgment shows that the presence of a switch is often easier to detect than every word it covers. This limits analyses that rely on the automatic extraction of the phrase itself. A reviewer can correct an overextended or truncated span while reading the sentence. An automatic procedure that consumes the predicted span as data would inherit the boundary error. The paper’s proposed uses of the corpus for further study therefore depend in part on improving the labels or validating them manually.

The task covers French and English. The paper mentions other languages in passing and treats the observed occurrences as rare. These observations show that the assumption of exactly two possible languages is a choice about the task. The two-language evaluation gives no basis for assessing how well the procedure would handle a segment containing a third language. The same scope applies to the study’s definition of positive detection. It is built around a contrast between the original language and its counterpart in this corpus.

Transcription imposes another limit named by the author. A written record can leave out pauses, repetitions, and other disfluencies. The paper says it is unclear whether this affects mixed passages differently from passages that stay in one language. A recorded switch is evidence about wording preserved in the transcript. Questions about how the speaker hesitated before it, repaired it, or performed it in conversation can require details the transcription procedure does not retain.

The speaker analysis is limited by its use of names. As the paper notes, namesakes who speak different languages can be combined into one apparently bilingual person. The operational definition also depends on what speakers do in this particular record. A speaker may be associated only with French interventions even if they speak English in other settings. The reported percentages describe recorded language use under the paper’s grouping rule. Assessing personal proficiency would require evidence about individuals and what they can do in each language.

Finally, the author treats the observed uses of code-switching as the start of a comparison, both between groups in the Hansard and between Parliament and informal settings. The paper extracts examples in one institutional setting and draws on prior work for context. It provides no matched analysis in which the same annotation procedure is applied to parliamentary and informal speech. The initial expectation about formality remains a motivating hypothesis, and the examples show that formality still leaves room for switching.

Further limits visible in the design

The original-language label comes from the fragment and serves a translation workflow. It provides a valuable point of reference, but a fragment can include several sentences and can contain both languages. Using that label for all its sentences imposes a single reference language across the fragment. A full sentence in the other language can therefore count towards mixing relative to the fragment even though the sentence itself is internally single-language. The study’s operational target depends on the relationship between a sentence and the intervention it came from. That matters when comparing its output with a task that defines mixing completely within the sentence.

Selection can favor certain kinds of switch. An insertion that contains frequent words and survives verbatim in translation is well positioned to meet the observed criteria. An uncommon term can fail the frequency test. A short but genuine insertion may be the only overlapping word, leaving the sentence short of the overlap requirement. A translation that rephrases the inserted material can remove the evidence the selection rule expects. Since the paper describes different translation treatments for different functions, the detected category distribution can reflect both what speakers do and what translators preserve in matching words.

The same premise affects training in another way. Choosing sentences with no overlap gives the researcher a convenient pool of likely single-language examples. Genuine insertions that are rephrased in translation can enter that pool. Single-language sentences containing proper names preserved across versions can be left out of it. The paper gives the size of the training samples, but it provides no manual estimate of their purity and no comparison with samples selected by another rule. The setup establishes how the training data were obtained. Its consequences for the learned token decisions remain unmeasured.

The direction of the observed errors also needs to be kept separate from the direction of the underlying behavior. The larger positive-only review gives evidence that English-original flags include many false alarms, particularly in the House partition. The output count in that direction therefore includes a substantial number of sentences without a genuine switch. Meanwhile, the broader French-original check shows many misses. Comparing raw predicted counts across languages cannot establish which group of speakers switches more often. An estimate of that kind would need to account for erroneous detections and material missed by the pipeline in each group.

The evaluation supplies several kinds of denominator, each suited to a different question. The positive-only review measures how frequently the system’s finds stand up to inspection. The broader check includes misses and can address recall, although its English-original metric labels conflict with its matrix counts. The committee category figure concerns the kinds of use seen among reviewed mixed examples. The full corpus counts describe the population to which one might want to generalize. The paper does not link these with a prevalence estimate, and its sample sizes and selection procedure limit such a calculation.

The third annotation question invites the annotator to describe a function without pre-defined categories. This gives the analysis room to discover distinctions that matter in parliamentary speech, including explicit discussion of translated wording. It also leaves some cases open to another reader’s interpretation. A familiar phrase may be heard as a borrowing or as a deliberate change of language. An official title can preserve a language choice with its own significance in context. The experiment reports one annotator and no agreement measurement across independent judgments. It therefore cannot establish how consistently another annotator would draw all of these distinctions.

The interpretation of the directional category differences faces a related problem. The paper compares language use as observed in the annotated committee sample. It does not match speakers by role, assess proficiency, or track whether the different groups faced comparable opportunities to quote, greet, or discuss translations. A greeting can be common in one sample because its speakers regularly introduce or thank other participants. A quotation can occur because the discussion centers on a text circulating in the other language. These are plausible sources of variation in the setting. The experiment does not test them, so it leaves the category counts as descriptions of recovered examples.

The findings on translation are observational too. The direct translations make it possible to see when a phrase is copied and when it is adapted. The analysis offers a basis for distinguishing translation decisions that would be lost if every insertion were treated alike. It gives no measurement of how detecting a switch would affect translation quality in this corpus, or how often a particular treatment would improve a system’s output. The consequences of using the detector in translation remain a question beyond the reported experiments.

What came after

The later citing study is Identification of Languages in Algerian Arabic Multilingual Documents (2017). It takes up language identification in multilingual documents involving Algerian Arabic. The connection is the problem of determining which languages appear within material that can contain more than one. In the Hansard study, that question is made specific by the French–English pair, the original-language label attached to the intervention, and the direct translation aligned with the transcript.

The later study’s title identifies its document setting and language focus. The citation establishes that the Hansard paper figured in that work. Neither gives grounds for attributing the Hansard’s frequency filter, its use of translation overlap, or its word tagger to the later study. The documented connection is between language identification problems in different multilingual collections. The Hansard contribution to that line of inquiry is a case where the structure of the collection helps locate mixed passages, and where manual reading is needed to determine what the change of language does.

Cite

Cite as Marine Carpuat. 2014. Mixed Language and Code-Switching in the Canadian Hansard. Proceedings of the First Workshop on Computational Approaches to Code Switching.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.3115/v1/w14-3913

@inproceedings{marine2014mixed,
  title = {{Mixed Language and Code-Switching in the Canadian Hansard}},
  author = {Marine Carpuat},
  booktitle = {Proceedings of the First Workshop on Computational Approaches to Code Switching},
  year = {2014},
  doi = {10.3115/v1/w14-3913},
  url = {https://doi.org/10.3115/v1/w14-3913}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/carpuat-2014-mixed-language-code-switching-canadian/