All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.deeplearning4j.text.documentiterator.LabelAwareIterator Maven / Gradle / Ivy

There is a newer version: 1.0.0-M2.1
Show newest version
package org.deeplearning4j.text.documentiterator;

/**
 * This simple iterator interface assumes, that all documents are packed into strings OR into references to VocabWords.
 * Basic idea is: for tasks like ParagraphVectors we need unified interface for reading Sentences (read: lines of text) or Documents (read: set of lines) with label support.
 *
 * There's 2 interoperbility implementations of this interfaces: SentenceIteratorConverter and DocumentIteratorConverter.
 * After conversion is done, they can be wrapped by BasicLabelAwareIterator, that accepts all 5 current interfaces (including this one) as source for labelled documents.
 * This way 100% backward compatibility is provided, as well as additional functionality is delivered via LabelsSource.
 *
 * @author [email protected]
 */
public interface LabelAwareIterator {

    boolean hasNextDocument();

    LabelledDocument nextDocument();

    void reset();

    LabelsSource getLabelsSource();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy