[
https://issues.apache.org/jira/browse/OPENNLP-1261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16859033#comment-16859033
]
Tim Allison commented on OPENNLP-1261:
--------------------------------------
Would it be a bridge too far to introduce a {{MappingDetectorContextGenerator}}
that returns a {{Map<String, Integer>}}, perhaps a transitional subclass of
{{LanguageDetectorContextGenerator}}, so that we're not storing character
ngrams in an array and then summing them at the end?
If I understand correctly, we could convert the counts to floats and then call
the two parameter {{GISModel.eval(String[], float[])}}.
> 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)