opendatakosovo / cyrillic-transliteration

Transliterate Cyrillic script to Latin script and vice versa.
https://pypi.python.org/pypi/cyrtranslit
MIT License
98 stars 27 forks source link

Support casing variations for 2 letters in latin from Mongolian #44

Open georgeslabreche opened 4 months ago

georgeslabreche commented 4 months ago

Mongolian language does not support casing variations for 2 letters in latin, e.g.:

>>> import cyrtranslit
>>> cyrtranslit.to_cyrillic("Kh", "mn")
'Х'
>>> cyrtranslit.to_cyrillic("KH", "mn")
'КH'
>>> cyrtranslit.to_cyrillic("kh", "mn")
'х'
>>> cyrtranslit.to_cyrillic("kH", "mn")
'кH'
>>> cyrtranslit.to_cyrillic("Sh", "mn")
'Ш'
>>> cyrtranslit.to_cyrillic("SH", "mn")
'СH'
>>> cyrtranslit.to_cyrillic("TS", "mn")
'ТС'
>>> cyrtranslit.to_cyrillic("Ts", "mn")
'Ц'
Serbipunk commented 3 months ago

Hi @georgeslabreche,

I hope you're doing well! I was wondering if there's been any progress on the bug related to mixed uppercase and lowercase casing variations? If you need any additional assistance, I’d be happy to help.

I plan to first consult with a Mongolian colleague who has experience with this grammar issue, and then I might try to tweak the code.

georgeslabreche commented 3 months ago

Hi @Serbipunk, thank you for your interest! I went ahead and implemented a fix, here's the pull request: https://github.com/opendatakosovo/cyrillic-transliteration/pull/45/files

You can help me by:

  1. Going over the fix and checking if all cases are covered.
  2. Instruct me on how to actually transliterate from Sh to Cyrillic. Is it Ш/ш or Щ/щ?