Metadata-Version: 2.4
Name: pyarud
Version: 0.1.3
Summary: A Python library for Arabic prosody (Arud) analysis.
Author-email: Chouaieb Nemri <chouaib.nemri@gmail.com>
License: MIT License
        
        Copyright (c) 2022 Maged Saeed
        Copyright (c) 2025 Chouaieb Nemri
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Requires-Python: >=3.12
Requires-Dist: pyarabic>=0.6.15
Provides-Extra: dev
Requires-Dist: mypy>=1.9.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.3.0; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs-material>=9.5.0; extra == 'docs'
Requires-Dist: mkdocs>=1.5.0; extra == 'docs'
Requires-Dist: mkdocstrings[python]>=0.24.0; extra == 'docs'
Description-Content-Type: text/markdown

# PyArud (بيعروض)

**PyArud** is a robust Python library for Arabic prosody (Arud) analysis. It detects poetic meters (Buhur), analyzes verses foot-by-foot, and identifies variations (Zihaf) and defects (Ellah) with granular precision.

[![PyPI](https://img.shields.io/pypi/v/pyarud)](https://pypi.org/project/pyarud/)
[![Documentation](https://img.shields.io/badge/docs-live-blue)](https://cnemri.github.io/pyarud/)
[![License](https://img.shields.io/github/license/cnemri/pyarud)](LICENSE)

## 📚 Documentation

Full documentation is available at **[cnemri.github.io/pyarud](https://cnemri.github.io/pyarud/)**.

## ✨ Features

- **Smart Meter Detection**: Automatically identifies the 16 standard meters.
- **Granular Analysis**: Detailed breakdown of each foot (Tafeela) with status codes (`ok`, `broken`, `missing`, `extra_bits`).
- **Arudi Conversion**: Built-in text processing to handle Arabic diacritics and phonetic writing.
- **Robust**: Handles common poetic variations (Zihaf) and obligatory endings (Ellah).

## 🚀 Installation

Requires Python 3.12+.

```bash
pip install pyarud
```

## ⚡ Quick Start

```python
from pyarud.processor import ArudhProcessor

# Initialize the processor
processor = ArudhProcessor()

# Define a verse (Sadr, Ajuz)
verse = ("أَخِي جَاوَزَ الظَّالِمُونَ الْمَدَى", "فَحَقَّ الْجِهَادُ وَحَقَّ الْفِدَا")

# Process the poem
result = processor.process_poem([verse])

print(f"Detected Meter: {result['meter']}")
# Output: mutakareb
```

## 🛠️ Advanced Usage

For detailed tutorials, debugging guides, and API reference, please visit the [Documentation](https://cnemri.github.io/pyarud/).

## 🤝 Contributing

Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.

## 📄 License

This project is licensed under the [MIT License](LICENSE).
