Neural Approaches for Data Driven Dependency Parsing in Sanskrit

Amrith Krishna, Ashim Gupta, Deepak Garasangi, Jivnesh Sandhan, Pavankumar Satuluri, Pawan GoyalarXiv 2020

Abstract

Data-driven approaches for dependency parsing have been of great interest in Natural Language Processing for the past couple of decades. However, Sanskrit still lacks a robust purely data-driven dependency parser. This can primarily be attributed to the lack of availability of task-specific labelled data and the morphologically rich nature of the language. In this work, we evaluate four different data-driven machine learning models, originally proposed for different languages, and compare their performances on Sanskrit data. We experiment with 2 graph-based and 2 transition-based parsers in a low-resource setting (1,500 sentences for training). We analyze the performance of the parsers using both an in-domain and an out-of-domain test dataset and investigate the impact of word ordering by parsing verses and their corresponding prose order (anvaya) sentences.

Introduction

Dependency parsing—mapping the grammatical structure of a sentence—has seen massive improvements thanks to neural networks. However, Sanskrit has largely missed out on robust, purely data-driven parsers due to a severe lack of labeled training data and the language's highly complex morphology and relatively free word order. Historically, Sanskrit parsing has relied heavily on hard-coded linguistic rules or required sentences to be manually rearranged into a logical prose order (anvaya) before parsing. This study evaluates how modern neural parsers perform "out-of-the-box" in a low-resource setting and how they handle the structural differences between Sanskrit poetry and prose.

Methods

The researchers evaluated four neural dependency parsers across two dominant paradigms: transition-based and graph-based. No Sanskrit-specific linguistic rules were hardcoded; the models relied entirely on the data and default feature functions.

Comparison of the four neural dependency parsers evaluated in the study.
  • Transition-based Parsers (YAP & L2S): These build parse trees incrementally. YAP (Yet Another Parser) is optimized for morphologically rich languages, while L2S (Learning to Search) uses a reinforcement-learning-like framework to recover from early prediction mistakes, mitigating exposure bias.
  • Graph-based Parsers (BiAFF & DCST): These score all possible word pairs to find the optimal tree. BiAFF (Dozat and Manning, 2017) uses BiLSTMs for word representations. DCST (Deep Contextualized Self-training) builds on BiAFF by using self-training on unlabelled data to create richer contextualized embeddings, which is particularly beneficial in low-resource scenarios.

Datasets

The models were trained on approximately 1,500 prose sentences from the Sanskrit Tree Bank Corpus (STBC). Evaluation was conducted on:

  1. In-domain Test: 1,000 prose sentences from the STBC.
  2. Out-of-domain Test: 300 sentences from the Śiśupāla-vadha corpus, evaluated in both original verse (poetry) order and rearranged prose (anvaya) order. This allowed the authors to isolate the exact impact of word ordering.

Results and Analysis

The study revealed a significant performance gap between prose and poetry parsing, highlighting the fragility of modern neural models to non-standard word orders.

The Poetry Crash

The most striking finding was the catastrophic drop in performance when parsing poetry. While Sanskrit is often considered a "free word order" language, models trained on prose failed significantly on verse. For instance, the DCST model's performance plummeted from 81.08 UAS on out-of-domain prose to 40.02 UAS on the same sentences in poetry order. This suggests that linear word arrangement heavily dictates neural parser success, even in morphologically rich languages.

Non-Projectivity and Self-Training

The failure in poetry is partly due to "non-projective" dependencies (crossing arcs), which occur in 19.24% of poetry dependencies compared to only 7.12% in prose. None of the evaluated models handled these crossing arcs effectively. However, DCST's self-training approach proved highly effective for low-resource prose, achieving the best overall performance (80.97 UAS in-domain) by leveraging unlabelled data to compensate for small treebanks.

Conclusion and Future Work

While neural models are showing promise, they currently struggle with the unique challenges of Sanskrit poetry and rely on pre-provided morphological tags. Future work aims to implement multi-task learning to jointly predict morphological tags and dependencies, and to develop strategies for handling non-projective arcs in verse, perhaps by incorporating Sanskrit-specific linguistic rules into the search process to prune invalid transitions.

Summary updated

BibTeX
@misc{krishna2020neural,
  author = {Amrith Krishna and Ashim Gupta and Deepak Garasangi and Jivnesh Sandhan and Pavankumar Satuluri and Pawan Goyal},
  title = {{Neural Approaches for Data Driven Dependency Parsing in Sanskrit}},
  year = {2020},
  eprint = {2004.08076},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2004.08076},
}
Figure