Giter VIP home page Giter VIP logo

cyrillic-transliteration's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cyrillic-transliteration's Issues

Latin letter "q" is not transliterated to Russian

When I try to transliterate any word written in Latin, which contain letter q, q letter kept as is.

Example:

In [1]: import cyrtranslit

In [2]: cyrtranslit.to_cyrillic('Question', lang_code='ru')
Out[2]: 'Qуестион'

Letter q doesn't exist in Russian alphabet, and in most cases q should be replaced with к.

Different output to_latin for v1.0 and v1.1

I received different outputs for the same inputs based on code version:

Version: 1.0

>>> import cyrtranslit
>>> cyrtranslit.to_latin("Я часто пью водку", "ru")
"JA chasto p'ju vodku"

Version: 1.1

>>> import cyrtranslit
>>> cyrtranslit.to_latin("Я часто пью водку", "ru")
"YA chasto p'yu vodku"

Non existing examples

Sorry, but you should know that "Republika Kosovo" doesn't exist. And most of all THERE IS NO "Serbian phrase 'Republika kosovo'". Please, don't spread the confusion.

Python 3: 'str' object has no attribute 'decode'

string_to_transliterate = string_to_transliterate.decode('utf-8') does not work in Python 3, returns the error

AttributeError: 'str' object has no attribute 'decode'

Similarly, return latinized_str.encode('utf-8') means a byte-string is returned in Python 3.

b'my latin string'

Removing the encode and decode of strings in init.py makes the package work with python 3

Related to issue #6

Reference of mappings

Thank to develop and share this great project. I wonder what is the reference or historical background of the Cyrillic-Latin mappings in CyrTranslit. Is it based on the Soviet project? Or something similar exsiting transliteration scheme?

Support casing variations for 2 letters in latin from Mongolian

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")
'Ц'

ImportError: No module named 'mapping'

python 3.5.2
cyrtranslit-0.3

Traceback:

>>> import cyrtranslit
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "[...]/lib/python3.5/site-packages/cyrtranslit/__init__.py", line 2, in <module>
    from mapping import TRANSLIT_DICT
ImportError: No module named 'mapping'

Why not combine all *_CYR_TO_LAT_DICTs?

It seems to me that the safest code would simply combine all 3 - sr, me and mk.

The extra letters in me and mk do not conflict with any sr letters.

That way, a client can pass any Western South Slavic Cyrillic text, and be guaranteed an output.

(Likewise, in production code I would want Russian or Bulgarian letters to be handled in some way, in case they occur in text my code must process.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.