private int getTextLimit() {
        int limit = (shortText ? DEFAULT_MAX_CHARS_FOR_SHORT_DETECTION : maxCharsForDetection);

        // We want more text if we're processing documents that have a mixture of languages.
        // FUTURE - figure out right amount to bump up the limit.
        if (mixedLanguages) {
            limit *= 2;
        }

        return limit;
    }
{@inheritDoc}

@return the detected list of languages
@throws IllegalStateException if no models have been loaded with
                              {@link #loadModels() } or {@link #loadModels(java.util.Set) }
tika-langdetect/tika-langdetect-optimaize/src/main/java/org/apache/tika/langdetect/optimaize/OptimaizeLangDetector.java