Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hi exception: java.lang.IndexOutOfBoundsException #13

Open
beibeii opened this issue Jun 27, 2017 · 7 comments
Open

hi exception: java.lang.IndexOutOfBoundsException #13

beibeii opened this issue Jun 27, 2017 · 7 comments

Comments

@beibeii
Copy link

beibeii commented Jun 27, 2017

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)

@L-glory
Copy link

L-glory commented Aug 29, 2017

Have you solved the problem?

1 similar comment
@chenjun0210
Copy link

Have you solved the problem?

@sandove
Copy link

sandove commented Nov 6, 2017

Came across the same problem. Could anyone help with this?

@shayts7
Copy link

shayts7 commented Dec 4, 2017

+1

@sandove
Copy link

sandove commented Dec 16, 2017

Finally I use this instead: https://github.com/ivanhk/fastText_java

@lidalei
Copy link

lidalei commented Jan 6, 2018

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;
  }

@enochmonightsky
Copy link

enochmonightsky commented Jul 12, 2018

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants