anoopkunchukuttan / indic_nlp_library

Resources and tools for Indian language Natural Language Processing
http://anoopkunchukuttan.github.io/indic_nlp_library/
MIT License
546 stars 158 forks source link

Transliteration not working #35

Closed RaviTeja51 closed 3 years ago

RaviTeja51 commented 3 years ago

Python version: 3.8.9

pip install indic-nlp-library git clone https://github.com/anoopkunchukuttan/indic_nlp_resources.git `import sys from indicnlp import common INDIC_NLP_RESOURCES=r"/home/user/indic_nlp_resources"

common.set_resources_path(INDIC_NLP_RESOURCES) from indicnlp.transliterate.unicode_transliterate import ItransTransliterator input_text='അടിക്ക് മോനെ' print(ItransTransliterator.to_itrans(input_text, 'mal'))`

Output

അടിക്ക് മോനെ

I tried both in my local PC and in colab, but the api is not transliterating

colab

anoopkunchukuttan commented 3 years ago

Use 'ml' as the language code. IndicNLP library uses 2-letter ISO language codes

RaviTeja51 commented 3 years ago

I have tried using 'ml' as language code. from indicnlp.transliterate.unicode_transliterate import ItransTransliterator input_text='അടിക്ക് മോനെ' print(ItransTransliterator.to_itrans(input_text, 'ml'))

output: അി ോെ Sorry i am bit novice please help me Screenshot from 2020-10-27 17-09-52

anoopkunchukuttan commented 3 years ago

I checked you colab notebook.

You need to add these:

from indicnlp import loader

and call

loader.load()

before invoking any API operations

RaviTeja51 commented 3 years ago

Thanks for your help it is working now . I am closing this issue

ayanatherate commented 2 years ago

Hi! The above

I checked you colab notebook.

You need to add these:

from indicnlp import loader

and call

loader.load()

before invoking any API operations

Hi, this seems to resolve the problem with ml and even with hindi. But, it's not working with bengali. Any help from your side would be appreciated!

ankitmeher commented 1 year ago

Can anyone provide the working code of transliteration please