JFastText icon indicating copy to clipboard operation
JFastText copied to clipboard

Load model file from resource

Open ssaltin opened this issue 7 years ago • 2 comments

After quantization feature of fasttext, it is possible to have a small size model files so I can put them in resource folder of a jar. Is it possible to load this model files from jar resource folder directly?

ssaltin avatar Jun 19 '17 15:06 ssaltin

Did you solve it ?

SamMohel avatar Jul 19 '17 15:07 SamMohel

You may create a temporal file and copy the model file in resource folder to it. Next, you can read the temporal model file. If the model file is large, saying 20MB+, I'd recommend not putting it in the resource folder. Check https://github.com/lidalei/JFastText/blob/master/src/main/java/com/github/jfasttext/JFastText.java#L51

lidalei avatar Jan 25 '18 09:01 lidalei