You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "Tim Allison (JIRA)" <ji...@apache.org> on 2019/05/29 17:19:00 UTC

[jira] [Commented] (OPENNLP-1261) Language Detector fails to predict language on long input texts

    [ https://issues.apache.org/jira/browse/OPENNLP-1261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16851080#comment-16851080 ] 

Tim Allison commented on OPENNLP-1261:
--------------------------------------

I'm attaching the results comparing the before and after.  The type of noise is "plus or minus" 1 character...so that noised text likely has something within the same unicode block as the original text.

It looks like there is a trivial decline in accuracy on shorter texts. Search for "Accuracy Across Languages -- Detector/Length/Noise" and then go to OpenNLPLangDetector in both files.  

This largely fixes the problems with lengthy text (100000), but there are still some language-specific degradations when moving from, say 10k to 100k.  
{noformat}
LANG: bul
				 OpenNLPLangDetector        len=10000 noise=0 lang=bul detected=bul cnt=150 percent=100.00%
{noformat}

{noformat}
LANG: bul
				 OpenNLPLangDetector        len=50000 noise=0 lang=bul detected=che cnt=73 percent=48.67%
				 OpenNLPLangDetector        len=50000 noise=0 lang=bul detected=rus cnt=45 percent=30.00%
				 OpenNLPLangDetector        len=50000 noise=0 lang=bul detected=bul cnt=32 percent=21.33%
{noformat}

{noformat}
LANG: bul
				 OpenNLPLangDetector        len=100000 noise=0 lang=bul detected=mkd cnt=113 percent=75.33%
				 OpenNLPLangDetector        len=100000 noise=0 lang=bul detected=bak cnt=37 percent=24.67%
{noformat}




> Language Detector fails to predict language on long input texts
> ---------------------------------------------------------------
>
>                 Key: OPENNLP-1261
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-1261
>             Project: OpenNLP
>          Issue Type: Improvement
>          Components: Language Detector
>            Reporter: Joern Kottmann
>            Assignee: Joern Kottmann
>            Priority: Major
>         Attachments: langid_plus_minus_rollups.zip
>
>
> If the input text is very long, e.g. 100k chars, then the lang detect component fails to detect the language correctly, even though the text is only written in one language.
> This issue was tracked down to the context generator, where the count of the ngrams are ignored.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)