javatransliterationtamil

How to convert tamil string to english string in java


I am doing a project which involves NLP. I need to transliterate Tamil String to English string(In tanglish form) like "இல்லை" to "illai"..

How can i do that using java ?? Help me with the code sample


Solution

  • As there are only 72 characters in the Tamil block, build a translation table and then build a new string by testing each if character can be translated before adding it to the list.

    For example U+0B87 (இ) becomes i

    If you are more familiar with Java and/or have a very large amount of material to translate, there are likely a few processing optimizations to speed up the process, but I suspect the above will be the base of a good solution.

    If you only have a small amount of material to translate or this is a one-off job, it may make more sense to simply use Google Translate and get the input translation below the input box.