Class WordVectorSerializer.BinaryReader
- java.lang.Object
-
- org.deeplearning4j.models.embeddings.loader.WordVectorSerializer.BinaryReader
-
- All Implemented Interfaces:
AutoCloseable,WordVectorSerializer.Reader
- Enclosing class:
- WordVectorSerializer
protected static class WordVectorSerializer.BinaryReader extends Object implements WordVectorSerializer.Reader
-
-
Field Summary
Fields Modifier and Type Field Description protected AtomicIntegeridxCounterprotected StringnextWordprotected intnumWordsprotected DataInputStreamstreamprotected intvectorLength
-
Constructor Summary
Constructors Modifier Constructor Description protectedBinaryReader(@NonNull File file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanhasNext()org.nd4j.common.primitives.Pair<VocabWord,float[]>next()
-
-
-
Field Detail
-
stream
protected DataInputStream stream
-
nextWord
protected String nextWord
-
numWords
protected int numWords
-
vectorLength
protected int vectorLength
-
idxCounter
protected AtomicInteger idxCounter
-
-
Constructor Detail
-
BinaryReader
protected BinaryReader(@NonNull @NonNull File file)
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfaceWordVectorSerializer.Reader
-
next
public org.nd4j.common.primitives.Pair<VocabWord,float[]> next()
- Specified by:
nextin interfaceWordVectorSerializer.Reader
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-