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

Text Normalisation using Indic NLP library not working #54

Closed lusifer021 closed 1 year ago

lusifer021 commented 2 years ago

from indicnlp.normalize.indic_normalize import IndicNormalizerFactory

input_text="சில உன்னத வேலைகளைச் செய்ய மனிதன் இந்த உலகில் பிறக்கிறான். அவர் வாழ்க்கையில் ஒரு உன்னத இலக்கு இருக்க வேண்டும். அவர் எட்டாம் வகுப்பு மாணவனாக இருக்கும்போது இந்த இலக்கை நிர்ணயிக்க வேண்டும். அதற்கு அவர் உண்மையான முயற்சிகளை மேற்கொள்ள வேண்டும். இது அவருக்கு வெற்றியைத் தரும், மேலும் அவர் தனது இலக்கை அடைய முடியும்" remove_nuktas=False factory=IndicNormalizerFactory() normalizer=factory.get_normalizer("ta",remove_nuktas=False) output_text=normalizer.normalize(input_text)

print(input_text) print(output_text)

The text normalisation is not working with this code, it gives back the same string regardless of remove_nuktas is true or false, can you tell what am I doing wrong?

oligoglot commented 2 years ago

I think remove_nuktas will not have any impact on Tamil text as we don't have nuktas. Unless we expand the definition to include other diacritics.

Sundar

On Fri, Jun 3, 2022 at 10:06 AM lusifer021 @.***> wrote:

from indicnlp.normalize.indic_normalize import IndicNormalizerFactory

input_text="சில உன்னத வேலைகளைச் செய்ய மனிதன் இந்த உலகில் பிறக்கிறான். அவர் வாழ்க்கையில் ஒரு உன்னத இலக்கு இருக்க வேண்டும். அவர் எட்டாம் வகுப்பு மாணவனாக இருக்கும்போது இந்த இலக்கை நிர்ணயிக்க வேண்டும். அதற்கு அவர் உண்மையான முயற்சிகளை மேற்கொள்ள வேண்டும். இது அவருக்கு வெற்றியைத் தரும், மேலும் அவர் தனது இலக்கை அடைய முடியும்" remove_nuktas=False factory=IndicNormalizerFactory() normalizer=factory.get_normalizer("ta",remove_nuktas=False) output_text=normalizer.normalize(input_text)

print(input_text) print(output_text)

The text normalisation is not working with this code, it gives back the same string regardless of remove_nuktas is true or false, can you tell what am I doing wrong?

— Reply to this email directly, view it on GitHub https://github.com/anoopkunchukuttan/indic_nlp_library/issues/54, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHB666YPNOXOACHAOYE4A3VNGDVHANCNFSM5XXIZ2RA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

anoopkunchukuttan commented 1 year ago

Sundar is right. Thanks @oligoglot . Closing.