private static LanguageDetectorModel loadModel() {
        synchronized (monitor) {
            if (model == null) {
                try {
                    model = new LanguageDetectorModel(OpenNlpDetector.class.getResourceAsStream("/models/langdetect-183.bin"));
                }
                catch (IOException e) {
                    throw new UncheckedIOException(e);
                }
            }
        }
        return model;
    }
Detects text language using patched OpenNLP, with fallback to {@link SimpleDetector} for undetected CJK input.

@author jonmv
opennlp-linguistics/src/main/java/com/yahoo/language/opennlp/OpenNlpDetector.java