Package ai.djl.basicdataset.nlp
Class AmazonReview
java.lang.Object
ai.djl.training.dataset.RandomAccessDataset
ai.djl.basicdataset.tabular.TabularDataset
ai.djl.basicdataset.tabular.CsvDataset
ai.djl.basicdataset.nlp.AmazonReview
- All Implemented Interfaces:
ai.djl.training.dataset.Dataset
The
AmazonReview dataset contains a Application.NLP.SENTIMENT_ANALYSIS set
of reviews and their sentiment ratings.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA builder to construct aAmazonReview.Nested classes/interfaces inherited from class ai.djl.basicdataset.tabular.CsvDataset
CsvDataset.CsvBuilder<T extends CsvDataset.CsvBuilder<T>>Nested classes/interfaces inherited from class ai.djl.basicdataset.tabular.TabularDataset
TabularDataset.BaseBuilder<T extends TabularDataset.BaseBuilder<T>>Nested classes/interfaces inherited from interface ai.djl.training.dataset.Dataset
ai.djl.training.dataset.Dataset.Usage -
Field Summary
Fields inherited from class ai.djl.basicdataset.tabular.CsvDataset
csvFormat, csvRecords, csvUrlFields inherited from class ai.djl.basicdataset.tabular.TabularDataset
features, labelsFields inherited from class ai.djl.training.dataset.RandomAccessDataset
dataBatchifier, device, labelBatchifier, limit, pipeline, prefetchNumber, sampler, targetPipeline -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAmazonReview(AmazonReview.Builder builder) Creates a new instance ofAmazonReviewwith the given necessary configurations. -
Method Summary
Modifier and TypeMethodDescriptionstatic AmazonReview.Builderbuilder()Creates a new builder to build aAmazonReview.voidprepare(ai.djl.util.Progress progress) Methods inherited from class ai.djl.basicdataset.tabular.CsvDataset
availableSize, getCell, getColumnNamesMethods inherited from class ai.djl.basicdataset.tabular.TabularDataset
get, getFeatures, getFeatureSize, getLabels, getLabelSize, getRowDirect, getRowFeatures, matchingTranslatorOptions, prepareFeaturizersMethods inherited from class ai.djl.training.dataset.RandomAccessDataset
getData, getData, getData, getData, newSubDataset, newSubDataset, randomSplit, size, subDataset, subDataset, subDataset, subDataset, toArrayMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ai.djl.training.dataset.Dataset
prepare
-
Constructor Details
-
AmazonReview
Creates a new instance ofAmazonReviewwith the given necessary configurations.- Parameters:
builder- a builder with the necessary configurations
-
-
Method Details
-
prepare
- Specified by:
preparein interfaceai.djl.training.dataset.Dataset- Overrides:
preparein classCsvDataset- Throws:
IOException
-
builder
Creates a new builder to build aAmazonReview.- Returns:
- a new builder
-