-2

I am not concerned with the exact IPA pronunciation, which might depend on dialect and culture and other factors. Instead I'm wondering if it's relatively straightforward to "transliterate" Arabic into some romanized form.

Right now I have a very basic Arabic transliterator. It simply has a mapping of the Arabic character to the desired romanized character. I simply copy/pasted directly from Wikipedia essentially. However, even after accounting for all the consonants and vowels, when I pasted in some Quran data and tried to transliterate it, I quickly ran into 3 problems. 2 were related to Hamzas (one on the top, one on the bottom), and another to Shadda, some other diacritical mark that seems like it can be ignored in the transliteration.

The input was this:

بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ
الْحَمْدُ لِلَّهِ رَبِّ الْعَالَمِينَ
الرَّحْمَٰنِ الرَّحِيمِ
مَالِكِ يَوْمِ الدِّينِ
إِيَّاكَ نَعْبُدُ وَإِيَّاكَ نَسْتَعِينُ
اهْدِنَا الصِّرَاطَ الْمُسْتَقِيمَ
صِرَاطَ الَّذِينَ أَنْعَمْتَ عَلَيْهِمْ غَيْرِ الْمَغْضُوبِ عَلَيْهِمْ وَلَا الضَّالِّينَ

The output that Quran411 has is this:

Bismillaahir Rahmaanir Raheem
Alhamdu lillaahi Rabbil 'aalameen
Ar-Rahmaanir-Raheem
Maaliki Yawmid-Deen
Iyyaaka na'budu wa lyyaaka nasta'een
Ihdinas-Siraatal-Mustaqeem
Siraatal-lazeena an'amta 'alaihim ghayril-maghdoobi 'alaihim wa lad-daaalleen

You'll notice here though, that for example, the first line in the transliteration is 3 words ("Bismillaahir Rahmaanir Raheem"), while the Arabic script is 4 words ("بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ").

When I run my script over this, it doesn't throw an error which is great. All the characters are accounted for so far. But I get this:

bismi alllahi alr̂r̂aḥmaani alr̂r̂aḥiimi
alḥamdu lillahi r̂abbi al'aalamiina
alr̂r̂aḥmaani alr̂r̂aḥiimi
maaliki yawmi alddiini
'iiiiaaka na'budu wa'iiiiaaka nasta'iinu
aahdinaa als's'ir̂aat'a almustak̤iima
s'ir̂aat'a alalac̣iina 'an'amta 'alayhim ṙayr̂i almaṙd'uubi 'alayhim walaa ald'd'aalliina

First, notice that it matches the arabic word number exactly, whereas Quran411 didn't. So that's good (but also obvious given the script). But also notice that some of the words have 3 or 4 letters in a row, like iiii in iiiiaaka.

Side-by-side comparison to make it a little easier to see is this:

Bismillaahir Rahmaanir Raheem
bismi alllahi alr̂r̂aḥmaani alr̂r̂aḥiimi

Alhamdu lillaahi Rabbil 'aalameen
alḥamdu lillahi r̂abbi al'aalamiina

Ar-Rahmaanir-Raheem
alr̂r̂aḥmaani alr̂r̂aḥiimi

Maaliki Yawmid-Deen
maaliki yawmi alddiini

Iyyaaka na'budu wa lyyaaka nasta'een
'iiiiaaka na'budu wa'iiiiaaka nasta'iinu

Ihdinas-Siraatal-Mustaqeem
aahdinaa als's'ir̂aat'a almustak̤iima

Siraatal-lazeena an'amta 'alaihim ghayril-maghdoobi 'alaihim wa lad-daaalleen
s'ir̂aat'a alalac̣iina 'an'amta 'alayhim ṙayr̂i almaṙd'uubi 'alayhim walaa ald'd'aalliina

Granted, I am not transliterating into the same exact encoding/character system, so there will be slight inherent differences. But also notice that they seem to be combining words in ways which weren't present in the original Arabic script. For example:

Rabbil 'aalameen
r̂abbi al'aalamiina

Mine (2nd one) puts an al at the start of the 2nd word, whereas they put just an l on the end of the 1st word. Also, there is an a at the end of mine.

Another example is this pair:

Ar-Rahmaanir-Raheem
alr̂r̂aḥmaani alr̂r̂aḥiimi

I have al, they have Ar (ignoring the caps, but r != l). They end first word in r, mine is missing that r. They start the last word in R, mine for some reason prefixes it with al. I am so confused?! Are they cheating? Of is this just not going to work :(

Now, I would just go about my business and debug this, but I seem to be quite a ways off, even though I followed the directions on Wikipedia (however roughly), to write the simple mappings between characters. I'm wondering if one could point me in the right direction, either pointing out my technical mistakes, or if I need some more education/training around this, where I can look online (what specific free resource)?

Or maybe Quran411 is actually a bad resource, and I could be using something more academic?

6
  • 1
    I'm curious about your transliteration: why are you transcribing /r/ with a circumflex, for example? – Draconis Mar 15 '20 at 20:11
  • 3
    (Or rather—there are already quite a lot of standards for transcribing Arabic; why do it differently? I personally don't follow any of those standards exactly, because e.g. it's easier for me to type ħ than ḥ on my keyboard, but I'm curious about your reasoning.) – Draconis Mar 15 '20 at 20:22
  • The arabic chat one is my favorite standard for sure :D Most natural. – Lance Pollard Mar 15 '20 at 23:34
  • @Draconis what do you do across languages, do you already have a system? – Lance Pollard Mar 15 '20 at 23:34
  • 2
    Personally, I find it a lot easier to distinguish k c q than k ḳ k̤, so I'd prefer the IPA. (I like new symbols more than diacritics in general.) But once you get into replacing the IPA that's really deserving of a separate question instead of a comment; the IPA absolutely does have flaws, and if you want to ask what those flaws are and how they might be remedied, that's a viable new question. – Draconis Mar 16 '20 at 1:29
3

I suggest consulting A reference grammar of Modern Standard Arabic by Karin Ryding, which has a detail discussion of the script. Your conversion routine has to include some context-sensitive replacement. For example, alif is not per se the vowel a, it is a "chair" on which the vowel mark can reside. The other issue is that your source is somewhat at variance with standard practice for transliteration: bismi llaahi rraḥmaani r̂r̂aḥiimi would be closer. However, that alternative source doesn't even try to represent the Arabic distinctions (h versus ḥ, s,t,d versus ṣ,ṭ,ḍ, ʕ vs. γ).

You need to first decide what type of transliteration you are after. This is the Library of Congress system. I think maybe that plus Ryding would be enough for you to write bidirectional conversion. There are some standards which avoid the problematic digraphs dh, th, sh, gh, kh which could be read as a biconsonantal sequence as well, but they is not as popular (see Wright's grammar, Wehr's dictionary). Thus, γ could be ġ and ʃ can be ś, but both Wehr's and Wright's systems resort to underlining, which is not a computationally easy option. I prefer biting the bullet and using θ, ð, γ, š, ymmv.

2
  • Of course your book is $300 to buy :( haha – Lance Pollard Mar 15 '20 at 23:25
  • 1
    There is the Icelandic pirate version, and about $35 for used paperback versions. But, yeah. – user6726 Mar 15 '20 at 23:35
2

There are a few major issues you're running into. None of them are unsolvable! But I'd recommend reading up more on the phonology and morphology of Arabic too; it'll help with some of these.

First, certain Arabic letters can represent either vowels or consonants. The letter ي, for example, can be a long high front vowel /iː/ (often romanized ee) or a palatal approximant /j/ (often romanized y). This is why you're having trouble with إِيَّاكَ—the first letter is /ʔi/, the second is /jja/, the third is /aː/, and the fourth is /ka/, so I would romanize it as something like iyyāka. (Word-initial glottal stops are often ignored in romanization because Arabic words can't start with a vowel, so leaving them off doesn't add any ambiguity.)

Second, the definite article al is very weakly pronounced. The a is generally dropped when preceded by a vowel, and the l can assimilate to a following coronal consonant (look up "sun and moon letters" for the details). This is why الرَّحْمَٰنِ الرَّحِيمِ, underlyingly something like al-raħmāni al-raħeemi, has a surface form more like ar-raħmānir-raħeemi. (When you see a shaddah on the first consonant after the definite article, that's usually a good sign that the l has assimilated into it—Arabic words can't naturally start with a geminate.)

Third, at some point Arabic lost all word-final short vowels. Fully vocalized works sometimes indicate those vowels anyway, because in Classical Arabic they mark noun case (among other things), but in modern Arabic they won't be pronounced.

If you take these into account, your output will look a lot more like what Quran411 has.

2
  • Wow, so much more complicated than anticipated! Do you have a good reference in mind? Going to try out A reference grammar of Modern Standard Arabic like recommended :) – Lance Pollard Mar 15 '20 at 23:24
  • @LancePollard As far as I know, that's the standard reference grammar, so it's a good place to start. – Draconis Mar 16 '20 at 0:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.