vinhkhuc / JFastText

Java interface for fastText

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JFasttext throws exception during loading model

ssaltin opened this issue · comments

When I try to load a fastext model, following exception is thrown:

java.lang.RuntimeException: vector
at com.github.jfasttext.FastTextWrapper$FastTextApi.loadModel(Native Method)
at com.github.jfasttext.JFastText.loadModel(JFastText.java:25)

I try to load a model which is generated with the latest fasttext as today

Hi sonerx,
I've upgraded jfasttext to v0.3 with the latest fasttext. Can you try it to see if it resolves your issue?

Hi vinhkhuc,

Thansk for the fix, it works great!

When I try to load JFastText with a non-existing path, Java crash down and generates attached log. It'd be amazing to throw an exception. And also an exception can be great if you can throw while trying to load a model with different format.

hs_err_pid2174.log.txt

Glad that it works.
Thanks for the suggestion. I will make the library more robust in the next releases.