Closed hasandiwan closed 7 months ago
Please read the docs carefully. Your code does not make sense. The following is the correct one:
LanguageDetector detector = LanguageDetectorBuilder.fromAllLanguages().build();
Language language = detector.detectLanguageOf("I am what I am and no one says...");
String text = "hello world"; LanguageDetector detector = LanguageDetectorBuilder.fromAllLanguages().build(); Language language = detector.detectLanguage(text);
Now how do I get "English" from the language object?
Yields a NoSuchMethodError. Help?