Package ai.djl.basicdataset.nlp
Class AmazonReview.Builder
- java.lang.Object
-
- ai.djl.training.dataset.RandomAccessDataset.BaseBuilder<T>
-
- ai.djl.basicdataset.tabular.TabularDataset.BaseBuilder<T>
-
- ai.djl.basicdataset.tabular.CsvDataset.CsvBuilder<AmazonReview.Builder>
-
- ai.djl.basicdataset.nlp.AmazonReview.Builder
-
- Enclosing class:
- AmazonReview
public static final class AmazonReview.Builder extends CsvDataset.CsvBuilder<AmazonReview.Builder>
A builder to construct aAmazonReview.
-
-
Field Summary
-
Fields inherited from class ai.djl.basicdataset.tabular.CsvDataset.CsvBuilder
csvFormat, csvUrl
-
Fields inherited from class ai.djl.basicdataset.tabular.TabularDataset.BaseBuilder
allowNoLabels, features, labels
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AmazonReviewbuild()Builds the newCsvDataset.AmazonReview.BuilderoptArtifactId(java.lang.String artifactId)Sets the optional artifactId.AmazonReview.BuilderoptDatasetName(java.lang.String datasetName)Sets the name of the subset of Amazon Reviews.AmazonReview.BuilderoptGroupId(java.lang.String groupId)Sets optional groupId.AmazonReview.BuilderoptRepository(ai.djl.repository.Repository repository)Sets the optional repository.AmazonReview.Builderself()-
Methods inherited from class ai.djl.basicdataset.tabular.CsvDataset.CsvBuilder
optCsvFile, optCsvUrl, setCsvFormat
-
Methods inherited from class ai.djl.basicdataset.tabular.TabularDataset.BaseBuilder
addCategoricalFeature, addCategoricalFeature, addCategoricalFeature, addCategoricalLabel, addCategoricalLabel, addCategoricalLabel, addFeature, addLabel, addNumericFeature, addNumericFeature, addNumericLabel, addNumericLabel, noLabels
-
-
-
-
Method Detail
-
self
public AmazonReview.Builder self()
- Overrides:
selfin classCsvDataset.CsvBuilder<AmazonReview.Builder>
-
optRepository
public AmazonReview.Builder optRepository(ai.djl.repository.Repository repository)
Sets the optional repository.- Parameters:
repository- the repository- Returns:
- this builder
-
optGroupId
public AmazonReview.Builder optGroupId(java.lang.String groupId)
Sets optional groupId.- Parameters:
groupId- the groupId}- Returns:
- this builder
-
optArtifactId
public AmazonReview.Builder optArtifactId(java.lang.String artifactId)
Sets the optional artifactId.- Parameters:
artifactId- the artifactId- Returns:
- this builder
-
optDatasetName
public AmazonReview.Builder optDatasetName(java.lang.String datasetName)
Sets the name of the subset of Amazon Reviews.- Parameters:
datasetName- the name of the dataset- Returns:
- this builder
-
build
public AmazonReview build()
Builds the newCsvDataset.- Overrides:
buildin classCsvDataset.CsvBuilder<AmazonReview.Builder>- Returns:
- the new
CsvDataset
-
-