mahfuzibnalam / terminology_evaluation

MIT License
21 stars 7 forks source link

IndexError: list index out of range on lemmatized Korean data #3

Closed tomsbergmanis closed 3 years ago

tomsbergmanis commented 3 years ago

Hi! Maybe you have some guess for what might cause your code to fail on en-ko dev? It has worked fine for other languages I have tried so far. Traceback (most recent call last): File "evaluate_term_wmt.py", line 381, in <module> exact_match(l2, exactreferences, outputs, ids) File "evaluate_term_wmt.py", line 298, in exact_match c, w, cl, wl = compare_EXACT(outputs[i], references[id]) File "evaluate_term_wmt.py", line 89, in compare_EXACT hyp_l = ' ' + ' '.join([w.lemma for w in doc_f.sentences[0].words]) + ' ' IndexError: list index out of range Help would be much appreciated!

mahfuzibnalam commented 3 years ago

It seems to happen when your hypothesis has an empty line. Let me talk to Antonios and see if we can give a fix.

tomsbergmanis commented 3 years ago

Thanks! It was a trivial mistake on my part!