Extending the Frontiers of QNLP Beyond English: Grammar-Sensitive Pipeline for Hindi Sentiment Classification Using Compositional Quantum Models
摘要
Advancements in Natural Language Processing (NLP) have predominantly focused on English due to its global usage and the abundance of linguistic resources, whether via classical or quantum platforms. Although English remains the most studied language in computational linguistics, Hindi, the third most spoken language worldwide after Mandarin, has received comparatively limited attention. Spoken primarily in India, Hindi differs significantly from English in its script, syntactic structure, and cultural-linguistic context. Linguistically, English belongs to the Germanic branch of the Indo-European family, whereas Hindi, derived from Sanskrit, is part of the Indo-Aryan branch. It uses the Devanagari script, exhibits rich morphological inflection, and follows a subject-object-verb (SOV) order, in contrast to English’s relatively simpler morphology and subject-verb-object (SVO) structure. These typological differences make Hindi a compelling candidate for exploring the generalization capacity of quantum-enhanced NLP models. Motivated by Hindi’s syntactic and morphological complexity and its underrepresentation in both classical and quantum NLP research, we propose a grammar-aware Quantum NLP (QNLP) pipeline for Hindi sentiment classification. A key focus is on handling sentential negation, a linguistic feature inadequately addressed in current models. Most QNLP implementations are limited to English and lack grammar-sensitive methods for morphologically rich and syntactically flexible languages. We use a manually annotated dataset of Hindi sentences labeled as positive, negative, or neutral, and encode them using pregroup grammar types. Sentences are processed through Lambeq, generating quantum circuits using a novel, negation-aware compositional grammar. We train Hybrid Quantum Neural Networks (HQNNs) for both binary and ternary sentiment classification. Our results demonstrate successful classification performance and showcase QNLP’s potential for typologically diverse languages.