glample / tagger

Named Entity Recognition Tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

utils.py issue line 303 list index out of range

PCR11 opened this issue · comments

commented

i run train.py follow your readme.txt ,and the dataset are conll2003 shared,it has two columns , the element are words and BIOtags. And then run the train.py ,there is an error called IndexError: list index out of range. Is it because the columns of my dataset is 2,and the eng,train that you shared is 4?Can you tell me the reason?Thank you very much.

@PCR11 I had a similar problem. Can you debug and confirm that eval_lines is empty? And check which of the evaluation files is empty. I was getting this problem with the scores file being empty because the conlleval script was throwing an exception. In my case the exception was due to, for some lines, there were more tokens in a single line than it was expected. For an example, if you have only BIO tags, then you would have only a token and a tag for each line. You may have a tokenization problem and have more than one token per line. This was my problem.

commented

Thank you very much for answering my question,this problem has been solved. it is because my conlleval permission is denied. and then i get another problem,FileNotFoundError: [Errno 2] No such file or directory: './evaluation/temp/eval.XXX.scores',it always lose a score file, but this file is automatic generated.
Because there always error,so the follow is my best score:
accuracy: 87.61%; precision: 45.42%; recall: 32.18%; FB1: 37.67
LOC: precision: 46.43%; recall: 46.05%; FB1: 46.24 1822
MISC: precision: 0.00%; recall: 0.00%; FB1: 0.00 0
ORG: precision: 0.00%; recall: 0.00%; FB1: 0.00 2
PER: precision: 44.68%; recall: 57.87%; FB1: 50.43 2386
Dataset i used were the author shared,eng,train,eng,testa,eng.testb
Can you help me ? Thank you very much!

@PCR11 , when are you getting this score? Is this only for the first batch of the first epoch? Did you check if you got a XXX.score and XXX.output for both dev and test sets? Try debugging to see when exactly you are getting this error, and inform here, please.

commented

@pvcastro Thank you very much! this error was solved.
But i run the train.py with eng.train,eng.testa,eng,testb.and it runs one day and one night,and it is still running now! is there some wrong? Or it takes so long time indeed? Can you help me? I am so sorry to trouble you again.

@PCR11 How did you solve the error FileNotFoundError: [Errno 2] No such file or directory: './evaluation/temp/eval.XXX.scores'? I struggle with the same problem.

Thank you!

commented

@vasilikivmo In fact i,am not sure the reason of it, i just change a computer,and then there are not this errors, but i goes into infinite loop...

I posted an answer for this on your other issue.