Richard Zowalla created OPENNLP-1951:
----------------------------------------

             Summary: 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
            Reporter: Richard Zowalla


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)

Reply via email to