pemistahl/lingua

[Feature] Ignore proper nouns

bdecarne opened this issue · 1 comments

Hello !

I have some troubles with proper nouns in sentences :

LanguageDetector detector = LanguageDetectorBuilder.fromLanguages(Language.PORTUGUESE, Language.FRENCH).build();
Language detectedLanguage = detector.detectLanguageOf("Nina Conceição vous présente ses dernières créations");
assertEquals(Language.FRENCH, detectedLanguage);
Expected :FRENCH
Actual   :UNKNOWN

Hi @bdecarne, it turns out that your detection result is caused by a bug in the library's rule engine. When fixing it, French will be returned as the language for your given sentence. This bug fix will be included in the next release.