@Override
    public boolean hasModel(String language) {
        return LanguageIdentifier.getSupportedLanguages().contains(language);
    }
This is Tika's original legacy, homegrown language detector.
As it is currently implemented, it computes vector distance
of trigrams between input string and language models.
<p>
Because it works only on trigrams, it is not suitable for short
texts.
<p>
There are better performing language detectors.  This module is still
here in the hopes that we'll get around to improving it, because
it is elegant and could be fairly trivially improved.
tika-langdetect/tika-langdetect-tika/src/main/java/org/apache/tika/langdetect/tika/TikaLanguageDetector.java