JFastText
JFastText copied to clipboard
hi exception: java.lang.IndexOutOfBoundsException
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at com.github.jfasttext.JFastText.predictProba(JFastText.java:60)
Have you solved the problem?
Have you solved the problem?
Came across the same problem. Could anyone help with this?
+1
Finally I use this instead: https://github.com/ivanhk/fastText_java
Could you release the code that caused the problem. I tried predictProba and it works fine. Look at the code
public JFastText.ProbLabel predictProba(String text) {
List<JFastText.ProbLabel> probaPredictions = this.predictProba(text, 1);
return probaPredictions.size() > 0 ? (JFastText.ProbLabel)probaPredictions.get(0) : null;
}
i wonder what is the rule of the text to be predict,i test text,text+"\t"+text,text+"\n"+text,etc,all of them come to index out of bounds.and the problem is also at com.github.jfasttext.JFastText.predictProba(JFastText.java:60)