qran
Quran structured text API.
Python package to extract Quranic text in graphemic and archigraphemic representations, different Quranic encodings and Latin transliteration. The package works as a an API for the stuctured Quran.
This package can be very helpful for semiautomating the transcription of old Quranic manuscripts or fast lookups of script and typographic analysis.
Installation
pip install qran
Usage
As a python library
from qran import get_text, Index
>>> text = get_text(
... ini_index=Index(sura=1, verse=1, word=4, block=2),
... end_index=Index(sura=1, verse=2, word=2, block=-1),
... args={"blocks": True},
... )
...
>>> for grapheme_ar, grapheme, lt, archigrapheme_ar, arhigrapheme_lt in text:
... print(grapheme_ar, grapheme, lt, archigrapheme_ar, arhigrapheme_lt)
...
لرَّ LRᵚᵃ لر LR 1:1:4:2
حِيمِ GᵢB₂Mᵢ حٮم GBM 1:1:4:3
ا A ا A 1:2:1:1
لْحَمْدُ LᵒGᵃMᵒDᵘ لحمد LGMD 1:2:1:2
لِلَّهِ LᵢLᵚᵃHᵢ لله LLH 1:2:2:1
Alternatively, you can use a tuple of integers instead of an Index object:
>>> text = get_text(
... ini_index=(1, 1, 4, 2),
... end_index=(1, 2, 2, -1),
... args={"blocks": True},
... )
As a unix-like command:
$ qran 1:1:4:2-1:2:2 --blocks
لرَّ LRᵚᵃ لر LR 1:1:4:2
حِيمِ GᵢB₂Mᵢ حٮم GBM 1:1:4:3
ا A ا A 1:2:1:1
لْحَمْدُ LᵒGᵃMᵒDᵘ لحمد LGMD 1:2:1:2
لِلَّهِ LᵢLᵚᵃHᵢ لله LLH 1:2:2:1
License
This project is licensed under the MIT License for its source code.
It includes Quran text from the Tanzil Project, which is licensed under the Creative Commons Attribution 3.0 License.
© 2007–2021 Tanzil Project. The text is unmodified and used under Tanzil's terms of use: http://tanzil.net/docs/license
Author
Alicia González Martínez
Release files for qran 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| qran-1.0.1.tar.gz | 943.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| qran-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.9 MB
Release files / qran-1.0.1.tar.gz
| Download URL | qran-1.0.1.tar.gz |
|---|---|
| Size | 943.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
368ae050dd744048166a3e750997c52372184840bdb4f7402c87f236da6bd320
|
|
BLAKE2b-256 checksum How to use checksums |
762452a8e4c90d2a67687179aeaa34f86ac5422c804da582202b82df005d0923
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Release files / qran-1.0.1-py3-none-any.whl
| Download URL | qran-1.0.1-py3-none-any.whl |
|---|---|
| Size | 1.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ea3e9b6db0146b777f5dff53825dffa521c93480ff4afc607d626bbfb2b93e85
|
|
BLAKE2b-256 checksum How to use checksums |
c5a047af97c2670fb822d58745263fac01585889833de5d38dc01c50bc2b8c8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|