Universal Dependency Parsing for Hindi-English Code-Switching

Irshad Ahmad Bhat, Riyaz Ahmad Bhat, Manish Shrivastava, Dipti Misra Sharma

Introduction: The Challenge of Code-Switched Dependency Parsing

Code-switching (CS)—the fluid alternation between two or more languages within a single conversation or sentence—is a hallmark of multilingual communication, particularly on social media platforms like Twitter. For Natural Language Processing (NLP) systems, however, CS data presents a "perfect storm" of linguistic and technical hurdles.

Standard dependency parsers, typically trained on clean, monolingual corpora, struggle with the unique characteristics of CS text:

  1. Orthographic Noise: Social media users frequently employ non-standard spellings, abbreviations, and Romanized scripts for languages like Hindi (back-transliteration).
  2. Structural Complexity: CS sentences often blend disparate syntactic rules, such as Hindi’s Subject-Object-Verb (SOV) order with English’s Subject-Verb-Object (SVO) order.
  3. Data Scarcity: While massive treebanks exist for monolingual English and Hindi, annotated code-switched datasets are extremely rare.
Example of Hindi-English code-switching with mixed grammatical structures.

As shown in the figure above, a single sentence can contain fragments governed by different grammars, making it difficult for a traditional parser to maintain structural coherence across language boundaries.

Proposed Methodology

To address these challenges, the authors propose a multi-stage pipeline designed to bridge the gap between noisy, mixed-language input and structured Universal Dependency (UD) trees.

1. Language Identification and Normalization

The first stage involves identifying the language of each token using a Bi-LSTM network. Once identified, the system must handle "text-speak" and Romanized Hindi. The core innovation here is a 3-step decoding process for normalization:

  • Step 1: Convert Hindi words to English equivalents using a bilingual lexicon to create a "pseudo-English" sentence.
  • Step 2: Similarly, create a "pseudo-Hindi" sentence.
  • Step 3: Use monolingual language models to score these sequences, selecting the most likely standard forms based on surrounding context.
The 3-step decoding process for normalizing noisy code-switched text.

This approach allows the system to resolve ambiguities (e.g., "pt" could be "put" or "part") by leveraging the contextual strengths of large monolingual language models.

2. Neural Stacking for Parsing

Rather than training a parser solely on limited CS data, the authors utilize a neural stacking architecture. In this framework, a base CS parser is augmented with features from "source" parsers trained on extensive monolingual Hindi and English treebanks. By "consulting" these monolingual experts, the CS model can better interpret the individual language fragments within a mixed sentence, effectively transferring structural knowledge from high-resource languages to the low-resource CS domain.

Datasets and Experimental Setup

The study introduces a new CS treebank consisting of 1,448 Hindi-English tweets, manually annotated according to the Universal Dependencies v2 scheme. For the stacking architecture, the authors utilized standard Hindi and English UD treebanks. Normalization data was sourced from transliteration projects like Libindic and Brahmi-Net, supplemented by synthetically generated noisy English forms to simulate social media text.

Experimental Results

The proposed pipeline demonstrates significant performance gains over standard approaches:

  • Parsing Accuracy: The neural stacking model achieved a 1.5% improvement in Labeled Attachment Score (LAS) compared to simple data augmentation (merging datasets).
  • Normalization Impact: The 3-step decoding process proved critical, boosting parsing results by 3.8% LAS over using the "first-best" output from a standard normalization model.
  • State-of-the-Art Performance: The system reached an LAS of 72.44% with gold-standard language tags and 71.03% in a fully automated setting, outperforming previous benchmarks for Hindi-English CS data.

Key Insights and Future Directions

The primary takeaway is that monolingual knowledge is essential for parsing code-switching. Because the structural rules of constituent languages still apply to their respective fragments, neural stacking provides a robust mechanism for knowledge transfer. Furthermore, context-aware normalization is vital for stabilizing the parser when dealing with the inherent ambiguity of social media orthography.

Future work may involve extending this methodology to other language pairs and exploring more advanced cross-lingual representations to further refine the handling of lexical and syntactic diversity in code-switched environments.

Summary updated

BibTeX
@inproceedings{bhat2018universal,
  author = {Irshad Ahmad Bhat and Riyaz Ahmad Bhat and Manish Shrivastava and Dipti Misra Sharma},
  title = {{Universal Dependency Parsing for Hindi-English Code-Switching}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2018},
  doi = {10.18653/v1/n18-1090},
}
Figure