Skip to content

OPENNLP-1989: Regex removal (5b/10): Preserve feature identities in event parsing - #1321

Open
krickert wants to merge 1 commit into
apache:mainfrom
ai-pipestream:OPENNLP-1989-event-parsing
Open

krickert wants to merge 1 commit into
apache:mainfrom
ai-pipestream:OPENNLP-1989-event-parsing

Conversation

@krickert

Copy link
Copy Markdown
Contributor

Replaces regex-based event parsing with shared parsing that follows the text format's delimiters and preserves Unicode feature names. RealValueFileEventStream and RealBasicEventStream use the same parser, with space, tab, carriage return, line feed, and form feed separating fields, matching FileEventStream independently of tokenizer settings. Other characters, including no-break and ideographic spaces, remain in feature names. Leading and repeated separators produce no empty features, outcome-only records remain valid events without ending the stream, and blank records report a format error. SimpleEventStreamBuilder uses the same context delimiters, preserves slashes after the outcome separator, and validates valued contexts. Tests and the manual cover these contracts and Unicode edge cases.

JIRA: OPENNLP-1989. Part 5b/10 of the regex-removal work; targets main independently.

Validation on Linux with JDK 25:

  • Full ML commons and maxent verification passes, with 143 and 51 tests respectively, plus reactor dependencies.
  • A separate targeted run passes 127 tests with opennlp.whitespace.mode=LEGACY; the default mode passes in the full verification.
  • Javadoc and the HTML manual build pass. Local Maven runs used -Dopennlp.forkCount=1 -Drat.skip=true; existing unrelated skips and Javadoc warnings remain. Hosted CI has not run for this split.

…vent parsing

Share real-valued event parsing and fixed field delimiters. Preserve Unicode feature names, keep outcome-only events in the stream and validate builder records.

Validation: 25 Unicode regressions failed with the broad splitter before the fix; affected-module verify, LEGACY-mode tests, Javadoc and manual builds pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant