public String detectLanguage(String text) throws IOException {
        LanguageDetector detector = new OptimaizeLangDetector().loadModels();
        LanguageResult result = detector.detect(text);
        return result.getLanguage();
    }
@Test
    public void testDetectLanguage() throws IOException {
        String text = "This is some text that should be identified as English.";
        assertEquals("en", languageDetectorExample.detectLanguage(text));
    }