Domanda

I am new to programming, and I am trying to understand transliteration - like the Google Input Tools that will allow the user to type from one language to another language.

How does transliteration work? Specifically, if I am translating from English to Hindi or English to Russsian, do I need to incorporate a dictionary of words for English, Hindi and Russian languages?

Does any one know of any tutorials showing how to write the code for transliteration? I have tried searching, but no luck.

Also, does the code have to be in JavaScript/JQuery (client side code)? My project is Python/django. Can I write the transliteration code in python/dgango?

Thanks.

È stato utile?

Soluzione 2

I found that the better search term is Input Method Editor not transliteration.

There is a project on github here: https://github.com/wikimedia/jquery.ime that deals with IME's and transliteration here.

I hope that this helps some one.

Altri suggerimenti

Direct dictionary-to-dictionary automatic translation produces poor results due to differences in grammar and the presence of idiomatic sentences. The starting point in python, in my experience, should be NLTK (Natural Language ToolKit) libraries and tutorials.

Then, trying to provide you a working example you may start from here:

The use of javascript/jquery depends on the UI you are planning, maybe you want to trigger an automatic translation after a few key pressed, or onblur or onchange in a input tag but is not relevant for the translation itself.

The process of translating is also really resource consuming, so I discourage you to do it inside a django view. My suggestion is to not reinvent the wheel, and use some already existing API like google or bing ones.

The typical way of implementing transliteration is to use a mapping dictionary. An example of this can be seen in the mapping.py file for the CyrTranslit Python package.

Word translation usages a database to convert English word into Hindi Word. Some apps are based on this concept like:

English to Hindi Dictionary

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top