docs: public static <T> String extractNgram(List<T> list, int start, int end) {
      if (start < 0 || end > list.size() || start >= end) return null;
      final StringBuilder sb = new StringBuilder();
      // TODO: iterator
      for (int i = start; i < end; i++) {
        T o = list.get(i);
        if (sb.length() != 0) sb.append(" ");
        sb.append((o instanceof HasWord) ? ((HasWord) o).word() : o.toString());
      }
      return sb.toString();
    }