DepNeCTI: Dependency-based Nested Compound Type Identification for Sanskrit

Jivnesh Sandhan, Yaswanth Narsupalli, Sreevatsa Muppirala, Sriram Krishnan, Pavankumar Satuluri, Amba P. Kulkarni, Pawan Goyal

Abstract

Sanskrit is characterized by complex multi-part compounds, yet most NLP tools are limited to binary structures. We present DepNeCTI, a dependency-parsing framework designed to decode the internal hierarchy and semantic relations of nested Sanskrit compounds. By formulating compound analysis as a dependency task, DepNeCTI achieves a 13.1 F1 point improvement over existing models while operating five times faster.

Introduction

Sanskrit literature, particularly its poetic and philosophical traditions, frequently employs "multi-component compounds"—single lexical units composed of three or more individual components. While traditional Sanskrit NLP has focused on binary compounds (two parts), over 41% of compounds in the Digital Corpus of Sanskrit (DCS) are nested, containing three or more components. Understanding these requires identifying both the hierarchical structure (nesting) and the semantic relationships between components.

The Challenge of Nested Compounds

The structural ambiguity of a compound increases exponentially with the number of components, following the Catalan number sequence. For a three-part compound $(A-B-C)$, the structure could be $((A-B)-C)$ or $(A-(B-C))$. Determining the correct parse often requires sentence-level context, as the semantic "head" of the compound dictates its role in the broader syntax. Earlier research struggled with these long-form structures, often failing to capture the nuanced internal logic of the compound.

Methodology: The DepNeCTI Framework

The core innovation of DepNeCTI is the shift from constituency parsing to dependency parsing. While constituency trees are traditional for hierarchical structures, dependency parsing is more computationally efficient and directly identifies the "head" of a compound and its semantic label in a single step without requiring intermediate phrase nodes.

The authors developed two architectural variants:

  1. DepNeCTI-LSTM: Utilizes a Bi-LSTM encoder incorporating word, character, and specialized span encodings. The span encoding explicitly flags whether a token belongs to a compound, facilitating precise boundary detection.
  2. DepNeCTI-XLMR: Employs a pre-trained multilingual transformer (XLM-RoBERTa). This version uses simple bracket markers (e.g., <compound-parts>) within the input string to denote compound boundaries.

Both architectures utilize a Bi-affine dependency module to predict directed semantic relations. To integrate this into standard sentence parsing, a "Global" token is introduced to serve as the root for both compound components and standalone words.

Datasets and Evaluation

To benchmark the task of Nested Compound Type Identification (NeCTI), the researchers released two new human-annotated datasets:

  • NeCTIS: 17,656 nested compounds primarily from prose (philosophical and medical texts).
  • NeCTIS OOD (Out-of-Domain): 1,189 compounds from poetry (Epics/Pauranic), serving as a stress test due to the complex metrical constraints and unconventional structures found in Sanskrit verse.

Annotations include both coarse-grained (4 broad semantic types) and fine-grained (86 specific sub-types) labels.

Key Results and Insights

DepNeCTI-XLMR achieved a 90.83 Labeled Span Score (LSS) on the prose dataset, outperforming the previous state-of-the-art span classifier by over 13 absolute F1 points. Beyond accuracy, the dependency-based approach resulted in a 5-fold increase in inference speed compared to constituency-based baselines.

Key findings from the study include:

  • Contextual Necessity: Models performed significantly better when provided with the surrounding sentence context, confirming that Sanskrit compounding is a contextual rather than purely lexical phenomenon.
  • Span Encoding Efficacy: In the LSTM variant, span encoding allowed for 100% accuracy in compound location identification, a critical step for downstream parsing.
  • Robustness: The model maintained high performance on the OOD poetry dataset, demonstrating its ability to generalize to the creative "rule-breaking" often found in Sanskrit poetry.

Conclusion and Future Work

DepNeCTI represents a significant advancement in Sanskrit computational linguistics by providing a scalable, efficient method for decoding complex compounds. Future research directions include extending the framework to other languages with heavy compounding (such as German or Finnish) and integrating formal rules from Pāṇinian grammar to prune semantically impossible parses. Additionally, the authors aim to develop end-to-end systems that handle both segmentation (Sandhi splitting) and type identification simultaneously.

Summary updated

BibTeX
@inproceedings{sandhan2023depnecti,
  author = {Jivnesh Sandhan and Yaswanth Narsupalli and Sreevatsa Muppirala and Sriram Krishnan and Pavankumar Satuluri and Amba P. Kulkarni and Pawan Goyal},
  title = {{DepNeCTI: Dependency-based Nested Compound Type Identification for Sanskrit}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.findings-emnlp.914},
}
Figure