async generateText(sentenceIndices, length, temperature) {
    onTextGenerationBegin();
    return await model.generateText(
        this.model, this.textData_, sentenceIndices, length, temperature,
        onTextGenerationChar);
  }
Generate text using the LSTM model.

@param {number[]} sentenceIndices Seed sentence, represented as the
  indices of the constituent characters.
@param {number} length Length of the text to generate, in number of
  characters.
@param {number} temperature Temperature parameter. Must be a number > 0.
@returns {string} The generated text.