Class LabelAwareFileSentenceIterator
- java.lang.Object
-
- org.deeplearning4j.text.sentenceiterator.BaseSentenceIterator
-
- org.deeplearning4j.text.sentenceiterator.FileSentenceIterator
-
- org.deeplearning4j.text.sentenceiterator.labelaware.LabelAwareFileSentenceIterator
-
- All Implemented Interfaces:
LabelAwareSentenceIterator,SentenceIterator
public class LabelAwareFileSentenceIterator extends FileSentenceIterator implements LabelAwareSentenceIterator
-
-
Field Summary
-
Fields inherited from class org.deeplearning4j.text.sentenceiterator.FileSentenceIterator
cache, currentFile, currLineIterator, file, fileIterator
-
Fields inherited from class org.deeplearning4j.text.sentenceiterator.BaseSentenceIterator
preProcessor
-
-
Constructor Summary
Constructors Constructor Description LabelAwareFileSentenceIterator(File dir)LabelAwareFileSentenceIterator(SentencePreProcessor preProcessor, File file)Takes a single file or directory
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcurrentLabel()Returns the current label for nextSentence()List<String>currentLabels()For multi label problems-
Methods inherited from class org.deeplearning4j.text.sentenceiterator.FileSentenceIterator
hasNext, nextSentence, reset
-
Methods inherited from class org.deeplearning4j.text.sentenceiterator.BaseSentenceIterator
finish, getPreProcessor, setPreProcessor
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.deeplearning4j.text.sentenceiterator.SentenceIterator
finish, getPreProcessor, hasNext, nextSentence, reset, setPreProcessor
-
-
-
-
Constructor Detail
-
LabelAwareFileSentenceIterator
public LabelAwareFileSentenceIterator(SentencePreProcessor preProcessor, File file)
Takes a single file or directory- Parameters:
preProcessor- the sentence pre processorfile- the file or folder to iterate over
-
LabelAwareFileSentenceIterator
public LabelAwareFileSentenceIterator(File dir)
-
-
Method Detail
-
currentLabel
public String currentLabel()
Description copied from interface:LabelAwareSentenceIteratorReturns the current label for nextSentence()- Specified by:
currentLabelin interfaceLabelAwareSentenceIterator- Returns:
- the label for nextSentence()
-
currentLabels
public List<String> currentLabels()
Description copied from interface:LabelAwareSentenceIteratorFor multi label problems- Specified by:
currentLabelsin interfaceLabelAwareSentenceIterator- Returns:
-
-