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?