code: public Integer[][] textsToSequences(String[] texts) {
          Integer oovTokenIndex  = wordIndex.get(outOfVocabularyToken);
          String[] wordSequence;
          ArrayList<Integer[]> sequences = new ArrayList<>();
          for (String text: texts) {
              if (charLevel) {
                  if (lower) {
                      text = text.toLowerCase();
                  }
                  wordSequence = text.split("");
              } else {
                  wordSequence = textToWordSequence(text, filters, lower, split);
              }
              ArrayList<Integer> indexVector = new ArrayList<>();
              for (String word: wordSequence) {
                  if (wordIndex.containsKey(word)) {
                      int index = wordIndex.get(word);
                      if (numWords != null && index >= numWords) {
                          if (oovTokenIndex != null)
                              indexVector.add(oovTokenIndex);
                      } else {
                          indexVector.add(index);
                      }
                  } else if (oovTokenIndex != null) {
                      indexVector.add(oovTokenIndex);
                  }
              }
              Integer[] indices = indexVector.toArray(new Integer[indexVector.size()]);
              sequences.add(indices);
          }
          return sequences.toArray(new Integer[sequences.size()][]);
      }
docs: Transforms a bunch of texts into their index representations.
  
  @param texts input texts
  @return array of indices of the texts