Package ai.djl.basicdataset.nlp
Class TextDataset.Builder<T extends TextDataset.Builder<T>>
- java.lang.Object
-
- ai.djl.training.dataset.RandomAccessDataset.BaseBuilder<T>
-
- ai.djl.basicdataset.nlp.TextDataset.Builder<T>
-
- Direct Known Subclasses:
PennTreebankText.Builder,StanfordMovieReview.Builder,StanfordQuestionAnsweringDataset.Builder,TatoebaEnglishFrenchDataset.Builder
- Enclosing class:
- TextDataset
public abstract static class TextDataset.Builder<T extends TextDataset.Builder<T>> extends ai.djl.training.dataset.RandomAccessDataset.BaseBuilder<T>Abstract Builder that helps build aTextDataset.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringartifactIdprotected java.lang.StringgroupIdprotected ai.djl.repository.Repositoryrepositoryprotected ai.djl.training.dataset.Dataset.Usageusage
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ToptArtifactId(java.lang.String artifactId)Sets the optional artifactId.ToptGroupId(java.lang.String groupId)Sets optional groupId.ToptManager(ai.djl.ndarray.NDManager manager)Sets the optional manager for the dataset (default follows engine default).ToptRepository(ai.djl.repository.Repository repository)Sets the optional repository.ToptUsage(ai.djl.training.dataset.Dataset.Usage usage)Sets the optional usage.TsetSourceConfiguration(TextData.Configuration sourceConfiguration)Sets theTextData.Configurationto use for the source text data.TsetTargetConfiguration(TextData.Configuration targetConfiguration)Sets theTextData.Configurationto use for the target text data.
-
-
-
Method Detail
-
setSourceConfiguration
public T setSourceConfiguration(TextData.Configuration sourceConfiguration)
Sets theTextData.Configurationto use for the source text data.- Parameters:
sourceConfiguration- theTextData.Configuration- Returns:
- this builder
-
setTargetConfiguration
public T setTargetConfiguration(TextData.Configuration targetConfiguration)
Sets theTextData.Configurationto use for the target text data.- Parameters:
targetConfiguration- theTextData.Configuration- Returns:
- this builder
-
optManager
public T optManager(ai.djl.ndarray.NDManager manager)
Sets the optional manager for the dataset (default follows engine default).- Parameters:
manager- the manager- Returns:
- this builder
-
optUsage
public T optUsage(ai.djl.training.dataset.Dataset.Usage usage)
Sets the optional usage.- Parameters:
usage- the usage- Returns:
- this builder
-
optRepository
public T optRepository(ai.djl.repository.Repository repository)
Sets the optional repository.- Parameters:
repository- the repository- Returns:
- this builder
-
optGroupId
public T optGroupId(java.lang.String groupId)
Sets optional groupId.- Parameters:
groupId- the groupId}- Returns:
- this builder
-
optArtifactId
public T optArtifactId(java.lang.String artifactId)
Sets the optional artifactId.- Parameters:
artifactId- the artifactId- Returns:
- this builder
-
-