Elamur Research

Normalization of Indonesian-English Code-Mixed Twitter Data

Paper · 2019 · Anab Maulana Barik, Rahmad Mahendra and Mirna Adriani

Summary

A tweet can switch from Indonesian to English halfway through a sentence, then attach an Indonesian ending to an English word. It can also omit a space or stretch a spelling for emphasis. For a system that needs to read the tweet, these quirks raise different questions. Where does each word begin? Which language supplies its spelling? Is it a word to correct, a phrase to translate, or a name to preserve? The authors treat these as separate decisions on the way to a single output, a version of the tweet in standard Indonesian.

Their pipeline starts with tokenization, the task of finding units of text, including names and expressions that can span several words. It gives each unit an Indonesian, English, or residual label. It then standardizes eligible spellings by looking up replacements learned from large tweet collections and applying rules for forms such as Indonesian reduplication and English contractions. Finally, it uses the language labels to decide whether to translate words into Indonesian directly or first assemble an English passage for translation into Indonesian.

The authors prepared reference annotations for all four tasks on 825 mixed-language tweets. On token identification, their tokenizer scored 95.15 F1, compared with 90.98 for NLTK TweetTokenizer. In lexical normalization, the strongest tested setup used separate Indonesian and English tweet collections to learn replacements and combined those replacements with hand-written rules. It scored 81.31 F1 and 68.50 accuracy on the paper’s unique-word evaluation. Adding rules made a much larger difference than separating the collections did.

Against the final Indonesian references, the full pipeline scored 54.07 on BLEU, a measure of overlap with reference wording, and 31.89 on word error rate, where lower is better. The raw tweets scored 46.07 BLEU and 45.75 word error rate against the same kind of reference. The separate translation evaluation produced higher scores for translation quality than the full run did. The authors explain the gap through error propagation. In the full pipeline, a missed boundary, a wrong language label, or a bad replacement can change the text that the translator receives.

Deep dive: Normalization of Indonesian-English Code-Mixed Twitter Data

The paper tests how tokenization, language labels, spelling correction and translation turn informal Indonesian–English tweets into standard Indonesian. · about 33 minutes to read

The problem and its context

A spelling problem and a language problem

The authors start from a practical difficulty in using Twitter for natural language processing. Tweets give researchers access to conversation, public reactions, and breaking news. The same material contains spelling mistakes, slang, abbreviations, and punctuation habits that can make it difficult for systems designed around more regular writing. The paper cites earlier work that observed reduced accuracy when such systems were used on noisy text. It adds a complication specific to the material under study. A tweet may use two languages within the same utterance.

The paper uses code-mixing for the incorporation of units from one language into the use of another. A unit can be a phrase or a word, and it can also be a morpheme, a meaningful part of a word. This last possibility matters for the design. If an English base carries an Indonesian prefix, a boundary around the whole word leaves material from both languages inside the boundary. A word-level language label can still be useful for choosing a processing route, provided the next operation has a way to handle that internal structure.

Informal writing introduces a different source of variation. A writer might use a shortened spelling, spell a borrowed expression by sound, or repeat letters. These changes can occur in either language. Identifying a token as English tells the system which vocabulary may help, but it leaves the intended standard English form to be recovered. Conversely, a token can already have conventional spelling and still require translation. The question of how a word is written and the question of which language the finished sentence should use therefore have different answers.

The intended output brings the two problems together. A standard Indonesian tweet can require a new spelling for a colloquial Indonesian word, a translation for an English word, and preservation of a title written in English. A single policy of replacing anything unfamiliar would put the title at risk. A policy of translating everything that looks English would still leave informal Indonesian spellings untouched. By assigning boundaries, labels, replacements, and a target-language rendering in succession, the authors give each decision a representation that can be inspected against a reference.

The authors explain the choice of languages through Indonesian usage. Bahasa Indonesia is the official language, English is used in settings such as education and business, and the paper describes mixing as common among younger Indonesians and in social media conversation. Its novelty claim is deliberately specific. To the authors’ knowledge, this was the first attempt to normalize Indonesian–English code-mixed language. They position it within established research on noisy text and multilingual processing. What they add is a pipeline and an annotated collection for their particular language pair and output task.

How earlier normalization work framed the task

The related work supplies several ways to connect informal forms to conventional ones. Liu and colleagues treat lexical normalization as sequence labeling. Their approach uses letter-level alignments between standard words and their variants and a conditional random field, a method for assigning labels to a sequence using observations and relationships among labels. The important connection to this paper is the level at which the evidence is represented. Letter sequences can reveal patterns that disappear when each spelling is treated as an unrelated entry. Barik and colleagues apply sequence labeling to finding token boundaries and assigning languages, then use a separate procedure to choose standard spellings.

Beckley’s approach to English normalization starts with a substitution list, adds rules for recurring patterns, and ranks the resulting choices at sentence level. As the paper describes it, the ranker uses a bigram procedure, so sequences of neighboring words help decide among proposed forms. This distinguishes candidate generation from candidate choice. A list or rule can supply a plausible replacement, and a separate operation can judge how it fits with surrounding words. The Indonesian–English pipeline also uses lists and rules. Its lexical replacement procedure works on individual tokens, so it makes a different choice about when surrounding words enter the process.

Sridhar’s unsupervised approach supplies a second way to find possible replacements. It uses word embeddings, numerical representations learned from word usage, to build a correspondence between nonstandard and standard English forms. The intuition is that words used in similar surroundings can be found near one another in that representation. For normalization, this gives a reason to examine a candidate whose surface form may be unlike the standard word. It also creates a problem for candidate selection, since words can appear in comparable contexts while carrying distinct meanings.

Hanafiah and colleagues take a dictionary-and-rules approach to Indonesian. The paper describes a system that uses a slang list and searches for dictionary candidates through the consonant skeleton of a word when it is outside the vocabulary. A consonant skeleton gives the search a way to treat missing vowels as a plausible source of variation. This is a different use of written form from looking at word distributions. Orthographic evidence can shrink the set of candidates even when the informal spelling has lost characters that an exact lookup would require.

For mixed-language text specifically, Singh and colleagues combine embedding information with Levenshtein distance, a measure of the edits between written forms. Their approach groups words using these signals and chooses a representative for each group. Other members can then be normalized to the representative. Barik and colleagues also use contextual and spelling evidence, but anchor the search in a standard vocabulary. They look outward from each accepted spelling for nearby corpus forms and use written similarity to resolve competition among standard entries for the same informal form.

Language labels and translation in earlier work

The paper cites Mave and colleagues for language identification in mixed social media text. They compared a conditional random field with a bidirectional recurrent approach, and the conditional random field performed better in the comparison described by the authors. The work informs both the choice of sequence labeling and the feature selection. Barik and colleagues follow its recommendation to leave part-of-speech tagging information out of the language identifier. Such tags describe how a word functions grammatically. The identifier in this study instead works from the written token, properties of its characters, and neighboring tokens.

Earlier pipelines also gave normalization an intermediate role. Bhat and colleagues included language identification, conversion back from transliterated writing, and normalization in a Hindi–English pipeline for dependency parsing, which analyzes syntactic relationships between words. The paper describes benefits for grammatical tagging and parsing in that earlier system. Barik and colleagues make a different endpoint explicit. Their experiment assesses the Indonesian text produced after translation, as well as the intermediate operations. It has no separate tagging or parsing experiment.

Dhar and colleagues supply the most direct precedent for the translation step. They adapted existing machine translation to mixed-language input by using the Matrix Language-Frame framework. In that account, one language supplies the grammatical structure of the utterance, while the other can supply vocabulary that is inserted into it. The distinction suggests a way to present mixed text to an ordinary translator. The system can first try to bring the vocabulary into the language that structures the passage. Barik and colleagues use a simple indicator of that language, the relative frequency of Indonesian and English words in a segment. The distinction between the linguistic idea and this practical approximation is important for understanding what the method can detect.

The method, step by step

The pipeline begins with the original characters of a tweet. It learns where text units begin, attaches a language label to each unit, and passes the labeled units to the spelling normalizer. That component can keep a unit, substitute a conventional form, or rewrite a construction using a language-specific rule. The translator joins the normalized material back into text, works out the dominant language for each segment, and produces an Indonesian version. Named entities are intended to survive the process in their original form.

From a mixed-language tweet to standard Indonesian

The steps in order.

From a mixed-language tweet to standard IndonesianStep 1: Find token boundaries in the tweet1. Find token boundaries in the tweetStep 2: Assign a language label to each token2. Assign a language label to each tokenStep 3: Standardize eligible words and expressions3. Standardize eligible words and expressionsStep 4: Reassemble the tweet and split at punctuation4. Reassemble the tweet and split at punctuationStep 5: Identify the dominant language of each segment5. Identify the dominant language of each segmentStep 6: Translate embedded words into the dominant language6. Translate embedded words into the dominant languageStep 7: Translate English segments into Indonesian7. Translate English segments into Indonesian

The tweet collections and the reference annotations

The authors use large monolingual collections as sources of word usage and a smaller mixed-language collection for the task annotations. The English source is a sentiment tweet collection with 1.6M tweets. The Indonesian source, from Adikara, contains 900K tweets. Their role in normalization is to supply examples of the contexts in which informal and conventional words are used. The authors test pooling the two sources and learning from them separately.

They assemble the Indonesian–English collection through the Twitter API. Their search starts with 100 English and Indonesian stopwords from Wiktionary. Stopwords are common words that can serve as search terms here because they give the collection procedure evidence of a particular language. For an English stopword, the request uses an Indonesian language filter. An Indonesian stopword is paired with an English filter. Each request thus combines a query word associated with one language and a tweet-level filter for the other. This search returns a mixed-language candidate collection of 49K tweets.

The language filter used in collection operates at the tweet level. It is distinct from the labels that the pipeline later assigns to units inside a tweet. A query can retrieve a tweet because it contains a common word from the other language, while annotation determines which units in that tweet belong to Indonesian, English, or the remaining class. The distinction matters when interpreting the collection. The search locates examples for examination. The task annotation supplies the target decisions for the pipeline.

The authors randomly select 825 tweets from the mixed collection. Two annotators label the data, and the resulting linguistic annotation covers each of the pipeline’s tasks. That gives the study a reference at the boundaries between stages as well as at the final output. For example, token identification can be checked before any spelling or translation is attempted. A translation comparison can also be described separately from the full run. The authors release the annotated data online for research use.

Finding boundaries without relying on spaces

A token in this study is a unit intended to move through the pipeline together. It can be a word, an idiom, an interjection, a number, an emoticon, a punctuation mark, or a Twitter entity such as a mention, link, or hashtag. A name can count as a single token even when it contains several written words. The choice of unit is tied to the transformations that follow. Keeping a title together lets the system recognize it as a name and preserve it through translation. Keeping a reduplicated expression together can give a rule access to its repeated parts.

Spaces give useful boundary evidence, but the paper’s examples illustrate several failures of a pure space split. Punctuation can sit next to surrounding words without a space. An expression can contain extra spaces inserted for effect. Indonesian writing raises another case involving di. As a preposition, it is separated in di kelas. As an affix, it remains attached in dimakan. The authors point out that informal writers can reverse those conventions. Then the boundary decision requires evidence beyond the presence or absence of a blank. This is where morphology, the structure of words and their parts, enters the problem.

The tokenizer reads the tweet as a sequence of characters and uses a scheme with three labels. B marks the start of a chunk, I marks a character inside one, and O marks a position outside a chunk. A chunk here is the span from which a token is recovered. In the paper’s example this car, the label sequence is BIIIOBII. The first letter of each word starts a span, the remaining letters continue it, and the space between the words receives the outside label. Assigning labels to characters gives the system a way to learn where a token starts even when spacing is unreliable.

The authors train a conditional random field, abbreviated CRF, on the reference boundaries. It scores label sequences using features of the observed text and dependencies among neighboring labels. In this task, a character’s label is informed by the character itself, whether it is alphabetic, whether it is a digit, whether it is upper-case, and the nearby character window. The paper gives the window setting as n = 5. Capitalization and digits can therefore contribute to the learned decision while nearby characters and the label sequence help situate them. The predicted chunks become the tokens passed to language identification.

Assigning languages to the tokens

The identifier works over that token sequence using a second CRF. The labels are id for Indonesian and en for English. The rest label covers units for which either assignment would be inappropriate or unclear, including proper names and numbers. This residual category keeps the downstream decisions closer to the needs of the task. A number can remain a number, and a name made up of familiar English words can be treated as a name rather than as ordinary English vocabulary.

The identifier sees the current token, its neighboring tokens, and spelling features of the current token. The listed indicators include whether it is alphabetic, numeric, or capitalized, whether it contains letters or digits, and whether it has an apostrophe. It also uses character n-grams, sequences of neighboring characters, at the reported setting n = 5. A character sequence can supply evidence even when the complete written form is unfamiliar. The paper gives a separate role to neighboring tokens as context. It leaves part-of-speech information out of the feature set.

The tokenizer and identifier thus make different decisions with the same general sequence-labeling machinery. The tokenizer observes characters and predicts boundaries. The identifier observes the resulting units and predicts language categories. If the tokenizer mistakenly joins words, the identifier has to label the combined unit using that combined spelling and its surroundings. If the tokenizer splits an expression that the annotations keep together, the identifier assigns labels to the pieces. This interface is one reason the study distinguishes evaluation of an individual component from evaluation of the result that goes through the whole pipeline.

Building the replacement dictionary

Lexical normalization receives tokens and their language tags. The aim is to replace an out-of-vocabulary form, abbreviated OOV, with an accepted equivalent. The relevant vocabulary is the standard word list used by the system. In practice, a token can be missing from that list because it is an abbreviation, a slang form, a spelling mistake, or a phonetic rendering. An expression can also need a construction-specific rewrite, as when Indonesian reduplication appears with a numeral or without a hyphen. The authors handle broadly shared word variants through a learned replacement dictionary and reserve hand-written rules for several recurring constructions.

The replacement dictionary uses Indonesian vocabulary from Kateglo and English vocabulary from Project Gutenberg. The authors train skip-gram embeddings on the tweet collections. A skip-gram representation learns from the association between a word and its surrounding words. For this task, the premise is that a conventional spelling and some of its variants occur in similar environments. Word usage therefore supplies a set of candidates before spelling similarity is used to settle disagreements.

For each standard entry, the authors retrieve its 100 most similar corpus words according to the embedding representation. If a retrieved word already belongs to the dictionary, it does not become a new OOV replacement pair. For a retrieved word outside the dictionary, the procedure records the standard entry as a candidate replacement. Doing this for every standard entry can give the same informal spelling several possible destinations. The authors then select the one with the highest lexical similarity to the informal spelling. Contextual similarity makes the candidate available. Written similarity determines which accepted spelling survives a conflict.

Learning replacements from surrounding words is unsupervised in the sense relevant to this stage. The authors do not need an annotated list connecting every informal corpus form to its intended conventional spelling in order to propose the pairs. The procedure still uses reference vocabularies to decide which forms count as standard and uses a lexical similarity function to choose among overlapping suggestions. Those sources of structure are important to what the resulting dictionary can contain. A candidate must become reachable through a standard entry before it can be selected as that entry’s informal variant.

The lexical similarity formula combines an ordered character match with edit distance.

lex_sim(s₁, s₂) = LCSR(s₁, s₂) / ED(s₁, s₂)

Here lex_sim is the lexical similarity score, and s₁ and s₂ are the two written forms being compared, an informal form and a standard candidate in the replacement procedure. LCSR is the longest common subsequence ratio, defined below. ED is the edit distance between the two forms, which measures how far apart their spellings are in terms of edits. The slash denotes division. Among distinct forms under comparison, the denominator favors a candidate that takes fewer edits to reach when the subsequence evidence is otherwise the same. The paper gives the function without specifying edit costs or a convention for a zero denominator.

LCSR(s₁, s₂) = LCS(s₁, s₂) / MaxLength(s₁, s₂)

LCSR is the longest common subsequence ratio for s₁ and s₂. LCS is the length of their longest common subsequence. A subsequence consists of characters found in the same order in both forms, with gaps allowed. MaxLength is the length of whichever of the two forms is longer. Dividing by that length expresses how much of the longer form can be matched in order. Taken together, the two formulas give the authors a way to reward shared character order and penalize editing effort.

Consider the distinction between the two kinds of evidence. A corpus can show that a short written form and an accepted word are used in similar contexts. Several accepted words may have that property. The ordered character comparison then helps favor the accepted word whose spelling the short form plausibly abbreviates. The strength of this design is also its constraint. A spelling match cannot select a conventional form that was never proposed by the embedding search. And a good contextual match can still fail the lexical ranking if a different proposal resembles the informal string more closely.

The authors store the resulting associations as a static mapping. At application time the normalizer can look up an OOV string without searching the embedding space again. They give execution time and memory as reasons for this choice. The stored mapping needs less space than the embedding representation in their account, and lookup avoids recalculating a candidate search. The paper describes the efficiency argument qualitatively. The task evaluation concentrates on the correctness of the replacements.

Combining lookups and rules at application time

The normalizer leaves rest tokens unchanged. The procedure also skips nonword items such as hyperlinks, mentions, hashtags, and emoticons. It handles multiword tokens by splitting them into words where appropriate, applying normalization, and joining them back into a token. This is where a token containing a repetition such as orang orang can acquire the hyphen of orang-orang. Splitting for this local operation serves a different purpose from creating permanent pipeline boundaries. The repeated parts need to be accessible to the normalizer even though the expression travels through the pipeline as a unit.

For eligible words, the procedure lowercases the input and examines alternatives for repeated characters. It caps runs at two and can also consider the shorter spelling. In the paper’s example, Pleasssseee yields pleassee, pleasee, pleasse, and please. Those alternatives reflect choices about the repeated s and e. Looking for a normal form among them allows an expressive spelling to be reduced while still giving ordinary doubled letters a chance to survive. If none of the alternatives is recognized as conventional, the procedure tries the rules and then the stored mapping.

Indonesian reduplication illustrates why a rule can be preferable to a general search for a similar word. In orang2, the digit signals repetition. The rule removes that marker, repeats the base, and writes the result with a hyphen. The separate rule for a missing hyphen applies when the parts are already present in a multiword token and the construction is recognized as reduplication. Both rules aim at orang-orang, but the input provides the repeated material in different ways. One gives an instruction to repeat it, and the other writes it out.

English contractions are handled with a list attributed to Kooten. The paper’s example im corresponds to i am, showing that a normalization can expand one input word into a phrase. For combinations of an English base and the Indonesian prefix nge-, the rule removes the prefix. Thus ngevote provides vote for subsequent processing. For the suffix -nya on an English base, the rule drops the suffix and places the before the base. In the paper’s example, jobnya becomes the job. The paper notes that -nya also has possessive uses, so the stated rule embodies a particular reading of the mixed construction.

Other informal forms are left to the distributional mapping when the earlier checks do not settle them. The paper lists misspellings, informal abbreviations, slang, and phonetic spellings in both languages. Its examples include the English ppl for people and the Indonesian lht for lihat. These exemplify a broad pattern of shortening, but the two lexical relationships are specific. A learned mapping gives the system a way to store them without requiring a rule that can reconstruct every word from omitted letters. At this stage the replacement is chosen for the token itself. The procedure does not perform the sentence-level reranking described in the earlier English work.

Translating through the dominant language

The translation module joins the normalized tokens into a tweet and splits the text using punctuation. The authors include commas alongside periods, question marks, and exclamation marks, so a processing segment can be shorter than an ordinary written sentence. Inside each segment, the system counts Indonesian and English words. The language with the higher count is the dominant language for processing, and the other is treated as embedded. Only the Indonesian and English counts serve this decision.

When Indonesian is dominant, the procedure translates the English material into Indonesian. When English is dominant, it first translates the Indonesian material into English and then translates the assembled English segment into Indonesian. The intermediate target thus depends on the segment. The final target is always Indonesian. The motivation from the Matrix Language-Frame framework is that the dominant language may provide the structure that makes the assembled passage suitable for the translator. Operationally, the implementation uses word counts as its evidence for that structure.

The translation service is Microsoft Machine Translation. The authors use it because a translator specialized for Indonesian–English mixed text was unavailable to them. Their pipeline organizes the input around a dominant language before asking the service to produce the final version. It also aims to preserve named entities. The paper illustrates the policy with The Lion King, which should remain the title in the output. The language tags and the earlier decision about where that entity begins and ends therefore matter even after spelling correction has finished.

Experiments and results

The annotated tweets and how they are scored

The annotated evaluation collection contains 825 Indonesian–English tweets selected from the larger mixed corpus. The dataset table records 22.736 tokens in total, with 11.204 marked id, 5.613 marked en, and 5.919 marked rest, using the paper’s notation for the counts. These are totals over the annotation units. A multiword name can count as a token, and the inventory includes punctuation and social media entities alongside words. The count of tokens thus describes the material passed through the tokenizer and identifier under the authors’ convention.

The collection has a code-mixing index of 33.37. The authors use the index to characterize its degree of language mixing and describe the level as fairly high. The reported agreement among annotators reached 97,92% on language identification and 99,23% on normalization. Agreement concerns the consistency of the human judgments supplying the references. The system scores answer a separate question, how often the automated output reproduces a reference decision or matches reference text under the metric for the task.

Tokenization and language identification are tested with 4-fold cross-validation. In this setting, parts of the labeled data take turns serving as held-out evaluation material while the remaining parts are used for training. Those two tasks have classifiers trained on the tweet annotations. Lexical normalization uses learned word distributions and rules, with comparisons across choices of corpus and rule use. Translation and the integrated pipeline are evaluated against reference wording. These experiments put different units under evaluation, from characters to distinct spellings to final tweets.

Precision and recall help describe the labeling results. Precision asks how often an item predicted as belonging to a class is correct. Recall asks how much of the reference class the system recovers. F1 combines the two, making it possible to distinguish a high score supported by both from a system that does well on only one. Accuracy measures the share of evaluated decisions counted as correct under the task definition. The paper reports the metrics for different tasks using their own evaluation units, so the numbers are most informative within each task.

Tokenization and language identification

The character-level tokenizer reaches 98.70 F1. This measures the assignment of boundary-related labels to characters. Token identification reaches 95.15 F1, measuring recovery of the resulting units. A boundary error can affect a complete unit even when most of the characters in it have the intended labels. The paper evaluates NLTK TweetTokenizer on token identification and reports 90.98 F1. That is the comparison at the shared level, because the NLTK result is reported for recovered tokens.

Token identification F1 on the annotated Indonesian–English tweets

The character sequence approach recovers the annotated tokens more successfully than NLTK TweetTokenizer.

Token identification F1 on the annotated Indonesian–English tweetsNLTK TweetTokenizer: 90.98NLTK TweetTokenizer90.98CRF tokenizer (this paper): 95.15CRF tokenizer (this paper)95.15
The numbers
System or settingF1
NLTK TweetTokenizer90.98
CRF tokenizer (this paper)95.15

Language identification reaches an overall 89.58 F1 and 90.11 accuracy in the reported cross-validation evaluation. For English tokens, the authors report 89.90 precision, 84.42 recall, and 87.07 F1. For Indonesian they report 88.13 precision, 96.22 recall, and 91.99 F1. The Indonesian class has the strongest recall and F1 of the reported classes. The English class has a higher precision than recall, indicating that the identifier recovers a smaller share of the reference English tokens than the share of its own English assignments that are correct.

For rest, the table gives 94.99 precision and 83.96 recall. It gives an F1 of 89.14, while the accompanying prose reports 89.44. The paper therefore gives conflicting values for that class’s F1. The precision and recall still show the asymmetry in its treatment. The label is comparatively reliable when assigned, and the system misses some reference units in the category. The authors report no competing identifier score on this collection.

Lexical normalization

The authors score normalization across unique OOV forms so repeated occurrences do not repeatedly contribute the same spelling to the evaluation. They also describe false positives involving standard words that are treated as OOV and incorrectly changed. A false negative occurs when the system misses an OOV word or fails to recover its intended standard form. The error definitions make preservation part of the task. A normalizer has to avoid unnecessary edits as well as find replacements.

With a pooled English and Indonesian corpus and no rules, the lexical normalizer reaches 47.49 F1 and 31.14 accuracy. With separate corpora and no rules, it reaches 48.34 F1 and 31.87 accuracy. Adding rules to the pooled setup produces 80.96 F1 and 68.01 accuracy. Adding rules with separated corpora produces the best reported setting, 81.31 F1 and 68.50 accuracy. In both metrics, the ordering is the same. Separating the corpora helps in each comparison, and the versions with rules score above both versions that rely on the mapping alone.

Lexical normalization F1 on distinct forms from the annotated tweets

Rules account for the largest improvement, and separate corpora give the highest reported score.

Lexical normalization F1 on distinct forms from the annotated tweetsCombined corpora: 47.49Combined corpora47.49Separate corpora: 48.34Separate corpora48.34Combined corpora with rules: 80.96Combined corpora with rules80.96Separate corpora with rules (this paper): 81.31Separate corpora with rules (this paper)81.31
The numbers
System or settingF1
Combined corpora47.49
Separate corpora48.34
Combined corpora with rules80.96
Separate corpora with rules (this paper)81.31

The unique-form unit gives the experiment a particular interpretation. An abbreviation that appears many times cannot dominate the score by sheer repetition. The result gives more visibility to the range of spellings the normalizer encounters. The study does not report a parallel occurrence-weighted result to show the effect on the stream of tokens entering translation. The full pipeline evaluation approaches that broader question through the final text, where repeated replacements can affect the output wherever they occur.

Translation on its own and in the pipeline

The authors evaluate translation with BLEU and word error rate, abbreviated WER. BLEU rewards overlap between the candidate text and the reference across word sequences. Higher scores indicate closer agreement under that metric. Word error rate reflects the edits needed to match the reference at word level, with lower scores indicating fewer errors under the measure. The two scores can move differently because overlap among word sequences and the changes needed to align full strings are different properties of the output.

In the separate translation evaluation, translation without the Matrix Language-Frame procedure scores 66.69 BLEU and 21.45 WER. With the procedure, it scores 71.54 BLEU and 19.50 WER. Both measures favor using the dominant-language translation step in that setting. This comparison is presented as an evaluation of the translation component. The integrated evaluation measures the pipeline from the raw tweet and its upstream processing through to the Indonesian output.

The integrated comparison has four settings. The raw tweet itself is the first baseline, scored against the final Indonesian reference. It reaches 46.07 BLEU and 45.75 WER. The next setting uses tokenization and translation without the dominant-language procedure, reaching 51.02 BLEU and 34.37 WER. The use of the raw tweet as a baseline gives the experiment a way to count how much the original wording already overlaps the target. Material already written in conventional Indonesian can match before any automated change is made.

The setting with tokenization, language labels, and Matrix Language-Frame translation scores 51.75 BLEU and 34.39 WER. Adding lexical normalization yields 54.07 BLEU and 31.89 WER for the full pipeline. This final setting is best on both reported metrics in the integrated comparison. The intermediate setting with dominant-language processing improves BLEU over translation without it, while WER is slightly higher. That mixed movement is part of the result alongside the stronger scores for the completed pipeline.

Word error rate against final Indonesian references in the pipeline experiment

The full pipeline gives the lowest word error rate, while the two translation settings without lexical normalization are close.

Word error rate against final Indonesian references in the pipeline experimentRaw tweets: 45.75Raw tweets45.75Tokenization and translation: 34.37Tokenization and translation34.37Tokenization, language labels and Matrix Language-Frame translation: 34.39Tokenization, language labels and MatrixLanguage-Frame translation34.39Full pipeline with lexical normalization (this paper): 31.89Full pipeline with lexical normalization(this paper)31.89
The numbers
System or settingWER
Raw tweets45.75
Tokenization and translation34.37
Tokenization, language labels and Matrix Language-Frame translation34.39
Full pipeline with lexical normalization (this paper)31.89

What the ablations show

Rules and corpus separation test different parts of normalization

The normalization comparison varies two choices. The authors either learn with the English and Indonesian collections pooled or learn from them separately. For each corpus arrangement they also run the normalizer with and without the rule component. This design lets the reader compare corpus arrangements while holding rule use fixed, and compare rule use while holding corpus arrangement fixed. It gives clearer evidence about the two contributions than a comparison between the weakest and strongest configurations alone would give.

Separate corpora give the better scores with or without the rules. Conditioning the candidate inventory on the word’s language offers a plausible reason for a benefit. An Indonesian variant can be sought in usage appropriate to an Indonesian entry, and an English variant in the corresponding English usage. The experiment establishes the direction of the score change for the tested settings. It does not show which retrieved words changed, which entries were added to the mappings, or how much each language contributed to the gain.

The change from adding rules is larger in both corpus settings. Construction-specific rewrites can express transformations beyond substituting a similar single word. Reduplication may require constructing a hyphenated repetition. A contraction can add a word, and the treatment of -nya can insert the while stripping the attached ending. The comparison supports using the rule inventory as a group on the annotated data. The authors do not report separate scores for individual rules, so the result cannot rank the contribution of the reduplication, contraction, or affix treatments.

The mapping-only settings still matter to the interpretation. They show what the distributional approach achieves when used without the hand-written additions. The strongest reported normalizer uses both sources of evidence. The measured rule effect is the improvement when rules are added to the mapping settings. With no rules-only row, the comparison leaves open how much the mapping adds to a system that already implements the rules. That distinction is important when asking which parts of the strongest configuration are essential.

The sampled errors show the cost of treating vocabulary membership as decisive

The authors examine a sample of incorrect decisions. They find that false positives frequently involve affixed words. In such a case, a form that should stay intact is incorrectly changed to its stem. A stem retains the base of the word, while an affix can contribute information needed in the sentence. If the base is a familiar dictionary entry, a proposed replacement can look plausible in isolation. Its plausibility as a word does not establish that it is equivalent to what the writer used.

The complementary problem occurs when an informal spelling is also an entry in the vocabulary. The authors give aja, commonly used in place of saja, as an example. Their Indonesian dictionary contains aja with other meanings. A vocabulary check can therefore accept a form whose interpretation in the tweet calls for normalization. This is a case where string identity gives conflicting evidence. The same written form can be conventional in one use and informal in another.

Together the examples identify a limit of context-free replacement decisions. A form outside the accepted inventory can be linguistically well formed, and a form inside that inventory can be nonstandard in the particular passage. The identifier uses neighboring tokens, and the replacement dictionary was learned from distributions over neighboring words. The normalizer still applies its selected mapping and rules to a particular token independently. The error sample explains how the information used to construct a dictionary may fall short of what is needed to interpret a specific occurrence.

Dominant-language processing helps most clearly in the translation comparison

With the translation component evaluated separately, the Matrix Language-Frame condition is better by both BLEU and WER than the condition without it. This supports the practical strategy of organizing mixed text around a dominant language in that experiment. The intervention includes counting languages and translating embedded material before the final pass where needed. The comparison estimates the effect of the procedure as a whole. It does not adjudicate whether a word count is the best estimate of the passage’s grammatical frame.

In the pipeline experiment, the closest comparison uses translation with and without that procedure before lexical normalization is added. The Matrix Language-Frame setting uses the language identifier as well as the dominant-language translation routine. Its BLEU score improves, while WER moves slightly in the unfavorable direction. The authors describe the stages as benefiting the final pipeline. The individual rows support a more precise account. The full configuration leads on both metrics, and the intermediate change to dominant-language processing helps one metric in this comparison.

The last comparison provides clearer evidence about lexical normalization in the integrated setup. Both neighboring settings already use the dominant-language translation procedure. The full configuration adds normalization and improves both scores. That result shows that correcting lexical forms can benefit the Indonesian output within the tested pipeline, beyond giving the normalizer a better score on its own task. It leaves the effect of individual word changes unresolved because the final tweet scores aggregate their consequences across the evaluation.

The tokenizer comparison addresses yet another question. The authors demonstrate closer recovery of their token units than they obtain with NLTK TweetTokenizer. The later experiments do not carry both tokenizers through otherwise identical complete pipelines. Likewise, there is no feature-removal evaluation for the language identifier. The scores and comparisons establish component performance at particular interfaces, with fewer grounds for attributing the full pipeline’s gains to one boundary feature, one language feature, or one rule.

Limitations

Limits the authors identify

The authors explicitly point to error propagation. Each output becomes part of the next stage’s input. A missed boundary can change which string is looked up, a wrong language label can send a word through the wrong rules, and an incorrect replacement can change the translator’s interpretation. The full pipeline’s scores are lower than the separate translation evaluation’s scores in the favorable directions on both metrics. The authors connect that gap to imperfect upstream output. Their explanation follows from the pipeline design, while the experiments do not measure the share of downstream error attributable to each upstream stage.

They also describe errors originating in the external translation service. Their intervention prepares the text and chooses a route through the translator. Choices internal to the service are outside the implementation they describe. This places a limit on what a better tokenizer or normalizer can achieve. Submitting a cleaner passage can help the translator make use of it, while a translation error can remain even after the upstream stages supply appropriate boundaries, tags, and forms. The paper identifies a translator designed for Indonesian–English code-mixed input as a resource they lacked.

The authors acknowledge the lexical normalizer’s dependence on hand-written rules. The rules give a large gain on their data, but the paper notes that language evolves. Rules for observed constructions can continue to address those constructions while new patterns arise outside their coverage. A stable replacement map likewise reflects the corpus and vocabulary from which it was built. The authors propose gathering more data and improving the techniques. The experiments do not test new periods of Twitter use or track how the rules and mapping age.

Limits visible in the collection and representation

Random selection operates within a collection built by stopword queries and opposite-language filters. The annotated tweets therefore represent the harvest defined by those choices. A mixed tweet that lacks one of the query terms can enter only if some other search request retrieves it. A tweet that does not meet the language filter is outside the results for that request. This gives the collection a practical way to obtain mixed material and also a reason to interpret performance in relation to that sampling procedure. The code-mixing index describes the resulting dataset. It does not establish the distribution of mixing across all Indonesian Twitter writing.

The annotation scheme itself defines what performance means. Treating a multiword title as one token is appropriate for preserving it in this pipeline, while another task could assign boundaries inside it. A system can score worse against the paper’s tokenization reference because it applies different unit conventions, even when some of its divisions are useful elsewhere. Likewise, rest combines units that are residual for different reasons. A number, a proper name, and another unit without a clear Indonesian or English label share a route through the pipeline. The class score does not reveal how well each type is handled.

Agreement is reported for language identification and normalization. The paper does not give corresponding agreement figures for the boundary decisions or final translations. The reader can see how consistent annotators were on the two reported tasks, but has less information about variation in judgments at the other interfaces. This matters especially for final text. Several Indonesian renderings may be plausible, and an overlap score depends on the wording available as the reference. The experiment measures agreement with the references it uses, with limited evidence about other acceptable forms.

A further constraint comes from the word-level treatment of language. The rule inventory recognizes examples with an English base and Indonesian affixes, yet the pipeline assigns a single language tag to the resulting token. The two choices are coherent for routing known constructions. They offer little expressiveness for describing mixed material whose internal pattern is absent from the rules. The paper gives no evaluation by affix type or by the position of language switches, so overall scores give limited guidance about where that representation works best.

Limits visible in the method and comparisons

The word-count heuristic approximates an idea about grammatical structure with a tally of language labels. A passage with many inserted lexical items could have most of its words from a language that does not supply its structure. This is a possible mismatch between the framework and the implementation, independent of mistakes by the identifier. The paper does not give a policy for tied counts or a separate score for identifying the grammatical frame. Punctuation-based segmentation also sets the scope of each vote. A comma can divide a passage whose parts depend on each other for interpretation, but the procedure makes its decision for the resulting segments.

Some implementation details also remain underspecified. The description gives the lexical similarity equations but omits conventions for equal scores and does not spell out the edit distance implementation. The normalization example shows a set of possible spellings after repeated characters are shortened, without detailing how to decide among several alternatives that might all be accepted words. The reported setup is enough to understand what kind of evidence each component uses. These missing choices matter to anyone trying to reproduce every individual prediction from the procedure.

The results permit comparisons among the configurations the authors test. They do not establish the performance of the pipeline against other complete systems for the task, since the full-pipeline baselines are the raw tweets and variants of the authors’ own procedure. The tokenizer has an external comparison with NLTK TweetTokenizer. The normalization comparison isolates corpus arrangement and the addition of rules, but offers no rules-only setting or test of contextual candidate selection. The small advantage of separate corpora is descriptive. The results give no uncertainty intervals or significance tests for that comparison.

The individual and integrated translation scores also need to be read with their conditions in view. Translation has its own evaluation, and the full run starts further upstream. The score gap is consistent with propagation, but isolating it would require evaluating the same downstream settings while substituting reference inputs for individual upstream predictions. The paper gives no such series. Its comparisons answer whether the tested full procedure improves reference agreement over its baselines. They are less specific about which upstream mistakes the translator can tolerate and which mistakes change the final wording.

Finally, BLEU and WER measure aspects of surface agreement. They do not separately identify whether a particular name was preserved, whether an Indonesian affix’s meaning survived, or whether the output is grammatical to a reader. The paper gives examples and a sample of normalization errors, alongside aggregate translation scores. It does not report a separate human assessment of meaning preservation or fluency, and it does not test whether the transformed tweets help a downstream analysis task. The evidence is therefore strongest for the annotated normalization decisions and the reported comparison against Indonesian reference text.

What came after

The citing work takes the problem of variable written input in several directions. IndoRobusta is closest in its attention to Indonesian code-mixing. It asks about robustness across diverse code-mixed Indonesian local languages, broadening the language combinations in view beyond the Indonesian–English pair treated by Barik and colleagues. The connection is the question of how well language technology handles input that crosses linguistic boundaries. The title and scope establish that connection without establishing reuse of the tweet collection or its normalization rules. IndoRobusta

Yong and colleagues study how to prompt multilingual systems to generate mixed-language text in Southeast Asian languages. This puts mixed-language writing on the output side of the task. Barik and colleagues begin with an observed mixed tweet and aim for a standardized Indonesian rendering. Yong and colleagues make the mixed text itself the intended result. The citation links studies that assign different roles to the same linguistic phenomenon, with the later work focused on generating it. Prompting Multilingual Systems to Generate Code-Mixed Texts

Yoo and colleagues use code-switching in red-teaming for safety and multilingual understanding. Here the language switch is part of the test input. Keeping it present lets the evaluation ask how a system responds when the input moves between languages. In the tweet pipeline, the switch supplies information for choosing a normalization or translation route. These tasks give the same property of the input different experimental roles, even though both depend on taking language variation inside an utterance seriously. Code-Switching Red-Teaming

CANDLE has a narrower point of contact with the method. It addresses noisy-character deduplication in Arabic using CTC and a lightweight encoder. Barik and colleagues handle repeated characters as one operation within lexical normalization, considering shorter alternatives before proceeding to rules or a stored mapping. CANDLE makes unwanted repetition the central problem in a different language. The citation connects a pipeline that includes character repetition among several sources of variation with later work that concentrates on that source of variation itself. CANDLE

Cite

Cite as Anab Maulana Barik, Rahmad Mahendra and Mirna Adriani. 2019. Normalization of Indonesian-English Code-Mixed Twitter Data. Proceedings of the 5th Workshop on Noisy User-generated Text (W-NUT 2019).

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/d19-5554

@inproceedings{barik2019normalization,
  title = {{Normalization of Indonesian-English Code-Mixed Twitter Data}},
  author = {Anab Maulana Barik, Rahmad Mahendra and Mirna Adriani},
  booktitle = {Proceedings of the 5th Workshop on Noisy User-generated Text (W-NUT 2019)},
  year = {2019},
  doi = {10.18653/v1/d19-5554},
  url = {https://doi.org/10.18653/v1/d19-5554}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/barik-2019-normalization-indonesian-english-code-mixed/