A Python library for Arabic prosody (Arud) analysis.
Project description
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.
📚 Documentation
Full documentation is available at 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+.
pip install pyarud
⚡ Quick Start
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.
🤝 Contributing
Contributions are welcome! Please see CONTRIBUTING.md for details.
📄 License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyarud-0.1.5.tar.gz.
File metadata
- Download URL: pyarud-0.1.5.tar.gz
- Upload date:
- Size: 69.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fd09e1348c065d01cb5cdb7a2db6b5937306c4fc85473ab90cc9c9623616e76
|
|
| MD5 |
d8ce49a59b16251f27d8083d2e408510
|
|
| BLAKE2b-256 |
3c8e22aa9bb4d616ca851f81f52d6ab39e9d0b99fc8c5f002f2b2eff11ba0d5a
|
File details
Details for the file pyarud-0.1.5-py3-none-any.whl.
File metadata
- Download URL: pyarud-0.1.5-py3-none-any.whl
- Upload date:
- Size: 19.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
327e2d32706f8d81ec7cf9458b90b44655b8c2aca53808d14782b405b7d9dd64
|
|
| MD5 |
60a8d81234ab71e69272b552a6371a32
|
|
| BLAKE2b-256 |
a514d5224cb806da55c288fb27d5b8930047d2c46ab2fac383e41508085f6310
|