deeplearning4j:无法使用现有的Word2Vec dutchembeddings

时间:2017-10-08 19:36:04

标签: word2vec deeplearning4j dl4j

我尝试使用带有dl4j的Word2Vec格式的dutchembeddings。但是当调用loadStaticModel时会抛出异常:“无法猜测输入文件格式”

WordVectorSerializer.loadStaticModel(new File(WORD_VECTORS_PATH)

https://github.com/clips/dutchembeddings(我下载了维基百科160 tar.gz)

如何使用dl4j使用Word2Vec格式的dutchembedding?

堆栈跟踪

Loading word vectors and creating DataSetIterators
o.d.m.e.l.WordVectorSerializer - Trying DL4j format...
o.d.m.e.l.WordVectorSerializer - Trying CSVReader...
o.d.m.e.l.WordVectorSerializer - Trying BinaryReader...
Exception in thread "main" java.lang.RuntimeException: Unable to guess input file format
    at org.deeplearning4j.models.embeddings.loader.WordVectorSerializer.loadStaticModel(WordVectorSerializer.java:2646)
    at org.deeplearning4j.examples.convolution.sentenceclassification.CnnDutchSentenceClassification.main(CnnDutchSentenceClassification.java:122)

Process finished with exit code 1

0 个答案:

没有答案