@Override
    public LanguageDetector setPriors(Map<String, Float> languageProbabilities) throws IOException {
        this.languageProbabilities = languageProbabilities;

        loadModels(languageProbabilities.keySet());

        return this;
    }
Implementation of the LanguageDetector API that uses
https://github.com/optimaize/language-detector
tika-langdetect/tika-langdetect-optimaize/src/main/java/org/apache/tika/langdetect/optimaize/OptimaizeLangDetector.java