1920212223242526
import org.apache.tika.language.LanguageIdentifier; public class LanguageIdentifierExample { public String identifyLanguage(String text) { LanguageIdentifier identifier = new LanguageIdentifier(text); return identifier.getLanguage(); }