CoMeT: Towards Code-Mixed Translation Using Parallel Monolingual Sentences

Devansh Gautam, Prashant Kodali, Kshitij Gupta, Anmol Goel, Manish Shrivastava, Ponnurangam Kumaraguru

Introduction

In multilingual societies, code-mixing—the practice of alternating between two or more languages in a single conversation—is a prevalent linguistic phenomenon. Despite its ubiquity in informal digital communication, code-mixed data presents significant challenges for machine translation (MT) systems. This paper introduces CoMeT, a framework designed to translate English sentences into "Hinglish" (a code-mixed blend of Hindi and English) by leveraging pre-trained multilingual models and addressing the lack of standardized orthography.

The Challenges of Code-Mixed Translation

Translating into code-mixed languages like Hinglish is difficult due to three primary factors:

  1. Data Scarcity: Unlike monolingual languages, there are few formal corpora for code-mixed text.
  2. Orthographic Variation: There is no standard for writing Hindi words in the Roman script. A single word can have numerous phonetic spellings (e.g., bahut, bohot, vut).
  3. Structural Fluidity: Code-mixing patterns vary significantly between speakers and contexts, lacking rigid grammatical rules.
Figure 1: Distribution of the number of spellings for a single Hindi word, illustrating the high degree of orthographic variation in Romanized Hindi.

Methodology

The researchers utilized mBART, a multilingual sequence-to-sequence model, and implemented several key strategies to adapt it for code-mixed translation:

Script Alignment and Transliteration

mBART is pre-trained on Hindi in the Devanagari script, whereas Hinglish typically uses the Roman script. To bridge this gap, the authors transliterated the Hinglish training data into Devanagari. This allowed the model to leverage its pre-existing knowledge of Hindi grammar and semantics.

Parallel Input (mBART-hien)

To guide the model, the authors experimented with a "hinting" mechanism. The input to the model consisted of the source English sentence concatenated with its machine-translated Hindi equivalent. This additional context helps the model determine which segments should remain in English and which should be converted to Hindi.

Normalized BLEU Metric

To account for spelling variations that penalize standard BLEU scores, the authors proposed Normalized BLEU. This metric involves converting both the model's output and the reference translation back into the Devanagari script before calculating the score, ensuring that phonetic matches are recognized regardless of Romanized spelling.

Results and Discussion

The performance of the CoMeT models was evaluated on the CALCS 2021 Task 1 dataset. The results demonstrate that while standard BLEU scores are useful, they often underestimate model quality due to orthographic noise.

Figure 4: Comparison of BLEU and Normalized BLEU scores for mBART-en and mBART-hien models on validation and test sets.

As shown in Figure 4, the Normalized BLEU scores are significantly higher than the standard scores (e.g., 20.2 vs 14.6 for mBART-hien on the validation set). This confirms that a substantial portion of the "errors" identified by standard metrics are merely harmless spelling variations. While mBART-en achieved a higher raw BLEU on the test set (12.22), human error analysis suggested that mBART-hien often produced semantically superior translations.

Limitations and Future Directions

Manual review of the dataset revealed that approximately 15% of the reference translations were incorrect or distorted. Additionally, many sentences labeled as code-mixed were actually monolingual, as evidenced by low Code Mixing Index (CMI) scores.

Future research will focus on:

  • Implementing constraints to control the degree of code-mixing in the output.
  • Enhancing data augmentation techniques to generate high-quality synthetic code-mixed examples.
  • Refining transliteration processes to better handle informal slang and non-standard abbreviations.

Conclusion

CoMeT demonstrates that pre-trained multilingual models can be effectively adapted for code-mixed translation by aligning scripts and providing monolingual hints. By introducing Normalized BLEU, the authors provide a more accurate way to measure progress in low-resource, high-variance linguistic domains.

Summary updated

BibTeX
@inproceedings{gautam2021comet,
  author = {Devansh Gautam and Prashant Kodali and Kshitij Gupta and Anmol Goel and Manish Shrivastava and Ponnurangam Kumaraguru},
  title = {{CoMeT: Towards Code-Mixed Translation Using Parallel Monolingual Sentences}},
  booktitle = {CALCS @ NAACL},
  year = {2021},
  doi = {10.18653/v1/2021.calcs-1.7},
}
Figure