You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "Martin Wiesner (Jira)" <ji...@apache.org> on 2026/09/17 06:30:00 UTC

[jira] [Updated] (OPENNLP-1951) Clear adaptive data at each new LIT or CIE text in ADNameSampleStream

     [ https://issues.apache.org/jira/browse/OPENNLP-1951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Wiesner updated OPENNLP-1951:
------------------------------------
    Summary: Clear adaptive data at each new LIT or CIE text in ADNameSampleStream  (was: ADNameSampleStream.getTextID always returns the same id for LIT and CIE metadata)

> Clear adaptive data at each new LIT or CIE text in ADNameSampleStream
> ---------------------------------------------------------------------
>
>                 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)