Pyarud
Arabic Arud (prosody) toolkit for Python. Features meter detection, tafeela analysis, and support for all 16 poetic meters with strict type safety.
Install / Use
/learn @cnemri/PyarudREADME
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.
Related Skills
openhue
349.0kControl Philips Hue lights and scenes via the OpenHue CLI.
sag
349.0kElevenLabs text-to-speech with mac-style say UX.
weather
349.0kGet current weather and forecasts via wttr.in or Open-Meteo
tweakcc
1.6kCustomize Claude Code's system prompts, create custom toolsets, input pattern highlighters, themes/thinking verbs/spinners, customize input box & user message styling, support AGENTS.md, unlock private/unreleased features, and much more. Supports both native/npm installs on all platforms.
