cfiltnlp / pyiwn

A Python based API to access Indian language WordNets.
http://www.cfilt.iitb.ac.in/
Creative Commons Attribution Share Alike 4.0 International
35 stars 20 forks source link

IndexError: list index out of range while obtaining telugu synsets. #7

Closed suman101112 closed 6 years ago

suman101112 commented 6 years ago
from pyiwn import pyiwn
iwn = pyiwn.IndoWordNet('telugu')
print(iwn.synsets('జ్వరం'),pos=pyiwn.NOUN)

Traceback (most recent call last): print(iwn.synsets('జ్వరం'),pos=pyiwn.NOUN) synset_data = utils.synset_data(sp, pos) examples = re.sub('"', '', gloss_examples_sp[1]).split(' / ') IndexError: list index out of range

suman101112 commented 6 years ago

the problem is in parsed files of all.telugu and noun.telugu, The line is unable to split at ":", so we are getting index out of range exception. Just modified the files and deleted extra unnecessary tabs.

riteshpanjwani commented 5 years ago

I have completely revamped the inner workings of the library and have fixed these issues. I would recommend you to do a full clean reinstall:

pip uninstall pyiwn pip install --upgrade pyiwn

And follow the steps in this examples notebook: https://github.com/riteshpanjwani/pyiwn/blob/master/examples/example.ipynb

Regards, Ritesh