vinhkhuc / JFastText

Java interface for fastText

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 jft.predict

dutyhong opened this issue · comments

hello , when i use the predict function to predict my label , it except the java.lang.IndexOutOfBoundsException error , how can i solve it ? thank you

Instead of calling predict(text), can you call predict(text, 1) and check its output? I guess the output would be an empty list.

If so, probably your training data doesn't have correct format. Here is an example of how it should look like.

thank you for your suggestion, my problem has been solved

No problem. Glad that it helps.