refactor(parser): extract bill detectors and engine #106
No reviewers
Labels
No labels
area:backend
area:frontend
area:infra
area:ocr
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
phase:M1
phase:M2
phase:M3
phase:M4
phase:M5
phase:M6
phase:M7
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
TJC/bill-splitter!106
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/93-extract-bill-detectors"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
ReceiptParseEngine.Parseinto its own layer underParsing/Detectors, mirroring how A4 moved item parsing intoIReceiptRule+ItemSelectionEngine(Phase A5 of #77).GrandTotalDetectorowns the positional grand-total selection: lowest total-word row byBox.Y, same-row tie takes the larger amount.BillDetectionEngineanchors on that total, readsTax/Tip/Serviceoff the rows above it, drops subtotals/rollups/VAT breakdowns/intermediate totals/payment noise, parks bare charges, and hands back the remaining item rows as aBillDetectionresult.KeywordClassifier; the bill engine composes that classifier with the positional anchor rather than duplicating it.ReceiptParseEngine.Parseis now candidate-building plus engine wiring; theReceiptParserfacade andOcrWorkercall site are unchanged.Test plan
dotnet build backend/BillSplitter.sln -warnaserror-> 0 warnings / 0 errors.dotnet testdomain suite green (86 passed), corpus byte-identical (35 passed); noexpected.jsonchanges. Integration tests are Docker-only and CI-run.Closes #93