barseghyanartur / transliterate

Bi-directional transliterator for Python. Transliterates (unicode) strings according to the rules specified in the language packs.
https://pypi.python.org/pypi/transliterate
297 stars 50 forks source link

Transliteration of Greek language #8

Closed Wtower closed 7 years ago

Wtower commented 9 years ago

Hi, thanks for the nice package.

I would like to make a few points for the greek language if I may, assuming that the goal of the code is to provide readability rather than keyboard mapping. For version 1.7.3, the transliterated string of the greek alphabet using is:

Small letters

>>> translit('αβγδεζηθικλμνξοπρστυφχψω', reversed=True)
'abgdezhuiklmnxoprstyfchpsw'
>>> translit('ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ', reversed=True)
'ABGDEZHUIKLMNXOPRSTYFCHPSW'
>>> translit('ςάέήίύόώϊϋΐΰ', reversed=True)
'ςάέίύήόώϊϋΐΰ'
barseghyanartur commented 9 years ago

@Wtower

Hey, thanks for reporting this. Did you check it also here?

http://en.wikipedia.org/wiki/Romanization_of_Greek

I'm quite busy at the moment with other things. If you do have some spare time, you could make the necessary changes and submit a pull request. Otherwise, I would do it myself, but some time later.

Wtower commented 9 years ago

Nice link. It happens that the recommendations above are consistent with it as far as I can tell.

I certainly understand about you being busy. I tried to fix the issue myself in file https://github.com/barseghyanartur/transliterate/blob/master/src/transliterate/contrib/languages/el/data/python32.py.

The letter 'θ' for instance is in both reversed_specific_mapping and pre_processor_mapping. Removing the first one does not seem to make it work properly, as I would expect.

If you could only give me a hint about this, the other letters are not a problem.

Romamo commented 9 years ago

I refactored greek mappings https://github.com/Romamo/transliterate