Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

729 views
Skip to first unread message

hajar.t...@gmail.com

unread,
Sep 26, 2016, 12:17:51 PM9/26/16
to semafor-users
I want to  use SEMAFOR 2.1 for my project.when i run semafor2.1, i get below error and dont creat output file:

Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck
(ArrayList.java:653)
    at java.util.ArrayList.get(ArrayList.java:429)
    at edu.cmu.cs.lti.ark.fn.evaluation.PrepareFullAnnotationXML.createXMLDoc(PrepareFullAnnotationXML.java:182)
    at edu.cmu.cs.lti.ark.fn.evaluation.PrepareFullAnnotationXML.generateXMLForPrediction(PrepareFullAnnotationXML.java:127)
    at edu.cmu.cs.lti.ark.fn.evaluation.PrepareFullAnnotationXML.main(PrepareFullAnnotationXML.java:62)

can someone help me to resolve this problem?what i do?
my input is only one sentence.but i get error too!

reza.m...@gmail.com

unread,
Oct 17, 2016, 11:23:25 PM10/17/16
to semafor-users
The reason for this error is most likely that your input file is not in correct format. Try saving your input file with linux break line format using your desired file editor. (notepad ++ in windows or gedit in linux).
This solution has solved this problem for me. hope this works for you.

Baradwaj Aryasomayajula

unread,
Apr 11, 2017, 11:07:55 AM4/11/17
to semafor-users, reza.m...@gmail.com
HI, while giving the path for the input file, remove the extension of the file. It seems like, the program is designed in such a way that any input file can be given with a sentence for a line. Hope this helps.
Reply all
Reply to author
Forward
0 new messages