Class BasicLabelAwareIterator.Builder
- java.lang.Object
-
- org.deeplearning4j.text.documentiterator.BasicLabelAwareIterator.Builder
-
- Enclosing class:
- BasicLabelAwareIterator
public static class BasicLabelAwareIterator.Builder extends Object
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder()This method should stay protected, since it's only viable for testing purposesBuilder(@NonNull DocumentIterator iterator)We assume that each inputStream in this iterator is separate document/paragraphBuilder(@NonNull LabelAwareDocumentIterator iterator)We assume that each inputStream in this iterator is separate document/paragraph Labels will be converted into LabelledDocument formatBuilder(@NonNull LabelAwareIterator iterator)Builder(@NonNull LabelAwareSentenceIterator iterator)We assume that each sentence in this iterator is separate document/paragraph.Builder(@NonNull SentenceIterator iterator)We assume that each sentence in this iterator is separate document/paragraph
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BasicLabelAwareIteratorbuild()BasicLabelAwareIterator.BuildersetLabelsSource(@NonNull LabelsSource source)TODO: To be implementedBasicLabelAwareIterator.BuildersetLabelTemplate(@NonNull String template)Label template will be used for sentence labels generation.
-
-
-
Constructor Detail
-
Builder
protected Builder()
This method should stay protected, since it's only viable for testing purposes
-
Builder
public Builder(@NonNull @NonNull SentenceIterator iterator)We assume that each sentence in this iterator is separate document/paragraph- Parameters:
iterator-
-
Builder
public Builder(@NonNull @NonNull DocumentIterator iterator)We assume that each inputStream in this iterator is separate document/paragraph- Parameters:
iterator-
-
Builder
public Builder(@NonNull @NonNull LabelAwareSentenceIterator iterator)We assume that each sentence in this iterator is separate document/paragraph. Labels will be converted into LabelledDocument format- Parameters:
iterator-
-
Builder
public Builder(@NonNull @NonNull LabelAwareDocumentIterator iterator)We assume that each inputStream in this iterator is separate document/paragraph Labels will be converted into LabelledDocument format- Parameters:
iterator-
-
Builder
public Builder(@NonNull @NonNull LabelAwareIterator iterator)
-
-
Method Detail
-
setLabelTemplate
public BasicLabelAwareIterator.Builder setLabelTemplate(@NonNull @NonNull String template)
Label template will be used for sentence labels generation. I.e. if provided template is "DOCUMENT_", all documents/paragraphs will have their labels starting from "DOCUMENT_0" to "DOCUMENT_X", where X is the total number of documents - 1- Parameters:
template-- Returns:
-
setLabelsSource
public BasicLabelAwareIterator.Builder setLabelsSource(@NonNull @NonNull LabelsSource source)
TODO: To be implemented- Parameters:
source-- Returns:
-
build
public BasicLabelAwareIterator build()
-
-