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.
English (sample input) |
Arabic (auto generated) |
George Bush | جورج بوش |
Paul Wolfowitz | باول وولفوويتز |
Silvio Berlusconi? | سيلفيو برلوسكوني |
Guantanamo | غوانتانامو |
Arizona | اريزونه |
Maryland | ماريلاند |
Oracle | اوراكل |
Yahoo | ياهو |
غوغل | |
Formula1 | فورمولا1 |
Boeing | بوينغ |
Caviar | كافيار |
Telephone | تلفون |
Internet | انترنت |
Côte d'Ivoire | كوت ديفوير |
ana raye7 el jam3a el sa3a 3 el 39r | انه رايح الجامعه الساعه 3 العصر |
<?php
$Arabic = new \ArPHP\I18N\Arabic();
$en_terms = array('George Bush', 'Paul Wolfowitz', 'Silvio Berlusconi?',
'Guantanamo', 'Arizona', 'Maryland', 'Oracle', 'Yahoo', 'Google',
'Formula1', 'Boeing', 'Caviar', 'Telephone', 'Internet', "Côte d'Ivoire",
'ana raye7 el jam3a el sa3a 3 el 39r');
echo <<< END
<center>
<table border="0" cellspacing="2" cellpadding="5" width="500">
<tr>
<td bgcolor="#27509D" align="center" width="150">
<b>
<font color="#ffffff">
English<br />(sample input)
</font>
</b>
</td>
<td bgcolor="#27509D" align="center" width="150">
<b>
<font color="#ffffff" face="Tahoma">
Arabic<br />(auto generated)
</font>
</b>
</td>
</tr>
END;
foreach ($en_terms as $term) {
echo '<tr><td bgcolor="#f5f5f5" align="left">'.$term.'</td>';
echo '<td bgcolor="#f5f5f5" align="right"><font face="Tahoma">';
echo $Arabic->en2ar($term);
echo '</font></td></tr>';
}
echo '</table></center>';