chandassu 2.0.0
First-ever Python library implementing 'Chandassu', metrical poetry in Global language(s)
License: MIT
Requires Python: >=3.11
Keywords: telugu, poetry, chandassu, prosody, nlp, natural-language-processing, computational-linguistics, indian-languages, metrical-analysis, cultural-preservation

![plot](https://drive.google.com/uc?id=10vpB4tgxXGa96IobZ-XfGKw6yE-nvzz-)


<div align= "center">

[![PyPI Downloads](https://static.pepy.tech/badge/chandassu)](https://pepy.tech/projects/chandassu)
![PyPI](https://img.shields.io/pypi/v/chandassu?color=gold)
[![arXiv](https://img.shields.io/badge/arXiv-2510.01233-b31b1b.svg)](https://arxiv.org/abs/2510.01233)
![License](https://img.shields.io/github/license/BodduSriPavan-111/chandassu?color=green)

</div>

Python library implementing "Chandassu", metrical poetry in global languages. </br>
Currently supported language(s):
- Telugu 

arXiv Preprint: [Read Here](https://arxiv.org/abs/2510.01233)
## Benchmarks
![plot](https://drive.google.com/uc?id=1AgPiEjLgJdUVIJV7JHdhkP5DF5YM5S9s)

Our algorithm achieves **91.73% accuracy** on the proposed Chandassu Score.

## Usage
Install package using
```py
pip install chandassu
```

Check padyam
```py
from chandassu.telugu.laghuvu_guruvu import LaghuvuGuruvu
from chandassu.telugu.padya_bhedam import check_padyam

data= """తొండము నేక దంతమును తోరపు బొజ్జయు వామ హస్తమున్
మెండుగ మ్రోయు గజ్జెలును మెల్లని చూపులు మందహాసమున్
కొండొక గుజ్జు రూపమున కోరిన విద్యలకెల్ల నొజ్జవై
యుండెడి పార్వతీ తనయ యోయి గణాధిప నీకు మ్రొక్కెదన్"""

# Generate LaghuvuGuruvu Sequence
lg_data= LaghuvuGuruvu(data= data).generate()

score= check_padyam( 
                        lg_data= lg_data ,
                        type= "vutpalamaala",
                        return_micro_score= True, 
                        verbose= False
                    )

print(score)
```

## Computational Architecture
![plot](https://drive.google.com/uc?id=11QYJbYhCnXtllPsWPj3FWwmxviDaHO_0)

- **nidhi.py:** Telugu alphabet classification with phonological categorizations </br>
- **panimuttu.py:** Vowel-consonant operations utility functions </br>
- **laghuvu_guruvu.py:** Prosodic analysis engine with tokenizer and syllabic weight classifier </br>
- **ganam.py:** Pattern repository mapping LaghuvuGuruvu sequences to metrical units </br>
- **padyam_config.py:** Configuration database for padyam type constraints and rules </br>
- **check_lakshanam.py:** Validation module for yati (caesura) and prasa (alliteration) </br>
- **padya_bhedam.py:** Main integration module for metrical assessment and evaluation </br>

## Notebooks:
1. web_scrapping.ipynb: Scraper scripts to collect data from andhrabharati.com
2. Data_Analysis.ipynb: Analyzes data using different visualizations
3. Chandassu_Generation.ipynb: Generates chandassu for the scraped data
4. Score_Generation.ipynb: Computes scores by after chandassu generation
5. Accuracy_Evaluation.ipynb: Benchmarking and accuracy (Chandassu Score) evaluation

## Eager to Contribute?
Any data, features, refactoring or **your innovative thought**, please check <a href= "https://github.com/BodduSriPavan-111/chandassu/blob/main/CONTRIBUTING.md">here</a>.

## Acknowledgements
Special thanks to Sesha Sai Vadapalli and Kalepu Nagabhushana Rao, maintainers of [andhrabharati.com](https://andhrabharati.com/). </br>
Appana Mohan Naga Phani Kumar for proofreading our article. </br>
Sincere gratitude to our parents and family members for their continuous support throughout this work. </br>
This work was undertaken with the grace of Sri Ramalinga Chowdeswari Devi.

## Citation
>@misc{pavan2025computationalsociallinguisticstelugu, </br>
>      title={Computational Social Linguistics for Telugu Cultural Preservation: Novel Algorithms for Chandassu Metrical Pattern Recognition}, </br>
>      author={Boddu Sri Pavan and Boddu Swathi Sree}, </br>
>      year={2025}, </br>
>      eprint={2510.01233}, </br>
>      archivePrefix={arXiv}, </br>
>      primaryClass={cs.CL}, </br>
>      url={https://arxiv.org/abs/2510.01233},  </br>
>}

## Thank You !