Class StanfordMovieReview

java.lang.Object
ai.djl.training.dataset.RandomAccessDataset
ai.djl.basicdataset.nlp.TextDataset
ai.djl.basicdataset.nlp.StanfordMovieReview
All Implemented Interfaces:
ai.djl.training.dataset.Dataset

public class StanfordMovieReview extends TextDataset
The StanfordMovieReview dataset contains a Application.NLP.SENTIMENT_ANALYSIS set of movie reviews and their sentiment ratings.

The data is sourced from reviews located on IMDB (see here for details).

  • Constructor Details

    • StanfordMovieReview

      protected StanfordMovieReview(StanfordMovieReview.Builder builder)
      Creates a new instance of StanfordMovieReview with the given necessary configurations.
      Parameters:
      builder - a builder with the necessary configurations
  • Method Details

    • builder

      public static StanfordMovieReview.Builder builder()
      Creates a new builder to build a StanfordMovieReview.
      Returns:
      a new builder
    • prepare

      public void prepare(ai.djl.util.Progress progress) throws IOException, ai.djl.modality.nlp.embedding.EmbeddingException
      Throws:
      IOException
      ai.djl.modality.nlp.embedding.EmbeddingException
    • get

      public ai.djl.training.dataset.Record get(ai.djl.ndarray.NDManager manager, long index)
      Specified by:
      get in class ai.djl.training.dataset.RandomAccessDataset
    • availableSize

      protected long availableSize()
      Specified by:
      availableSize in class ai.djl.training.dataset.RandomAccessDataset