Class Dl4jModelReader
- java.lang.Object
-
- org.apache.lucene.analysis.synonym.word2vec.Dl4jModelReader
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class Dl4jModelReader extends Object implements Closeable
Dl4jModelReader reads the file generated by the library Deeplearning4j and provide a Word2VecModel with normalized vectorsDl4j Word2Vec documentation: https://deeplearning4j.konduit.ai/v/en-1.0.0-beta7/language-processing/word2vec Example to generate a model using dl4j: https://github.com/eclipse/deeplearning4j-examples/blob/master/dl4j-examples/src/main/java/org/deeplearning4j/examples/advanced/modelling/embeddingsfromcorpus/word2vec/Word2VecRawTextExample.java
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Constructor Summary
Constructors Constructor Description Dl4jModelReader(InputStream stream)
-
-
-
Constructor Detail
-
Dl4jModelReader
public Dl4jModelReader(InputStream stream)
-
-
Method Detail
-
read
public Word2VecModel read() throws IOException
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
-