pdftract/profiles/builtin/classification/bank_statement.yaml
jedarden 71705ed77b feat(profiles): implement built-in classification profiles (5.6.4)
Add 9 built-in classification profile definitions as YAML files bundled
via include_str! for the document type classifier (Phase 5.6).

- Create profiles/builtin/classification/{invoice,receipt,contract,scientific_paper,slide_deck,form,bank_statement,legal_filing,book_chapter}.yaml
- Implement load_builtins() in profiles module with profiles feature gate
- Each profile uses MatchPredicate schema with text patterns, structural signals, page counts
- Add comprehensive unit tests for profile loading and feature gate

Closes: pdftract-5sdd

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 15:04:43 -04:00

35 lines
614 B
YAML

name: Bank Statement
type: bank_statement
threshold: 0.6
predicates:
- kind: text_contains
pattern: statement
weight: 0.25
case_sensitive: false
min_hits: 1
- kind: text_contains
pattern: transaction
weight: 0.2
case_sensitive: false
min_hits: 1
- kind: structural_has_table
weight: 0.2
min_count: 1
- kind: text_matches_regex
pattern: '[\$€£¥]\d'
weight: 0.15
min_hits: 2
- kind: page_count_in_range
min: 1
max: 20
weight: 0.1
- kind: text_contains
pattern: balance
weight: 0.1
case_sensitive: false
min_hits: 1