pdftract/profiles/builtin/bank_statement/profile.yaml
jedarden 8b5dd4febb docs(pdftract-4iier): add per-profile README documentation for all 9 built-in profiles
This commit creates user-facing documentation for each built-in profile:

- Profile YAML files defining match criteria, priority, and extracted fields
- Per-profile READMEs with match criteria summary, extracted fields table,
  known limitations, sample input pointers, and configuration tips
- xtask skeleton generator for automated README generation

Profiles documented:
- invoice: Commercial invoices with line items, vendor/customer, totals
- receipt: POS receipts with items, payment method
- contract: Legal contracts with parties, effective date, term, signatures
- scientific_paper: Academic papers with title, authors, abstract, DOI, references
- slide_deck: Presentation slides with title, presenter, date, slide titles
- form: Fillable forms (degenerate case: uses Phase 7.4 form_fields)
- bank_statement: Bank statements with account info, period, balances, transactions
- legal_filing: Court filings with case number, court, parties, filing date, docket
- book_chapter: Book chapters with title, chapter number, author, section headings

Closes: pdftract-4iier
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 23:19:00 -04:00

68 lines
2.2 KiB
YAML

description: Bank statement with account info, period, balances, transactions
priority: 42
match:
any:
- text_patterns:
- "(?i)statement\\s+of\\s+account"
- "(?i)bank\\s+statement"
- "(?i)account\\s+statement"
- "(?i)transaction\\s+history"
- text_patterns:
- "(?i)opening\\s+balance"
- "(?i)closing\\s+balance"
- "(?i)statement\\s+period"
- "(?i)account\\s*#?\\s*:?\\s*\\*{4,}"
- structural:
- has_monetary_columnar_layout: true
- has_date_column: true
page_count_hint: 1-10
profile_fields:
account_number:
type: string
extraction:
patterns:
- "(?i)account\\s*(?:number|#|no)?\\s*:?,?\\s*(\\*?\\d[\\d\\*]{3,})"
- "(?i)acct\\s*(?:#|:)?\\s*(\\*?\\d[\\d\\*]{3,})"
fallback: null
statement_period:
type: string
extraction:
patterns:
- "(?i)statement\\s+period\\s*:?.*?([A-Za-z]+\\s+[0-9]{1,2}.*?through.*?[A-Za-z]+\\s+[0-9]{1,2},?\\s+[0-9]{4})"
- "(?i)period\\s*:?.*?([0-9]{1,2}[/-][0-9]{1,2}[/-][0-9]{2,4})\\s+(?:to|through|-)\\s+([0-9]{1,2}[/-][0-9]{1,2}[/-][0-9]{2,4})"
fallback: null
opening_balance:
type: decimal
extraction:
patterns:
- "(?i)opening\\s+balance\\s*:?.*?[\\$€£¥]?\\s*([0-9,]+\\.?[0-9]*)"
- "(?i)beginning\\s+balance\\s*:?.*?[\\$€£¥]?\\s*([0-9,]+\\.?[0-9]*)"
fallback: null
closing_balance:
type: decimal
extraction:
patterns:
- "(?i)closing\\s+balance\\s*:?.*?[\\$€£¥]?\\s*([0-9,]+\\.?[0-9]*)"
- "(?i)ending\\s+balance\\s*:?.*?[\\$€£¥]?\\s*([0-9,]+\\.?[0-9]*)"
- "(?i)current\\s+balance\\s*:?.*?[\\$€£¥]?\\s*([0-9,]+\\.?[0-9]*)"
fallback: null
transactions:
type: array
extraction:
table_region: "largest_table_or_central_body"
schema:
- name: date
type: date
required: true
- name: description
type: string
required: true
- name: amount
type: decimal
required: false
- name: balance
type: decimal
required: false
fallback: []
reading_order: line_dominant
zone_filtering: exclude_headers_footers