[
https://issues.apache.org/jira/browse/OPENNLP-1951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martin Wiesner reassigned OPENNLP-1951:
---------------------------------------
Assignee: Kristian Rickert
> ADNameSampleStream.getTextID always returns the same id for LIT and CIE
> metadata
> --------------------------------------------------------------------------------
>
> Key: OPENNLP-1951
> URL: https://issues.apache.org/jira/browse/OPENNLP-1951
> Project: OpenNLP
> Issue Type: Bug
> Affects Versions: 2.5.12, 3.0.0-M6
> Reporter: Richard Zowalla
> Assignee: Kristian Rickert
> Priority: Minor
> Fix For: 3.0.0
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> In {{ADNameSampleStream.getTextID}} \(line 439ff\), {{textIdMeta2}} and
> {{textMeta2}} are local variables initialised to {{\-1}} and {{""}} on every
> call. So for {{LIT}} and {{CIE}} metadata the "text changed" branch always
> increments to {{0}} and returns {{0}}. The caller at lines 202\-206 compares
> against the field {{textID}}, which therefore changes only once:
> {{clearAdaptiveData}} is never set after the first text.
> Result: adaptive feature data leaks across texts when training name finders
> on LIT/CIE Floresta data.
> _Fix:_ make them fields, or derive the id from the metadata. This changes the
> produced name samples, so it needs an eval build.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)