Cannot load pre-trained word vectors
liefra opened this issue · 2 comments
I tried to load a pre-trained word vector, but receive the following error: Caused by: java.lang.IllegalArgumentException: Unknown LossName enum second :774911284
I load the model with:
val model = FastText.loadModelFromSingleFile(File("/Users/liefra/crawl-300d-2M.vec"))
Is this an issue, or just me doing it wrong?
SingleFile is one Java Model File used by fasttext4j.
maybe you can use FastText.loadCppModel
load bin mode file from Fasttext
https://dl.fbaipublicfiles.com/fasttext/vectors-crawl/cc.en.300.bin.gz
(unzip it before load )
Thank you very much for your super fast reply :)
Yes, it works when I load it with the bin format:
val model = FastText.loadCppModel(File("/Users/liefra/cc.en.300.bin"))