4

Consider this word ميشلين, the correct way to write it in english, is michelline more or less.

Using Buckwalter from CLTK , I get

my$lyn

Using ISO233-2 from that same library, I get

myšlyn

I'm looking for a library that:

  • transliterates using only the English alphabet A to Z, no accents or symbols
  • Gets the basics right, like ش is always either ch or sh, if I stumble upon exceptions, I fix them.
  • Ignores letters that are rarely used in Arabic, such as X and Y, the library should always use I instead of Y for example, again if there are exceptions I fix them.

I could implement my own algorithm but I'm looking for existing ones because I don't want to reinvent the wheel, plus if I it has a Python package, it might come with a decent dictionary which would be a plus.

0

2 Answers 2

1

You can find the current ASCII-based Arabic transliteration methods here: https://en.wikipedia.org/wiki/Romanization_of_Arabic#ASCII-based

None of them does what you are asking for. Are you sure there are enough alphabetic letters for mapping all Arabic symbols? If you are, it seems you need to come up with your own transliteration scheme. If you come up with a one-to-one mapping, then using it will be trivial.

0

you can use the online GoogleTranslator from deep_translator package:


from deep_translator import GoogleTranslator

name = 'ميشلين'

name_translated = GoogleTranslator('en', 'ar').translate(name)

print(name_translated)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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