Skip to main content

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.

PyPI Documentation License

📚 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyarud-0.1.9.tar.gz (69.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyarud-0.1.9-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

Details for the file pyarud-0.1.9.tar.gz.

File metadata

  • Download URL: pyarud-0.1.9.tar.gz
  • Upload date:
  • Size: 69.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyarud-0.1.9.tar.gz
Algorithm Hash digest
SHA256 9145620ffd1a99431c874d14e3adbd1d9d557e57a278a7cd50d1cccf0cf2caa5
MD5 c7aa68e781183fce2779b8e8325f4477
BLAKE2b-256 0f7646ce7879c4b46b950bc6e8828e2096fb663c3c85aeab2e73e98990b38a22

See more details on using hashes here.

File details

Details for the file pyarud-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: pyarud-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyarud-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 2490cde65d7714cca19cc0759d701fdc61a321ea5541d62c4ac557b5b763d98c
MD5 c24a015361dbdb4677785fbc1a6b02e3
BLAKE2b-256 59d39346c0e13f7dedcde6c98a9cd27b41ae1f0c58623ea51319905bdf48c6b2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page