- This repository implements the set of rules mentioned in Translating English Names to Arabic Using Phonotactic Rules by F Alshuwaier et al., 2011
- It's not easy to transliterate English words to Arabic using handwritten rules since most of the words aren't pronunced in a specific way and thus having a set of 1-1 rules for transliterating is really hard.
- The Carnegie Mellon University is maintaining a dictionary mapping English words to the way they are pronunced (Using the
ARPAbet
symbol set which is somehow related toIPA
.- "The Carnegie Mellon University Pronouncing Dictionary is an open-source machine-readable pronunciation dictionary for North American English that contains over 134,000 words and their pronunciations. CMUdict is being actively maintained and expanded. We are open to suggestions, corrections and other input."
- For more details, check the dictionary's webpage
-
Install the package from pip
pip install english_to_arabic_transphonator
-
Use a
Transphonator
object
from english_to_arabic_transphonator.transphonator import Transphonator
words = "This is awesome".split()
trans = Transphonator()
for word in words:
print(word, trans.transphonate_english_word(word))
The output for the sentence This is awesome
is:
this ذِيس
is إيز
awesome أوسَام