void reset(int[] chunk) {
            next = null;
            pos = 0;
            currGram = minGram;
            buffer = chunk;
            if (buffer.length < minGram) {
                return;
            }
            int end = Math.min(buffer.length, maxGram);

            for (int i = 0; i < end; i++) {
                buffer[i] = Character.toLowerCase(buffer[i]);
            }
            if (buffer.length >= minGram) {
                next = new String(buffer, 0, minGram);
            }
        }
@param chunk this is the chunk that will be ngrammed.  Note:
             The ngrammer will lowercase the codepoints in place!
             If you don't want the original data transformed,
             copy it before calling this!
tika-langdetect/tika-langdetect-opennlp/src/main/java/org/apache/tika/langdetect/opennlp/ProbingLanguageDetector.java