Skip to content

Repository files navigation

DAL-GAN-PS

A Dual-Adversarial Linguistic GAN with PhonoScript Constraints

Python PyTorch NLP Research GAN

DAL-GAN-PS is a dual-adversarial low-resource NLP framework for Sanskrit text generation using GANs, cross-lingual transfer learning, and PhonoScript linguistic constraints.


Overview

This project addresses one of the major challenges in Natural Language Processing (NLP): generating grammatically coherent text for morphologically rich low-resource languages.

The proposed framework, DAL-GAN-PS (Dual-Adversarial Linguistic GAN with PhonoScript Constraints), combines:

  • Generative Adversarial Networks (GANs)
  • Cross-lingual transfer learning
  • Linguistic discriminators
  • Rule-based phonological constraints
  • Transformer encoder-decoder architectures

The framework is specifically designed for Sanskrit text generation under limited-data conditions while preserving:

  • Morphological correctness
  • Sandhi compliance
  • Semantic coherence
  • Grammatical fidelity

Key Features

  • Dual-adversarial GAN architecture
  • Cross-lingual transfer from Hindi and Marathi
  • Transformer encoder-decoder pretraining
  • PhonoScript constraint module for Sanskrit grammar validation
  • Semantic + linguistic discriminator pipelines
  • Few-shot Sanskrit text generation
  • Morphological and sandhi-aware decoding
  • Research-focused low-resource NLP experimentation

Architecture

The DAL-GAN-PS framework consists of three major stages:

1. Cross-Lingual Knowledge Transfer

A transformer-based encoder-decoder model is pretrained on Hindi-Marathi corpora and fine-tuned on Sanskrit datasets to transfer syntactic and morphological knowledge.

2. Dual-Adversarial Training

The system introduces two discriminators:

  • Semantic Discriminator → evaluates fluency and semantic coherence
  • Linguistic Discriminator → validates grammatical correctness using Sanskrit linguistic rules

3. PhonoScript Constraint Module

A rule-based constraint engine using finite-state transducers (FSTs) validates:

  • Sandhi formation
  • Morphological agreement
  • Syntactic correctness
  • Sanskrit phonological structures

Research Contributions

  • Introduces a dual-adversarial GAN architecture for low-resource language generation
  • Combines neural generation with rule-based linguistic validation
  • Demonstrates effective cross-lingual transfer for Sanskrit NLP
  • Improves grammatical accuracy and semantic consistency under limited training data
  • Establishes a scalable framework for endangered and morphologically rich languages

Experimental Results

Performance Highlights

Metric DAL-GAN-PS
BLEU Score 42.67
ROUGE-L 54.90
Morphological Accuracy 91.2%
Sandhi Compliance 88.9%
Expert Grammatical Correctness 87.3%

Improvements Over Baselines

  • Significant improvement over SeqGAN and TextGAN
  • Faster convergence than Transformer NMT baselines
  • Better grammatical consistency in Sanskrit text generation
  • Strong semantic coherence under few-shot conditions

Tech Stack

  • Python
  • PyTorch
  • Transformer Models
  • GAN Architectures
  • NLP Pipelines
  • Rule-Based Linguistic Systems
  • Finite-State Transducers (FSTs)

Repository Structure

.
├── pipeline.py
├── tokenizers.py
├── rouge.py
├── scoring.py
├── utils.py
├── trainer.sh
├── distributed_trainer.sh
├── requirements.txt
└── setup.py

Installation

git clone https://github.com/n-ikitasingh/DAL-GAN-PS.git
cd DAL-GAN-PS
pip install -r requirements.txt

Running the Project

Training

bash trainer.sh

Distributed Training

bash distributed_trainer.sh

Evaluation

bash evaluate.sh

Applications

  • Sanskrit text generation
  • Low-resource NLP research
  • Linguistically constrained text generation
  • Endangered language preservation
  • Cross-lingual transfer learning
  • Morphological analysis systems

Publication

DAL-GAN-PS: A Dual-Adversarial Linguistic GAN with PhonoScript Constraints

Published in: https://ieeexplore.ieee.org/document/11469818

2025 International Conference on Electrical, Communication, and Computing Technologies (iCONECCT 2025)


Future Work

  • Adapter-based LLM integration
  • Expansion to Tamil and Navajo
  • Dynamic constraint learning
  • Multi-modal Sanskrit generation
  • Educational Sanskrit AI tools
  • Speech and handwritten text synthesis

About

DAL-GAN-PS: A dual-adversarial low-resource NLP framework for Sanskrit text generation using GANs, cross-lingual transfer, and PhonoScript linguistic constraints.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages