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 booleanhasNext()Whether there are anymore documents in the iteratorInputStreamnextDocument()Get the next documentvoidreset()Reset the iterator to the beginning
-
-
-
Method Detail
-
nextDocument
public InputStream nextDocument()
Description copied from interface:DocumentIteratorGet the next document- Specified by:
nextDocumentin interfaceDocumentIterator- Returns:
- the input stream for the next document
-
hasNext
public boolean hasNext()
Description copied from interface:DocumentIteratorWhether there are anymore documents in the iterator- Specified by:
hasNextin interfaceDocumentIterator- Returns:
- whether there are anymore documents in the iterator
-
reset
public void reset()
Description copied from interface:DocumentIteratorReset the iterator to the beginning- Specified by:
resetin interfaceDocumentIterator
-
-