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 AtomicInteger
idxCounter
protected String
nextWord
protected int
numWords
protected DataInputStream
stream
protected int
vectorLength
-
Constructor Summary
Constructors Modifier Constructor Description protected
BinaryReader(@NonNull File file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
boolean
hasNext()
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:
hasNext
in interfaceWordVectorSerializer.Reader
-
next
public org.nd4j.common.primitives.Pair<VocabWord,float[]> next()
- Specified by:
next
in interfaceWordVectorSerializer.Reader
-
close
public void close() throws Exception
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
-