English-Arabic Transliteration:

Transliterate English words into Arabic by render them in the orthography of the Arabic language and vise versa.

Out of vocabulary (OOV) words are a common source of errors in cross language information retrieval. Bilingual dictionaries are often limited in their coverage of named entities, numbers, technical terms and acronyms. There is a need to generate translations for these "on-the-fly" or at query time. A significant proportion of OOV words are named entities and technical terms. Typical analyses finds around 50% of OOV words to be named entities. Yet these can be the most important words in the queries. Cross language retrieval performance (average precision) reduced more than 50% when named entities in the queries were not translated. When the query language and the document language share the same alphabet it may be sufficient to use the OOV word as its own translation. However, when the two languages have different alphabets, the query term must somehow be rendered in the orthography of the other language. The process of converting a word from one orthography into another is called transliteration.

Foreign words often occur in Arabic text as transliteration. This is the case for many categories of foreign words, not just proper names but also technical terms such as caviar, telephone and internet.


Example Output:

English
(auto generated)
Arabic
(sample input)
Khalid Ash-Sham'ahخالِد الشَمعَة
Jubran Khalyl Jubranجُبران خَليل جُبران
Kazim As-Sahirكاظِم الساهِر
Majidat Ar-Roumiماجِدَة الرُومِي
Nizar Qab'baniنِزار قَبَّانِي
Souq Al-Hameidei'iah?سُوق الحَمِيدِيَّة؟
Magharat Ja'eitaمَغارَة جَعِيتَا
Ghoutat Dimashqغُوطَة دِمَشق
Halab Ash-Shahba'aحَلَب الشَهبَاء
Jazyrat Aarwadجَزيرَة أَرواد
Bilad Ar-Rafidanبِلاد الرافِدَين
Ahramat Al-Jeizahأهرامات الجِيزَة
Diraدِرْع
Eidعِيد
Oudعُود
Rid'aرِدْء
Eida'aإِيدَاء
Hibat Al-Lhهِبَة الله
Qadinقاضٍ

Example Code:

<?php
    $Arabic 
= new \ArPHP\I18N\Arabic();

    
$ar_terms = array('خالِد الشَمعَة''جُبران خَليل جُبران''كاظِم الساهِر',
            
'ماجِدَة الرُومِي''نِزار قَبَّانِي''سُوق الحَمِيدِيَّة؟''مَغارَة جَعِيتَا'
            
'غُوطَة دِمَشق''حَلَب الشَهبَاء''جَزيرَة أَرواد''بِلاد الرافِدَين',
            
'أهرامات الجِيزَة''دِرْع''عِيد''عُود''رِدْء''إِيدَاء''هِبَة الله''قاضٍ');
    echo <<< END
<center>
  <table border="0" cellspacing="2" cellpadding="5" width="500">
    <tr>
      <td bgcolor="#27509D" align="center" width="150">
        <b>
          <font color="#ffffff" face="Tahoma">
            English<br />(auto generated)
          </font>
        </b>
      </td>
      <td bgcolor="#27509D" align="center" width="150">
        <b>
          <font color="#ffffff">
            Arabic<br />(sample input)
          </font>
        </b>
      </td>
    </tr>
END;

    foreach (
$ar_terms as $term) {
        echo 
'<tr><td bgcolor="#f5f5f5" align="left"><font face="Tahoma">';
        echo 
$Arabic->ar2en($term);
        echo 
'</font></td>';
        echo 
'<td bgcolor="#f5f5f5" align="right">'.$term.'</td></tr>';
    }

    echo 
'</table></center>';