docs: public static <T> List<List<T>> getNGrams(List<T> items, int minSize, int maxSize) {
      List<List<T>> ngrams = new ArrayList<List<T>>();
      int listSize = items.size();
      for (int i = 0; i < listSize; ++i) {
        for (int ngramSize = minSize; ngramSize <= maxSize; ++ngramSize) {
          if (i + ngramSize <= listSize) {
            List<T> ngram = new ArrayList<T>();
            for (int j = i; j < i + ngramSize; ++j) {
              ngram.add(items.get(j));
            }
            ngrams.add(ngram);
          }
        }
      }
      return ngrams;
    }