vinhkhuc / JFastText

Java interface for fastText
Other
228 stars 100 forks source link

JFasttext throws exception during loading model #5

Closed ssaltin closed 7 years ago

ssaltin commented 7 years ago

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

vinhkhuc commented 7 years ago

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

ssaltin commented 7 years ago

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

vinhkhuc commented 7 years ago

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