Skip to content

small python script for Arabic phonetic transcription

Notifications You must be signed in to change notification settings

Tariha/transcription

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phonetic Transcription

The phonetic transcription below is based on the scheme found in Arabic Through the Quran by Alan Jones (Islamic Texts Society, 2008). The correct form of pronunciation will depend on context, especially for the letters hamza and alif maksūra. The basic form of transcription is shown below.

Phonetic transcription for letters

Letter Transcription
0 alif ā
1 b
2 t
3 thā th
4 jīm j
5 ḥā
6 khā kh
7 dāl d
8 dhāl dh
9 r
10 zāy z
11 sīn s
12 shīn sh
13 ṣād
14 ḍād
15 ṭā
16 ẓā
17 ʿayn ʿ
18 ghayn gh
19 f
20 qāf q
21 kāf k
22 lām l
23 mīm m
24 nūn n
25 h
26 wāw w
27 y
28 hamza '
29 alif maksura ā
30 ta marbūta t

Phonetic transcription for diactrics

Diacritic Transcription
0 fathatan an
1 dammatan un
2 kasratan in
3 fatha a
4 damma u
5 kasra i
6 shadda (double)
7 sukūn '

The long vowels are indicated by āī and ū, and the maddah may also be used to lengthen a vowel. The shadda is indicated by the doubling of a letter

Usage

Python 3.9 or later required

pip install arab-transliterator
python -m arab_transliterator.transliterator [-t arab_text] [-f arab_file]

Ex1.

python -m arab_transliterator.transliterator -t "وَلَقَدْ آتَيْنَا مُوسَى الْكِتَابَ وَقَفَّيْنَا مِن بَعْدِهِ بِالرُّسُلِ ۖ وَآتَيْنَا عِيسَى ابْنَ مَرْيَمَ الْبَيِّنَاتِ وَأَيَّدْنَاهُ بِرُوحِ الْقُدُسِ ۗ أَفَكُلَّمَا جَاءَكُمْ رَسُولٌ بِمَا لَا تَهْوَىٰ أَنفُسُكُمُ اسْتَكْبَرْتُمْ فَفَرِيقًا كَذَّبْتُمْ وَفَرِيقًا تَقْتُلُونَ
"

output

walaqad ’ātaynā mūsá l-kitāba waqaffaynā min baʿdihi birrusuli  wa’ātaynā ʿīsá b-na maryama l-bayyināti wa'ayyadnāhu birūḥi l-qudusi  afakullamā jā'akum rasūlun bimā lā tahwá anfusukumu s-takbartum fafarīqan kadhdhabtum wafarīqan taqtulūna

Ex2

>>> from arab_transliterator.transliterator import ArabTransliterator
>>> Trans = ArabTransliterator()
>>> Trans.translate("وَفَرِيقًا تَقْتُلُونَ")
'wafarīqan taqtulūna'
>>>

Contributors

Feel free to contribute by making pull-requests or writing issues. Thanks

About

small python script for Arabic phonetic transcription

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%