refactor(parser): extract line classifier #104
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!104
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/91-extract-line-classifier"
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
ILineClassifier+KeywordClassifierunderParsing/Classification, mirroring the A2 normalizershape (internal interface + default impl, wired into the engine).
LineTypedecisions - subtotal, item-count,rollup, VAT breakdown, tax, tip, service, total, payment noise, bare charge,
and the lone-service-label positional case - out of the two engine cascades.
LineTypefor grand-total detection and above-totalclassification; item-name and unit-price rules stay in the engine for A4.
PreviousHasAmountonCandidateso the lone-service-label check reusesthe engine's single money regex instead of a duplicate in the classifier.
Tax-before-Total quirk (a "Total Taxes" row reads as tax and never wins the
grand total), leaving corpus output byte-identical.
Test plan
dotnet build backend/BillSplitter.slnclean, 0 warnings.dotnet test backend/tests/BillSplitter.Testsgreen: 85 passed, all 33 corpusfixtures byte-identical, no
expected.jsonchanged.Closes #91