Class FileDocumentIterator
- java.lang.Object
-
- org.deeplearning4j.text.documentiterator.FileDocumentIterator
-
- All Implemented Interfaces:
Serializable
,DocumentIterator
public class FileDocumentIterator extends Object implements DocumentIterator
Iterate over files- Author:
- Adam Gibson
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FileDocumentIterator(File path)
FileDocumentIterator(String path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
Whether there are anymore documents in the iteratorInputStream
nextDocument()
Get the next documentvoid
reset()
Reset the iterator to the beginning
-
-
-
Method Detail
-
nextDocument
public InputStream nextDocument()
Description copied from interface:DocumentIterator
Get the next document- Specified by:
nextDocument
in interfaceDocumentIterator
- Returns:
- the input stream for the next document
-
hasNext
public boolean hasNext()
Description copied from interface:DocumentIterator
Whether there are anymore documents in the iterator- Specified by:
hasNext
in interfaceDocumentIterator
- Returns:
- whether there are anymore documents in the iterator
-
reset
public void reset()
Description copied from interface:DocumentIterator
Reset the iterator to the beginning- Specified by:
reset
in interfaceDocumentIterator
-
-