public static class TatoebaEnglishFrenchDataset.Builder extends ai.djl.training.dataset.RandomAccessDataset.BaseBuilder<TatoebaEnglishFrenchDataset.Builder>
TatoebaEnglishFrenchDataset.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
includeValidLength |
protected java.util.List<ai.djl.modality.nlp.preprocess.TextProcessor> |
sourceTextProcessors |
protected java.util.List<ai.djl.modality.nlp.preprocess.TextProcessor> |
targetTextProcessors |
protected ai.djl.modality.nlp.preprocess.Tokenizer |
tokenizer |
protected boolean |
trainEmbedding |
protected ai.djl.modality.nlp.WordEmbedding |
wordEmbedding |
| Modifier and Type | Method and Description |
|---|---|
TatoebaEnglishFrenchDataset |
build()
Builds the
TatoebaEnglishFrenchDataset. |
TatoebaEnglishFrenchDataset.Builder |
optArtifact(ai.djl.repository.Artifact artifact)
Sets the optional artifact.
|
TatoebaEnglishFrenchDataset.Builder |
optRepository(ai.djl.repository.Repository repository)
Sets the optional repository.
|
TatoebaEnglishFrenchDataset.Builder |
optSourceTextProcessor(ai.djl.modality.nlp.preprocess.TextProcessor sourceTextProcessor)
Sets a
TextProcessor to be used on the source language input. |
TatoebaEnglishFrenchDataset.Builder |
optSourceTextProcessors(java.util.List<ai.djl.modality.nlp.preprocess.TextProcessor> sourceTextProcessors)
Sets the list of
TextProcessors to be used on the source language input. |
TatoebaEnglishFrenchDataset.Builder |
optTargetTextProcessor(ai.djl.modality.nlp.preprocess.TextProcessor targetTextProcessor)
Sets a
TextProcessor to be used on the target language input. |
TatoebaEnglishFrenchDataset.Builder |
optTargetTextProcessors(java.util.List<ai.djl.modality.nlp.preprocess.TextProcessor> targetTextProcessors)
Sets the list of
TextProcessors to be used on the target language input. |
TatoebaEnglishFrenchDataset.Builder |
optUsage(ai.djl.training.dataset.Dataset.Usage usage)
Sets the optional usage.
|
TatoebaEnglishFrenchDataset.Builder |
self() |
TatoebaEnglishFrenchDataset.Builder |
setEmbedding(ai.djl.modality.nlp.WordEmbedding wordEmbedding,
boolean trainEmbedding)
Sets the required implementation of
WordEmbedding to source the embeddings from. |
TatoebaEnglishFrenchDataset.Builder |
setTokenizer(ai.djl.modality.nlp.preprocess.Tokenizer tokenizer)
Sets a
Tokenizer to tokenize the input sentences. |
TatoebaEnglishFrenchDataset.Builder |
setValidLength(boolean includeValidLength)
Sets the required parameter whether to include the valid length as part of data in the
Record. |
protected java.util.List<ai.djl.modality.nlp.preprocess.TextProcessor> sourceTextProcessors
protected java.util.List<ai.djl.modality.nlp.preprocess.TextProcessor> targetTextProcessors
protected ai.djl.modality.nlp.WordEmbedding wordEmbedding
protected boolean trainEmbedding
protected boolean includeValidLength
protected ai.djl.modality.nlp.preprocess.Tokenizer tokenizer
public TatoebaEnglishFrenchDataset.Builder self()
self in class ai.djl.training.dataset.RandomAccessDataset.BaseBuilder<TatoebaEnglishFrenchDataset.Builder>public TatoebaEnglishFrenchDataset.Builder optUsage(ai.djl.training.dataset.Dataset.Usage usage)
usage - the usagepublic TatoebaEnglishFrenchDataset.Builder optRepository(ai.djl.repository.Repository repository)
repository - the repositorypublic TatoebaEnglishFrenchDataset.Builder optArtifact(ai.djl.repository.Artifact artifact)
artifact - the artifactpublic TatoebaEnglishFrenchDataset.Builder setEmbedding(ai.djl.modality.nlp.WordEmbedding wordEmbedding, boolean trainEmbedding)
WordEmbedding to source the embeddings from.wordEmbedding - the implementation of WordEmbedding to source the embeddings
fromtrainEmbedding - whether the embeddings need further trainingpublic TatoebaEnglishFrenchDataset.Builder setValidLength(boolean includeValidLength)
Record.includeValidLength - whether to include the valid length as part of datapublic TatoebaEnglishFrenchDataset.Builder setTokenizer(ai.djl.modality.nlp.preprocess.Tokenizer tokenizer)
Tokenizer to tokenize the input sentences.tokenizer - the Tokenizer to be setpublic TatoebaEnglishFrenchDataset.Builder optSourceTextProcessors(java.util.List<ai.djl.modality.nlp.preprocess.TextProcessor> sourceTextProcessors)
TextProcessors to be used on the source language input. The
order of TextProcessor in the list can make a difference.sourceTextProcessors - the list of TextProcessors to be setpublic TatoebaEnglishFrenchDataset.Builder optSourceTextProcessor(ai.djl.modality.nlp.preprocess.TextProcessor sourceTextProcessor)
TextProcessor to be used on the source language input. The order in which
TextProcessor is added can make a difference.sourceTextProcessor - the TextProcessor to be setpublic TatoebaEnglishFrenchDataset.Builder optTargetTextProcessors(java.util.List<ai.djl.modality.nlp.preprocess.TextProcessor> targetTextProcessors)
TextProcessors to be used on the target language input. The
order of TextProcessor * in the list can make a difference.targetTextProcessors - the list of TextProcessors to be setpublic TatoebaEnglishFrenchDataset.Builder optTargetTextProcessor(ai.djl.modality.nlp.preprocess.TextProcessor targetTextProcessor)
TextProcessor to be used on the target language input. The order in which
TextProcessor is added can make a difference.targetTextProcessor - the TextProcessor to be setpublic TatoebaEnglishFrenchDataset build()
TatoebaEnglishFrenchDataset.TatoebaEnglishFrenchDataset