Repository navigation
Fix baseline parsing of long dates merged with the code; re-measure Gate 1 - #4
Merged
Merged
Conversation
…ate 1
OCR often returns a long date and the code next to it as one piece of
text ("Apr 28, 2026G5213") or drops the space after the comma
("Mar 5,2026"), so the baseline skipped those bill lines. The code is now
matched right after the date with only a right boundary, and long dates
are printed in the standard form.
Re-ran both baselines on the hard set and the plain baseline on the easy
set. On the same 31 hard cases the deskew baseline now scores line F1
0.985 against 0.961 for Gemini, so the results, README and plan no longer
say AI clearly beats the baseline.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3
What changed
backend/app/baseline.py: after a date is found, the code is matched right after it with only a right boundary, so OCR text such asApr 28, 2026G5213is parsed. Long dates with no space after the comma are accepted and printed asMar 5, 2026. The old whole-row code search stays as a fallback.SYNas6YN, which is still skipped rather than guessed.docs/GATE1_RESULTS.md, the README andPLAN.md.Result (same 31 hard cases)
The baseline now reads line items slightly better than Gemini, so the docs no longer say AI clearly wins. Gemini's remaining edge is 2 of 31 cases on flags.
Checks
python -m pytest -q: 45 passed.