---
title: "Part-of-speech Tagging of Code-mixed Social Media Content:"
description: "Barman and colleagues compare pipeline, stacked and joint approaches to part-of-speech tagging in English, Bengali and Hindi social media text."
canonical: "https://research.elamur.ai/free/en/papers/barman-2016-part-speech-tagging-code-mixed/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/barman-2016-part-speech-tagging-code-mixed/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2016](https://md.research.elamur.ai/free/en/papers/2016/) / Part-of-speech Tagging of Code-mixed Social Media Content: Pipeline, Stacking and Joint Modelling

# Part-of-speech Tagging of Code-mixed Social Media Content: Pipeline, Stacking and Joint Modelling

Paper · 2016 · Utsab Barman, Joachim Wagner and Jennifer Foster

**Authors:** Utsab Barman, [Joachim Wagner](https://md.research.elamur.ai/free/en/authors/joachim-wagner/) and [Jennifer Foster](https://md.research.elamur.ai/free/en/authors/jennifer-foster/) · **Year:** 2016 · **Venue:** Proceedings of the Second Workshop on Computational Approaches to Code Switching · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

Cited by **7** papers in our library of more than 163,000 papers whose bibliographies we read · Proceedings of the Second Workshop on Computational Approaches to Code Switching · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/W16-5804/)
- [PDF](https://aclanthology.org/W16-5804.pdf)
- [DOI 10.18653/v1/w16-5804](https://doi.org/10.18653/v1/w16-5804)

## Summary

In a Facebook comment that mixes languages, the spelling `to` can belong to Hindi even though it looks like an English word. That ambiguity matters when software has to decide what grammatical job the word is doing. Barman and colleagues study this problem in posts and comments that mix English, Bengali and Hindi, with Bengali and Hindi commonly written in Roman script. They add grammatical labels to 1,239 posts and comments that already had labels for the language of each word. This lets them compare ways to use language information in [part-of-speech tagging](https://md.research.elamur.ai/free/en/concepts/part-of-speech-tagging/).

The approaches differ in when they commit to a language and what they do with the advice of taggers trained on individual languages. The pipelines use a language prediction to select a grammatical tag from the corresponding tagger. The strongest stacked system gives a classifier the predictions and confidence scores of all the taggers, along with features of the text and a predicted language label. It learns from annotated mixed-language material how much to trust each source. A third approach uses coupled sequences of labels so that the language and grammatical category of each word can be inferred together.

The extended stacked system, S2, achieves 87.59% average part-of-speech accuracy in cross-validation. The strongest pipeline, V2, achieves 71.27%. The joint approach reaches 85.64% part-of-speech accuracy and 92.49% language identification accuracy with its combined features. The separate language classifier reaches 91.52% on the language task. Therefore, the configuration that produces the strongest language predictions and the configuration that produces the strongest grammatical predictions differ.

The authors also examine where the errors come from. Supplying the annotated language labels helps both pipeline variants, but their grammatical accuracy remains near the scores obtained with predicted languages. Transliteration errors, mismatched training material and the way a pipeline uses a language decision all matter to the interpretation. On the first test split, each of the selected systems is more accurate in monolingual sentences than in mixed sentences, and all struggle at the token where a language switch occurs. The study shows the value, on this collection, of letting a classifier trained on mixed text evaluate several taggers’ suggestions before assigning a grammatical label.

## Deep dive: Part-of-speech Tagging of Code-mixed Social Media Content: Pipeline, Stacking and Joint Modelling

Barman and colleagues compare pipeline, stacked and joint approaches to part-of-speech tagging in English, Bengali and Hindi social media text. · about 35 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### When spelling, language and grammar come apart

Code-mixing can occur between sentences, inside a sentence or within a single word. The distinction matters for a tagger because the relevant decisions are made at word positions. A post can contain a stretch where one language persists, followed by a word or phrase in another language. An item can also contain material from more than one language. Choosing a single language for the entire post would leave out the distinctions that the authors want a system to recover.

On social media, a change of language can be hard to see on the page. The authors’ Facebook example moves among English, Hindi and Bengali while keeping the words in Roman script. In this setting, Romanisation means writing a language with Roman characters in place of its usual script. The script therefore gives little help in telling the languages apart. The example includes `to`, which a reader might recognize as an English spelling. In the comment, the authors identify it as Hindi. The neighbouring words supply evidence that a lookup of the spelling alone would miss. [English](https://md.research.elamur.ai/free/en/topics/english/)

Romanisation creates a further problem even when the language is clear. Individual writers can use different spellings for the same word. A tagger trained on standard written material may therefore encounter an unfamiliar form for a familiar word, while the very same form could resemble a word in another language. The authors treat these as related difficulties. The system has to read variable spellings and decide what they represent in a sentence where the language can change.

A part-of-speech tag assigns a grammatical category to a token. Those categories let the tagger distinguish such uses as a noun from a verb or an adjective. Language identification assigns a different kind of label, describing what language the token belongs to or putting it in a category such as Universal or Mixed. The two tasks use the same text and can draw on overlapping clues. A Roman spelling that is ambiguous across languages can have different grammatical readings depending on which language it belongs to. The way the word fits with its neighbours can also supply evidence about its language.

The benchmark keeps the two annotations separate. A system can get the grammatical category right even when it gets the language wrong, since the same category can apply in several languages. Conversely, correct identification of the language leaves open several possible grammatical readings. This matters when interpreting an end-to-end score. Better language identification can help, but its value depends on how the tagger uses it and which language errors it corrects.

The authors also distinguish the difficulties of social media from the difficulties of switching languages. A monolingual sentence in a Facebook discussion can contain informal spellings or emoticons. A mixed sentence can be well formed as a piece of conversation while still supplying unfamiliar context to a monolingual tagger. The problem is to assign useful grammatical labels to the text as written, including familiar words, unfamiliar spellings and chat-specific material.

#### What earlier systems did

The paper describes earlier mixed-language tagging work that used learners trained directly on mixed input, including decision trees and support vector machines. A support vector machine, or SVM, learns to separate label choices using features of the examples. The paper also mentions hidden Markov approaches and conditional random fields, which offer ways to account for a word’s position in a sequence. These approaches establish one route into the problem. A learner can use annotated mixed material to acquire its own associations between text features and tags. [Machine learning](https://md.research.elamur.ai/free/en/concepts/machine-learning/)

A second route is to reuse taggers that already know something about the individual languages. In the Spanish and English work by Solorio and Liu, monolingual taggers supplied possible parts of speech, their confidence scores and lemmas, which are dictionary forms associated with words. The earlier study first tried hand-built rules that drew on these outputs and on information from a language identifier to select a tagger’s answer. It then used an SVM to learn from the outputs and obtained higher accuracy than it had with the rules. Barman and colleagues adapt the learned combination to trilingual Roman-script text. [Lemma](https://md.research.elamur.ai/free/en/concepts/lemma/)

Vyas and colleagues used another form of reuse for English and Hindi. Their pipeline grouped neighbouring words with the same predicted language into maximal spans. It normalized English spans and transliterated the Roman-script Hindi into Hindi script so that language-specific taggers could process the spans. Normalization concerns the form of the spelling, while transliteration concerns its representation in another script. The earlier study identified both operations as difficult. Barman and colleagues implement a related pipeline and compare it with stacking on the same mixed-language material.

The distinction is what happens to the information produced by each component. In the pipeline, the language identifier determines which grammatical prediction is taken forward. In stacking, a subsequent learner can inspect outputs from multiple taggers. The earlier Spanish and English study had already compared rules with a learned combination. Barman and colleagues say that a direct comparison of the pipeline and stacking approaches to mixed-language tagging was, to their knowledge, still missing.

The joint approach comes from earlier work on simultaneous sequence labelling. Sutton and colleagues used factorial conditional random fields to pair part-of-speech tagging with noun-phrase chunking, which identifies groups of words that form noun phrases. Their factorial approach achieved higher accuracy than the sequence of separate conditional random fields they compared it with. The paper also mentions work by Lu and Ng that paired the labelling of sentence boundaries with punctuation. These examples suggested a structure for asking whether grammatical and language labels could inform each other during inference.

The comparison in Barman and colleagues’ study consequently covers several uses of much the same evidence. The researchers can train a tagger directly on the mixed text, use language identity to route input through monolingual taggers, put a learner above those taggers, or learn a coupled sequence of language and grammatical labels. Holding the mixed collection in common makes the different ways of combining information observable in the same evaluation.

### The method, step by step

#### What the systems are trained to predict

The authors begin with material that already carries a language label on each token. They add a grammatical label at the same position. A token is the unit that receives a prediction. The paired annotations provide a target for each task, so the experiments can score language and grammar separately even when a system predicts them together. This pairing also makes it possible to supply the annotated language labels in later diagnostic runs. [Linguistic annotation](https://md.research.elamur.ai/free/en/concepts/annotation/)

The language inventory covers English, Bengali and Hindi and also accommodates kinds of tokens that require a different description. Mixed is available for mixed forms. Universal covers items such as punctuation, numbers, emoticons and broadly used chat expressions. Named Entity and Acronym are separate language labels in the inventory. A score on language identification in this study therefore measures success on the full set of corpus labels, including categories that denote something other than a language.

For the grammatical annotation the authors use the universal tag set described by Petrov and colleagues. Its categories are broad enough for the same scheme to be applied across the languages in the collection. The authors prefer it for its simplicity, cross-language applicability and familiarity to researchers. The categories include nouns, verbs, adjectives and particles, as well as punctuation, numerals and a residual `X` category. Universal on the language side and `X` on the grammatical side belong to separate inventories. Each token receives its language and grammatical annotations independently of the names of those inventories.

One annotator proficient in all the languages assigns the grammatical tags. The monolingual tools, meanwhile, draw on training resources whose grammatical annotation schemes differ. When their predictions are used directly in the pipelines, the authors map the tags they produce into the universal inventory. That step lets a prediction from an individual tagger be compared with the manual annotation under the same set of category names.

#### From words to evidence for a classifier

The authors organize the evidence into handcrafted features, stacking features and their combination. A feature is a piece of information the learner can use when making a prediction. The handcrafted features describe the word and its immediate surroundings. They include capitalization, word length, dictionary membership and the preceding and following words. They also include initial and final character sequences with lengths from 1 to 5. A character sequence of this kind is an [n-gram](https://md.research.elamur.ai/free/en/concepts/n-gram/).

Prefixes and suffixes give the learner evidence at a scale between the individual character and the entire word. An unfamiliar spelling can still share one of its ends with words encountered during training. A dictionary match supplies a different signal, and the neighbours help describe the context in which the form occurs. These features are available from the input without obtaining a grammatical prediction from a monolingual tool.

Stacking features come from the processing that generates monolingual predictions. They include tokens, predicted tags and the confidence associated with a prediction. A confidence value gives the final learner something more to work with than the proposed category alone. The learner can treat a suggestion differently depending on the accompanying confidence and the rest of the evidence. The combined feature set makes both the handcrafted and stacking information available.

The paper first trains a separate SVM for language identification based on the approach that was used for the original corpus. It uses handcrafted features and is trained on Roman-script data. In the pipelines, its predictions determine where the language-specific tools are applied or which of their outputs is selected. The extended stacked system can also use those predictions, but it receives them as features. This is a consequential difference in the function of an identical kind of input. A routing choice can determine which answer reaches the output. A feature is one consideration among the information available to a trained classifier.

The direct grammatical baselines use the Roman-script mixed text and handcrafted evidence. One baseline is a linear-kernel SVM. Its linear kernel allows the classifier to score the labels using weighted input features. The other baseline is a linear-chain conditional random field, or CRF. The chain connects neighbouring output positions, allowing the grammatical labels along the sentence to be scored as a sequence. Both baselines test how far learning from the mixed material can get before monolingual tagger outputs are introduced.

#### Preparing the monolingual taggers

The authors use TreeTagger for the individual languages. They use the English component distributed with the package, following the choice of tool in the earlier stacking study. For Bengali and Hindi, they train TreeTagger on the respective SNLTR corpora. Training includes a stemmed lexicon produced with lightweight stemmers for those languages. Stemming reduces forms to stems for lexical lookup and supplies a way to relate forms during this processing. [Stemming](https://md.research.elamur.ai/free/en/concepts/stemming/)

To give the Bengali and Hindi taggers input in their respective scripts, the authors use Google Transliteration. The pipeline variants and stacking systems differ in where they insert this operation and which tokens they send through it. The English tagger can receive the original Roman-script representation. The experiments thus produce parallel grammatical predictions from tools whose training material is monolingual and whose expectations about their input differ from what a mixed Facebook sentence contains.

The authors also try converting the SNLTR grammatical annotations to the universal inventory before training. The principal pipeline instead trains the taggers with their original category inventories and maps predictions afterward. Varying the placement of this mapping asks whether the tagger benefits from learning the fine distinctions in the original annotation even though the reported task uses broader categories.

#### The pipelines and their treatment of context

In V1, the language identifier runs before any of the grammatical taggers. Consecutive tokens with the same predicted language are grouped into spans. For a Bengali span, for example, the system uses the Bengali transliteration of the tokens and sends the result to the Bengali tagger. English spans go to the English tagger in their original form. Hindi spans go through the corresponding Hindi processing. The outputs are reassembled in the order of the original input and expressed in the shared tag inventory.

Language decisions affect more than the choice of tagger in V1. They also determine the boundaries of its input. A misidentified token can interrupt a span that would otherwise be sent to one tool. Even an accurately located language switch still generates a fragment boundary. The monolingual taggers were trained on full sentences, so a fragment may invite sentence-initial or sentence-final tags where the token actually occurs in the middle of a mixed sentence. The paper gives a noun followed by punctuation as an example of a pattern that can be associated with the end of an input sequence.

V2 changes the order and scope of these operations. Each of the monolingual taggers processes a version of the full sentence. The English tool receives the original Roman-script sentence. The Bengali and Hindi tools receive their respective transliterations of the full input, including words that come from other languages. The SVM supplies language predictions on the original Roman-script tokens, and those predictions are used to choose among the taggers’ answers at each position.

The context preserved in V2 has both a useful property and a cost. The token keeps its position in the whole sentence, so a switch does not create an artificial sentence ending for the monolingual tool. Some neighbouring words, however, have been presented to a tagger in a script or form that does not make them meaningful in that language. The authors introduced V2 to address the fragment-boundary problem while recognizing that these surroundings can still be poor evidence.

#### Putting a learner above the taggers

The stacked approach starts with the same whole-sentence passes used in V2. Every token is transliterated for the Bengali and Hindi passes, with the original sentence retained for the English pass. Each tool can produce a grammatical suggestion at each position. Stacking adds an SVM trained on the manually tagged mixed-language material to turn the suggestions and their accompanying evidence into a final decision.

In S1, the upper classifier uses the stacking features. It learns from the token representations and from the grammatical outputs and confidence scores supplied by the taggers. The SVM has a linear kernel, and the authors optimize its parameter `C` in cross-validation. `C` controls the cost the training objective assigns to errors relative to regularization. The upper classifier sees how the monolingual suggestions behave on the sort of mixed-language content it will be evaluated on.

The authors then try adding further evidence to this setup. The extended system, S2, uses the combined features together with the SVM’s predicted language. Its final classifier can use signals from the Roman-script text, transliterated forms and the taggers’ outputs. If the language identifier suggests Hindi, the SVM has this information available alongside the Bengali and English taggers’ suggestions. Training on mixed text determines how those signals contribute to the final tag.

How the extended stacked tagger assigns a grammatical label The steps in order.

The stacked pipeline variants, S3 and S4, test whether the output of an already routed pipeline is useful when fed into a learner trained on mixed text. S3 builds on V1, which works with language spans. S4 builds on V2, which tags whole-sentence views and then selects by predicted language. Both train an SVM using combined features. Comparing them with the pipelines reveals what a subsequent learner can recover from the pipeline predictions. Comparing them with S1 and S2 tests the value of retaining suggestions from all the monolingual taggers.

#### Coupling the language and grammatical sequences

The joint approach asks for a language label and a grammatical label at each position in the same inference procedure. The authors use a factorial conditional random field, or FCRF, implemented in GRMM. The input sentence is shared across output chains. One chain contains the language labels. The other contains the grammatical labels. Within each chain, edges connect neighbouring positions. Across the chains, an edge connects the language and grammatical labels at the same position.

The intuition begins with one linear chain. Imagine giving the entire input a tentative sequence of grammatical labels. The CRF gives that labelling a score by considering consecutive labels and the observed text. Changing one label changes the local scores that involve it. This allows the sequence to favour plausible transitions given the evidence. If the same structure is used with language labels, it can score persistence of a language or a switch according to the input and the neighbouring label.

In the authors’ notation, the probability of a linear-chain labelling has the following form.

```
p(y | x) = (1 / z(x)) ∏[t = 1 … T] ψₜ(yₜ, yₜ₋₁, xₜ)
```

Here `x` is the observed sequence and `y` is a candidate sequence of output labels. The bar in `p(y | x)` means that the probability of `y` is conditional on observing `x`. `T` is the length of the sequence and `t` indexes its positions. The factor `ψₜ` takes the current label `yₜ`, the preceding label `yₜ₋₁` and the observed input at the current position `xₜ`. The product sign indicates multiplication of these factors across the sequence. The normalizing quantity `z(x)` depends on the input and turns the resulting scores into probabilities.

The local factor is an exponential of a weighted feature sum.

```
ψₜ(yₜ, yₜ₋₁, xₜ) = exp(∑[k = 1 … K] λₖ fₖ(yₜ, yₜ₋₁, xₜ))
```

The symbol `fₖ` denotes feature function `k`, with `K` feature functions in all. A feature function takes the indicated labels and input and returns a value describing the evidence it represents. `λₖ` is its learned weight. The summation adds the weighted values, and `exp` takes their exponential, so the resulting factor is positive. The meanings of `t`, `yₜ`, `yₜ₋₁` and `xₜ` are the same as in the sequence probability. Context from nearby words can enter through the input features associated with a position.

For the single chain, the normalization can be written as a sum over all candidate sequences.

```
z(x) = ∑[y] ∏[t = 1 … T] ψₜ(yₜ, yₜ₋₁, xₜ)
```

The bracket `[y]` on the sum indicates that it ranges over each complete candidate labelling of the fixed input `x`. For each candidate, the inner product collects its local factors `ψₜ`, from the first position through position `T`. The arguments `yₜ` and `yₜ₋₁` change with the candidate. The observed `xₜ` stays fixed. The result `z(x)` is called the partition function. Dividing each candidate’s score by it makes those candidates’ probabilities sum to a whole.

In a factorial chain, the output at a position is a group of labels instead of a single label. Here the group contains language and part of speech. The first kind of factor still scores the neighbouring labels along an individual chain. The second kind scores the compatibility of labels at the same token. Written with the cross-chain product restricted to existing edges, the conditional probability is as follows.

```
p(y | x) = (1 / z(x)) ∏[t = 1 … T] (
  ∏[l = 1 … L] ψₜ(yₜ,ₗ, yₜ₋₁,ₗ, xₜ)
  × ∏[1 ≤ l < L] ϕₜ(yₜ,ₗ, yₜ,ₗ₊₁, xₜ)
)
```

In this expression, `l` indexes the output chains, and `L` is the number of chains, with `L = 2` in the study. The symbols `yₜ,ₗ` and `yₜ₋₁,ₗ` refer to the labels at positions `t` and `t − 1` in chain `l`. The within-chain factor `ψₜ` applies to that pair and `xₜ`. The cross-chain factor `ϕₜ` connects `yₜ,ₗ` to `yₜ,ₗ₊₁`, the label one chain over at the same position, using the same observation. The `×` combines the two kinds of factors, and the outer product repeats that combination at every token. Now `y` denotes a complete assignment to both chains, and the partition function `z(x)` sums the corresponding joint scores over those assignments.

This structure gives an ambiguous word a way to be reconsidered in light of its likely grammatical role. A label pair can fit the observations at the token while also fitting the sequences around it. The language and grammatical chains still have their own transitions, so the system can distinguish the evidence for a language switch from the evidence for a particular grammatical sequence. The authors’ motivation is to reduce the propagation of a fixed language error into the grammatical decision.

The factorial experiments use handcrafted features, stacking features and their combination in separate runs. Some of the inputs can therefore be outputs from the monolingual taggers, even though the two final sequences are inferred together. The setup separates two questions. One concerns what the monolingual tools contribute as evidence. The other concerns whether coupling the final labels makes better use of the available evidence than the other approaches in the comparison.

### Experiments and results

#### The collection and what accuracy measures

The evaluation uses 1,239 Facebook posts and comments selected from a corpus of 12K posts and comments. The parent collection already supplied word-level language labels. The manually added part-of-speech labels are for the selected subset. That subset is the basis for the reported cross-validation scores, so its language mix and writing conventions are the immediate context for all the comparisons.

Bengali accounts for 47.9% of the subset’s tokens, English for 23.2% and Hindi for 6.3%. The other token positions belong to the remaining language-label categories. There are 13,171 Bengali tokens and 1,746 Hindi tokens. The imbalance means that a single accuracy across the evaluation gives more influence to decisions about Bengali tokens than to decisions about Hindi tokens. The aggregate score represents the corpus as it occurs in the study.

The authors also count how often a word type appears with multiple labels. A type is a distinct form, whereas each occurrence of the form is a token. Of 7,959 types in the subset, 297, or 3.7%, have more than one observed language label. Multiple part-of-speech labels occur for 569 types, or 7.1%. These figures describe ambiguity as evidenced by the annotations in this collection. A frequent ambiguous spelling and a rare ambiguous spelling each contribute a type to the count, even though they can affect token-level accuracy differently.

The grammatical annotations are unevenly distributed as well. The subset contains 8,376 tokens tagged `NOUN`, 4,422 tagged `VERB` and 4,321 tagged `PUNCT`. At the other end of the distribution, `NUM` occurs on 164 tokens. This mix matters when reading the label-confusion analysis. There are many opportunities for a common category to be correctly predicted, and frequent categories can also become default destinations for errors. A whole-corpus accuracy weights those decisions by the occurrences the system is asked to label.

The main procedure uses 5-fold cross-validation. Each fold serves as a test split in turn, and the paper reports the average accuracy across the splits. Accuracy measures the share of token labels that match the annotation for the task being evaluated. Language identification and part of speech each have their own accuracy. An analysis of the first test split is a more focused look at the errors within a particular partition and has to be read on that basis.

#### Direct baselines, pipelines and stacked classifiers

The linear SVM baseline, using handcrafted features from the original text, achieves 85.00% average cross-validation accuracy for part of speech at `C = 0.00097`. The linear-chain CRF baseline, using handcrafted features in its optimized setting, achieves 83.89% on the same task and evaluation. These results supply a reference for experiments using the monolingual taggers. A system that adds those tools has to improve on a baseline already trained on the sort of text it will encounter at test time.

V1, with predictions made on language-specific spans, achieves 71.12% average cross-validation accuracy for part of speech. V2, which processes full sentences and then selects outputs by predicted language, achieves 71.27%. Presenting the full sentence helps the pipeline under the reported test, while both versions remain well below the direct baselines. Their monolingual training sources, input processing and dependence on the language prediction all differ from the direct approach.

The basic stacked system, S1, reaches 86.57% average part-of-speech accuracy in cross-validation. S2, the extended stack with the combined evidence and predicted language, reaches 87.59%. S3 and S4, which put classifiers above the respective pipeline outputs, achieve 85.99% and 85.83%. The whole comparison keeps separate the effect of feeding the pipeline’s answer into a mixed-text learner and the effect of giving such a learner access to all the taggers’ suggestions.

Part-of-speech taggers on the Facebook subset, average cross-validation accuracy The extended stack has the highest accuracy, and the direct baselines outperform both unstacked pipelines.

**The numbers**

| System or setting | accuracy % |
| --- | --- |
| Handcrafted SVM | 85.00 |
| Handcrafted linear-chain CRF | 83.89 |
| V1 span pipeline | 71.12 |
| V2 full-sentence pipeline | 71.27 |
| S1 basic stack | 86.57 |
| S2 extended stack (this paper) | 87.59 |
| S3 stack over V1 | 85.99 |
| S4 stack over V2 | 85.83 |
| Factorial CRF, combined features | 85.64 |

The positions of the direct SVM and the pipelines are informative when interpreting the best score. Monolingual grammatical predictions can be valuable evidence, as their use in the strongest stack shows. Selecting a single tagger by the predicted language produces a very different result. A learner trained on the mixed corpus can assign tags using text evidence alone with greater accuracy than either of the direct pipelines achieves.

The strongest stacked result also has a specific training condition. S2 learns its final decision from annotated material in the target domain. The components it consults were trained on monolingual resources, but the classifier that settles the answer has examples of informal, Roman-script, mixed-language input. The stacked pipeline variants have that advantage too. Their scores show that an in-domain final learner can raise the accuracy of either pipeline’s output substantially, while the all-tagger stack makes still better use of the available evidence in this comparison.

#### Part of speech and language identification in the joint experiments

The separate SVM for language identification achieves 91.52% average accuracy in 5-fold cross-validation. The factorial CRF with handcrafted features achieves 89.37% average language accuracy and 81.77% average part-of-speech accuracy. With stacking features, the corresponding accuracies are 90.60% and 85.28%. With the combined features, they are 92.49% and 85.64%. All these figures refer to the same mixed Facebook subset and to the evaluators’ respective inventories of language or grammatical labels.

Factorial CRF feature sets on the Facebook subset, average part-of-speech accuracy Monolingual tagger evidence improves grammatical tagging, and the feature combination gives the best factorial CRF result.

**The numbers**

| System or setting | accuracy % |
| --- | --- |
| Handcrafted features | 81.77 |
| Stacking features | 85.28 |
| Combined features (this paper) | 85.64 |

The combined factorial approach is the strongest reported language identifier in the comparison with the separate SVM. Its grammatical score is above either pipeline and above the direct handcrafted baselines. The stacked approaches occupy the higher part of the grammatical ranking. The paper reports that the combined factorial system lies 2.05% below S2 in average part-of-speech accuracy. A reader interested in both outputs should therefore keep track of which score belongs to which task. A strong language result gives evidence about the language sequence. The grammatical result still depends on the rest of the architecture and how it uses information from the words and taggers.

The different outcomes are compatible with the way the tasks are connected. In S2, a predicted language is available as an input to a classifier optimized for grammatical labels. The factorial system uses the grammatical and language labels within the same structure. An improvement on language identification in the factorial system can coexist with a lower grammatical score. The evaluation compares the full procedures that produce the predictions and provides separate evidence for each output.

#### What the significance tests establish

The authors apply two-sided bootstrap resampling to test selected differences. The purpose of resampling is to assess how reliably a comparison between systems appears under repeated samples from the evaluated material. The test addresses the stability of a difference, while the accuracies show the scale and direction of the observed results. Both pieces of information matter when a comparison is numerically close.

For the improvement from V1 to V2, the paper reports `p = 0.0313` and calls the difference statistically significant. The accuracy movement is small even though the test distinguishes it. This makes the result evidence for the particular whole-sentence modification under the evaluation, with the practical size of the change visible in the pipeline scores.

The paper also reports a 0.93% part-of-speech advantage for S1 over the factorial CRF and says that this advantage is statistically inconclusive. Its discussion further reports that the factorial and SVM approaches significantly outperform the monolingual tagger combinations represented by V1 and V2. The strongest average score belongs to S2. The reported tests give specific evidence about selected comparisons, so the full ordering of accuracies is best read as an ordering of observed scores.

### What the ablations show

#### Language labels as a controlled input

The experiment with gold language labels directly probes the role of the separate language identifier. A gold label is the annotation used as the reference answer for evaluation. The authors substitute those labels for the SVM’s language predictions in V1, V2 and S2. The grammatical task is still scored against the same kind of part-of-speech annotation. In the pipelines, the substitution can correct which monolingual tool supplies a prediction. In S2, it changes a feature available to the final classifier.

For V1, average part-of-speech accuracy is 72.09% with gold language labels and 71.12% with predicted labels. V2 achieves 72.07% with gold labels and 71.27% with predicted labels. The paper gives the absolute losses due to automatic language identification as 0.97% for V1 and 0.80% for V2. For S2, the corresponding part-of-speech accuracies are 88.92% with gold language labels and 87.59% with predicted labels.

The improvements show that errors in language identification reach the grammatical task. They also bound how much these particular pipelines gain from correcting that input in the authors’ comparison. V1 and V2 remain around the same level after the substitution, and the large separation between pipeline and stack remains. The experiment isolates the language label as an input worth improving while leaving the transliteration, monolingual tagger training and use of context relevant to the pipelines’ performance.

The language identifier’s most frequent error involves Hindi words being labelled as Bengali. The authors suggest that limited Hindi representation in training contributes to the confusion. They observe that many of the affected forms are spelled identically in the Roman-script Hindi and Bengali material, including `na`, `chup`, `sale` and `toh`. These examples clarify why simply detecting a familiar character sequence can be insufficient. The spelling can favour several readings, and the contextual evidence and the distribution of training examples then matter to the prediction.

The gold-label runs have a different meaning from a test of perfect transliteration or of a grammatical tagger trained on better matched material. They supply information about the intended language at each position. The spellings and the task faced by the downstream components still come from informal text. This gives the language substitution a reasonably specific interpretation, even though changing a language decision in the span pipeline can affect more than one token through the choice of boundaries.

#### The effects of script conversion and tagger context

The authors manually inspect the quality of the Hindi and Bengali transliterations. They report transliteration accuracy of 82.63% for Hindi and 86.71% for Bengali in their error analysis. This is an assessment of script conversion, distinct from part-of-speech accuracy. It identifies another way the text reaching a monolingual tagger can differ from the form that would give that tagger good lexical evidence.

Several recurrent patterns are easy to see in the examples. Single-character forms such as `k`, `j` and `r` offer little spelling evidence. Other forms contain digits, as in `2mi`, `2make` and `as6e`. Shortened spellings include `amr`, `tmr` and `hygche`. If a converter expects fuller and more regular Roman spellings, these are difficult cases to interpret. The authors connect the errors to normalization, meaning that the input spelling can need processing before a script conversion is likely to recover the intended form.

The V1 and V2 comparison offers a separate look at context. V1 sends language-specific spans to tools that learned from complete monolingual sentences. V2 keeps the original sentence positions within all three inputs. The significant improvement for V2 supports the usefulness of the whole-sentence variant in the tested pipeline. Several consequences of the redesign occur together, including the fact that V2 presents out-of-language words as context. The experiment therefore evaluates the complete change from spans to parallel full-sentence passes.

The authors’ attempt to move tag mapping before monolingual training gives another limited comparison. In that variant, the SNLTR annotation is converted to the universal categories before TreeTagger is trained. The variant fails to improve on training with the original tag inventories and mapping the resulting predictions. The paper gives this as an ordering between the tested procedures. It provides no separate accuracy with which to judge the size of the difference.

#### What a stack gains from the monolingual tools

The comparison between V1 and S3 and between V2 and S4 demonstrates what happens when predictions from the pipelines become evidence for an SVM trained on the mixed text. Each stacked version is markedly stronger than the pipeline from which it draws. The final learner has examples from the target domain, and its handcrafted and stacking features let it learn when a pipeline suggestion fits the context. In the direct pipeline, that suggestion is already the answer chosen by the routing procedure.

The comparison between the stacked pipeline variants and S1 and S2 addresses how much material the final learner gets to inspect. S3 and S4 inherit predictions from systems that select based on the language identifier. S1 and S2 use outputs from all the monolingual taggers. The higher accuracy of the all-tagger configurations supports the authors’ conclusion that choosing the tool by language before stacking loses useful evidence on this dataset.

That evidence can include agreement and disagreement. When several tools independently favour compatible tags, the final learner can use what they have in common. When they disagree, the word form, confidence scores and other features can make one suggestion more plausible in the mixed context. The experiment scores the resulting predictions directly. It does not trace individual improvements to agreement or disagreement, so these are ways to understand what information the architectural choice makes available.

S1 and S2 shed light on broader feature integration. S1 already benefits from predictions produced by the parallel tagging passes. S2 gives the same type of final learner additional evidence, including the predicted language and features associated with the original and transliterated text. The paper identifies the full combination as the strongest one it tried. Because the winning configuration adds several kinds of evidence, the comparison with S1 measures their combined effect. The gold-label experiment adds separate evidence that the quality of one of those inputs, the language label, affects the result.

#### How the joint approach depends on its features

The factorial experiments vary the inputs while retaining the coupled structure. Moving from handcrafted to stacking features improves both part-of-speech and language accuracy. The combined features give the highest result on each task. This shows that the final paired inference can use information from monolingual grammatical taggers even for the language task. Access to sequence structure alone leaves the handcrafted configuration with lower scores on this material.

The grammatical gain associated with the stacking features is visible when the factorial configuration using those features is compared with the one using handcrafted features. Combining the two sets raises performance again. The language scores also rise across the feature comparisons. This matters because the approach was motivated by interaction between the two output sequences. The outcome depends on the observed evidence used to score those sequences as well as on the connections between their labels.

The joint and stacked systems also differ in how they use their evidence during learning. The final SVM in S2 is trained to predict the grammatical answer. The factorial CRF predicts a pair of sequences, with learned associations along and between them. Its language advantage and grammatical shortfall relative to the strongest dedicated systems describe the consequences of the tested configurations. They give no independent measurement of the contribution of the cross-chain edge, which would require a matched comparison that varied that edge itself.

#### Mixed sentences and the immediate switch

The authors select V2, S2 and the factorial CRF as representatives of their respective approaches for a closer analysis of the first test split. That split contains 246 posts and comments and 5,044 tokens. For each system, they compare part-of-speech accuracy in sentences assigned to the monolingual and code-mixed groups. This comparison asks what happens in the presence of mixing within a sentence, with the surrounding social media source held in common.

V2 achieves 70.49% part-of-speech accuracy on mixed sentences and 72.20% on monolingual sentences in that split. For S2, the corresponding scores are 83.42% and 86.23%. The factorial CRF achieves 81.78% and 84.58%. The ordering of the systems is the same in both groups, and each system has higher accuracy on monolingual sentences. The analysis supports the authors’ view that grammatical tagging is harder in the mixed sentences they evaluated.

The sentence-level comparison treats all positions in a mixed sentence as belonging to that group. A complementary analysis looks more precisely at where the language changes. The authors define the switch position as the token whose language differs from that of the preceding token. In the figure, this is position `0`. A position of `+1` is immediately to its right and `−1` immediately to its left. The authors compare accuracy at the switch and in the surrounding positions on the same test split.

All the tested approaches encounter difficulty at switch positions, and their performance improves as the distance from a switch increases. The relative ordering of the approaches stays the same across the distances examined. This analysis puts the sentence-level finding in a more precise location. Mixed sentences supply more difficult input overall, and the point at which one language directly follows another is a particularly difficult place to assign a grammatical tag.

The pattern is consistent with a change in the quality of contextual evidence. At a switch, an adjacent word can belong to a different language, and a monolingual tagger can find that context unfamiliar. Language and grammatical classifiers trained on mixed input still face the ambiguity of the forms around the switch. The figure shows where difficulty concentrates. The inspection of particular forms and error categories gives clues about its sources.

#### Previously seen forms and unseen forms

The known-word analysis asks whether a token’s form occurs in the relevant training vocabulary. The reference vocabulary depends on the system. For S2 and the factorial CRF, the authors use the Roman-script mixed-language material in the first training fold. Both systems perform better on known words. On unknown words their results are close, while the paper reports that S2 achieves 2.82% higher part-of-speech accuracy than the factorial CRF on known words in this split.

That finding locates a part of the difference between S2 and the factorial approach. The stacked system’s advantage is more apparent when the form has been observed in the shared mixed training material. An unknown form still has character features and context, and it can receive monolingual tagger predictions. The reported comparison suggests that these available signals bring the two systems closer together on that subset. It leaves open which individual features explain the difference for known words.

For V2, the authors instead check Bengali and Hindi test forms against the monolingual SNLTR training material. They report that 52% of those test tokens are found in the monolingual training vocabulary. V2 achieves 78.30% part-of-speech accuracy on known Bengali and Hindi words in the analysis and 43.80% on unknown ones. The default packaged English tagger brings a different training arrangement, so the vocabulary comparison for V2 covers Bengali and Hindi.

These comparisons answer related questions under different definitions of prior exposure. For V2, a known word has support in the monolingual resources used to train the tagger. For S2 and the factorial approach, it has been encountered in Roman-script mixed training text. The large contrast for V2 identifies vocabulary coverage as a serious issue for the pipeline under its training conditions. The comparison between S2 and the factorial CRF, with a common in-domain definition, is the more direct comparison of the two systems’ handling of known and unknown forms.

#### Which grammatical readings are confused

The manual analysis also examines the grammatical category assigned when the correct answer is missed. The authors highlight English adjectives assigned `NOUN` as an error shared by V2, S2 and the factorial CRF. Noun predictions also recur for tokens whose reference labels are adverb, verb, conjunction or adposition. Looking at these pairs gives more information than the overall error rate. Several distinct grammatical readings end up in the same predicted category.

There is a more distinctive error in the pipeline’s output on chat expressions. The authors observe that V2 often misclassifies items such as emoticons and can assign them noun or adjective labels. S2 and the factorial approach handle the highlighted cases better. The authors relate this difference to the formal training material of the monolingual taggers. A learner trained on the mixed Facebook data has labelled examples from the kind of writing where these expressions occur.

The confusion analysis helps explain why matching the language can leave a difficult grammatical decision. A chat expression may be routed according to a language-label decision and still look unfamiliar to a tagger trained on formal text. Likewise, identifying an ambiguous token as English supplies a language without resolving whether the word is an adjective in the sentence. The language, transliteration and grammatical inspections each describe a different place where evidence can be lost or misread.

### Limitations

#### Limits the authors identify

The grammatical annotation was produced by one annotator proficient in English, Bengali and Hindi. The authors explain that they lacked a second annotator with the required proficiency and therefore could give no inter-annotator agreement figure. Agreement would provide a measure of how consistently another qualified annotator applied the same categories, especially on difficult words and informal expressions. Here the evaluation measures how closely the systems reproduce the annotations that were made.

The authors also identify a mismatch between what the monolingual taggers learned from and what appears in the evaluation. Their training is based on formal monolingual material in the expected scripts. The target is informal, Roman-script, mixed-language writing. Correct script conversion can make a word recognizable, while the style, surrounding words and grammatical context can still differ sharply from training. The chat-specific error patterns and the known-word analysis illustrate that mismatch.

The authors’ pipeline implementations expose a tradeoff in the context presented to the taggers. Cutting the sentence into spans removes some of the context surrounding each word and invites a tagger to interpret fragments as whole sentences. Passing the full sentence can preserve positions while surrounding the word with unhelpful transliterations. The authors propose making those surroundings more meaningful in future work. The experiments evaluate the span and full-sentence versions with the context each design actually supplies.

The conclusion also suggests that more training data might improve the factorial approach. The authors raise the possibility that additional examples could change its relationship to S2. Their cross-validation experiments establish the accuracies under the reported data conditions. The suggestion concerns a different training regime whose effect is left for future investigation.

#### Limits of the comparison

The strongest result is tied to a subset of one Facebook collection with a particular distribution of languages and categories. Bengali is the most frequent language by token count and Hindi is much less frequent. An accuracy over all the tokens naturally reflects that composition. Other communities, different language proportions and other Romanisation conventions would constitute new test conditions. The reported rankings describe the systems on the collection used in the study.

The annotated subset contains both monolingual and mixed sentences from the social media material. The comparison between those groups and the comparisons near switch points are observational. The groups can differ in vocabulary, length or other properties relevant to tagging. The analysis identifies an association between mixing and accuracy in the first test split. It gives no estimate of the effect of inserting a language switch into otherwise matched text.

The bootstrap comparison for V2 and V1 establishes a difference between complete variants under the authors’ test. The variants change where language identification enters the grammatical pipeline, how the text is transliterated and how much context each tagger receives. The significant result therefore belongs to the full-sentence design as implemented. The size of an individual context effect would require a comparison where the other consequences of the redesign were held fixed.

In the same way, the grammatical ranking compares whole systems with differing training arrangements and features. The direct baselines learn from mixed, Roman-script material. The monolingual pipelines rely on the resources for their individual taggers. Stacking combines those resources with in-domain supervision. The factorial approach changes the structure of the final inference and uses its own feature configurations. This is a practical comparison of ways to build a tagger. The ranking alone cannot assign a separate causal contribution to every component.

The language substitution is narrower than those broad comparisons and helps locate the effect of language predictions. It still supplies gold labels to the existing configurations. A different language classifier could change which cases are correct as well as its overall accuracy, and a pipeline’s response would depend on where those changes occur. Gains from providing the reference labels are most directly interpreted as gains for the systems and corpus on which the substitution was performed.

Manual transliteration accuracy provides evidence of imperfect input to the Bengali and Hindi taggers. A comparison with fully corrected transliterations would answer the further question of how many grammatical errors that specific input correction prevents. The study reports the inspection of transliteration quality and the performance of the grammatical pipelines, leaving the connection between individual transliteration corrections and grammatical gains unmeasured.

The paper’s detailed error inspections come from the first test split. They offer concrete cases for interpreting the cross-validation results, yet their frequencies and subgroup scores are specific to that split. The aggregate cross-validation ranking and the finer analyses therefore carry different kinds of evidence. One covers the repeated held-out evaluations. The other shows where the selected systems succeed and fail in the subset the authors inspected.

Finally, separate accuracies for language and grammar give separate views of the joint approach. They reveal how often each kind of label is correct in aggregate. They cannot tell a reader how frequently both labels are jointly correct at one token, or whether the language improvements occur at the same positions as any grammatical improvements. Assessing that relationship at token level would address the interaction that motivates the factorial design more directly.

### What came after

Later citing studies are unspecified, so the subsequent use of the paper’s approach cannot be traced here. The authors’ forward-looking proposals concern two questions raised by their results. One is how the factorial approach would fare with more annotated mixed-language text. The other is whether giving monolingual taggers more meaningful context in whole-sentence transliterations would improve their predictions. Both are open directions in the paper’s conclusion.

## Cite

Cite as Utsab Barman, Joachim Wagner and Jennifer Foster. 2016. Part-of-speech Tagging of Code-mixed Social Media Content: Pipeline, Stacking and Joint Modelling. Proceedings of the Second Workshop on Computational Approaches to Code Switching.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/w16-5804](https://doi.org/10.18653/v1/w16-5804)

```bibtex
@inproceedings{barman2016part,
  title = {{Part-of-speech Tagging of Code-mixed Social Media Content: Pipeline, Stacking and Joint Modelling}},
  author = {Utsab Barman, Joachim Wagner and Jennifer Foster},
  booktitle = {Proceedings of the Second Workshop on Computational Approaches to Code Switching},
  year = {2016},
  doi = {10.18653/v1/w16-5804},
  url = {https://doi.org/10.18653/v1/w16-5804}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
