Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transliteration not working #35

Closed
RaviTeja51 opened this issue Oct 24, 2020 · 6 comments
Closed

Transliteration not working #35

RaviTeja51 opened this issue Oct 24, 2020 · 6 comments

Comments

@RaviTeja51
Copy link

RaviTeja51 commented Oct 24, 2020

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
Copy link
Owner

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

@RaviTeja51
Copy link
Author

RaviTeja51 commented Oct 27, 2020

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
Copy link
Owner

I checked you colab notebook.

You need to add these:

from indicnlp import loader

and call

loader.load()

before invoking any API operations

@RaviTeja51
Copy link
Author

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

@ayanatherate
Copy link

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
Copy link

Can anyone provide the working code of transliteration please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants