Class TextDataset.Sample

java.lang.Object
ai.djl.basicdataset.nlp.TextDataset.Sample
Enclosing class:
TextDataset

public static final class TextDataset.Sample extends Object
A class stores TextDataset sample information.
  • Constructor Details

    • Sample

      public Sample(int index, int sentenceLength)
      Constructs a new Sample instance.
      Parameters:
      index - the index
      sentenceLength - the sentence length
  • Method Details

    • getSentenceLength

      public int getSentenceLength()
      Returns the sentence length.
      Returns:
      the sentence length
    • getIndex

      public long getIndex()
      Returns the sample index.
      Returns:
      the sample index