constructor(dataIdentifier, textString, sampleLen, sampleStep) {
    tf.util.assert(
        sampleLen > 0,
        `Expected sampleLen to be a positive integer, but got ${sampleLen}`);
    tf.util.assert(
        sampleStep > 0,
        `Expected sampleStep to be a positive integer, but got ${sampleStep}`);

    if (!dataIdentifier) {
      throw new Error('Model identifier is not provided.');
    }

    this.dataIdentifier_ = dataIdentifier;

    this.textString_ = textString;
    this.textLen_ = textString.length;
    this.sampleLen_ = sampleLen;
    this.sampleStep_ = sampleStep;

    this.getCharSet_();
    this.convertAllTextToIndices_();
  }
Constructor of TextData.

@param {string} dataIdentifier An identifier for this instance of TextData.
@param {string} textString The training text data.
@param {number} sampleLen Length of each training example, i.e., the input
  sequence length expected by the LSTM model.
@param {number} sampleStep How many characters to skip when going from one
  example of the training data (in `textString`) to the next.