Skip to content
terbium

terbium / Reference

Document taxonomy

A map of real-world PDF and PPTX documents grouped by layout archetype, with the fields worth extracting and the terbium lane that reads each.

On this page
  1. Archetype A: image-anchored grids (catalog lane)
  2. Archetype B: forms and key-value documents (transaction lane)
  3. Archetype C: sectioned prose (resume lane)
  4. Archetype D: native or geometric grids (already handled)
  5. Archetype E: slide decks (PPTX lane)
  6. Archetype F: flowing prose (out of scope for rows)
  7. How the classifier decides

This is a list of the Portable Document Format (PDF) and PowerPoint (PPTX) documents that exist in the wild, grouped by layout archetype, because the archetype, not the filename or the business domain, decides which terbium lane can read it. Two documents with the same name (an “invoice” from SAP and an “invoice” from a freelancer’s Canva template) can be different archetypes; two documents from different domains (a furniture lookbook and a real estate brochure) can be the same one.

Each entry lists typical fields worth extracting and the layout tells that identify it. Each archetype ends with the lane that handles it and its status in 2.0.0. The lists describe the document landscape; not every document named here is parsed well today, and the status lines say which ones are targeted.

Archetype A: image-anchored grids (catalog lane)

One entity per photo, text clustered near each image. The image is the anchor; the words around it are the record.

  • Product catalog. Fields: sku, name, price, materials, dimensions, photo. Tells: repeating photo+caption units, tokens that look like stock keeping unit (SKU) codes.
  • Lookbook / collection book. Fields: name, collection, photo. Tells: minimal text, large photos, one name per photo.
  • Line sheet (wholesale). Fields: sku, name, wholesale price, minimum order quantity (MOQ), photo. Tells: denser grid, smaller photos, price column.
  • Real estate brochure. Fields: address, price, beds/baths, sqft, photo. Tells: hero photo + spec block, one property per page or spread.
  • Restaurant menu (photo). Fields: dish, description, price, photo. Tells: photo + name + dotted price leaders.
  • Fashion/apparel catalog. Fields: style no, colorways, sizes, photo. Tells: swatch rows under photos, size runs.
  • Jewelry/accessories catalog. Fields: sku, name, stones/metals, price, photo. Tells: small photos, dense spec captions.
  • Art/portfolio book. Fields: title, artist, medium, year, photo. Tells: one image per page, museum-style caption.
  • Parts catalog (industrial). Fields: part no, name, spec, diagram. Tells: exploded diagrams, dense part numbers.
  • Seed/plant catalog. Fields: variety, latin name, days, price, photo. Tells: grid of small photos + coded attributes.

Lane: build_catalog, with layout/labels.py and extract.py. Status in 2.0.0: the picture-heavy end is the focus (dense grids, sparse photo pages, mixed layouts, product decks). See The catalog table.

Archetype B: forms and key-value documents (transaction lane)

Short documents built from labeled fields, usually with one tabular region. The label is the anchor; the value sits right of it, under it, or in a box.

  • Invoice. Fields: number, date, due date, vendor, bill-to, line items, subtotal, tax, total. Tells: “invoice”, “bill to”, amount column, totals block at bottom right.
  • Bill / utility bill. Fields: account no, period, usage, due date, amount due. Tells: “amount due”, “service period”, meter/usage table.
  • Receipt (paper, or point of sale (POS) printout). Fields: merchant, datetime, items, total, payment, change. Tells: narrow column, item-left/price-right pairs, “total”, “cash/card”.
  • Receipt (e-mail/thermal scan). Fields: same as above. Tells: same, often image-only.
  • Purchase order. Fields: purchase order (PO) number, vendor, ship-to, line items, terms. Tells: “purchase order”, “ship to”, qty/unit price columns.
  • Quote / estimate. Fields: quote no, valid-until, line items, total. Tells: “quote”/“estimate”, expiry date, optional checkbox items.
  • Credit / debit note. Fields: note no, ref invoice, lines, total. Tells: “credit note”, references an invoice number.
  • Packing slip / delivery note. Fields: order no, ship-to, items, qty. Tells: no prices, qty-only table, “ship to”.
  • Proforma invoice. Fields: same as invoice. Tells: “proforma”.
  • Tax form (W-2, 1099, goods and services tax (GST) or value added tax (VAT) return). Fields: boxes with numbers, ids, amounts. Tells: numbered boxes, government header, fixed layout.
  • Bank statement. Fields: account, period, transaction lines, balances. Tells: date/description/amount running table, opening/closing balance.
  • Credit card statement. Fields: same + card meta. Tells: same, “minimum payment due”.
  • Payslip. Fields: employee, period, earnings/deductions, net pay. Tells: two-column earnings/deductions grid, “net pay”.
  • Insurance explanation of benefits (EOB) / claim. Fields: claim no, patient, service lines, allowed/paid/owed. Tells: dense codes, multi-amount columns.
  • Shipping label. Fields: addresses, tracking no, service, weight. Tells: huge barcode or quick response (QR) code, bold address block, few fields.
  • Ticket / boarding pass. Fields: passenger, from/to, date, seat, gate, code. Tells: single event, big codes, QR, time-heavy.
  • Certificate (completion, birth, incorporation). Fields: names, dates, issuer, registration no. Tells: centered layout, seals/signatures, little structure.
  • Customs/commercial invoice. Fields: invoice fields + Harmonized System (HS) codes, origin, weights. Tells: HS code column, country fields.
  • Expense report. Fields: employee, dates, category/amount lines, total. Tells: receipt-like lines grouped by date/category.

Lane: layout/forms.py (key-value geometry), the content-agnostic table detector for line items, and schema/transaction.py. Scanned receipts and labels need the optical character recognition (OCR) lane (image adapter and Tesseract). Status in 2.0.0: the schema’s synonyms target invoices, bills, receipts, purchase orders and quotes. Statements and payslips would use the same machinery with different synonyms. Tax forms and insurance EOBs are fixed-template documents and are not targeted. See Invoices, receipts and resumes.

Archetype C: sectioned prose (resume lane)

Long documents organized by headings. The heading, in a bigger or bolder font, is the anchor; the block under it is the record.

  • Resume / curriculum vitae (CV). Fields: name, contacts, links, summary, experience entries, education, skills. Tells: section headers (EXPERIENCE, EDUCATION), date ranges, job-title lines.
  • Academic CV. Fields: + publications, grants, talks. Tells: very long, citation lists.
  • Cover letter. Fields: sender, recipient, date, body. Tells: letter salutation, single flow.
  • Contract / agreement. Fields: parties, effective date, clauses, signatures. Tells: numbered clauses, “whereas”, signature block.
  • Business report. Fields: title, exec summary, sections, tables. Tells: table of contents (TOC), numbered headings, embedded charts.
  • Whitepaper. Fields: same, more marketing. Tells: same, callout boxes.
  • Academic paper. Fields: title, authors, abstract, sections, references. Tells: two columns, “abstract”, numbered refs.
  • Manual / user guide. Fields: product, sections, steps, warnings. Tells: numbered steps, warning boxes, TOC.
  • Spec sheet / datasheet. Fields: product, feature table, ratings. Tells: one or two pages, dense spec table.
  • Proposal / statement of work (SOW). Fields: parties, scope sections, pricing table. Tells: narrative + a pricing table.
  • Meeting minutes. Fields: date, attendees, agenda items, actions. Tells: bullet-heavy, names + action verbs.

Lane: section headings matched by name, contact details found by pattern (email, phone, links), and schema/resume.py. Status in 2.0.0: resumes and CVs are targeted. Contracts and papers are prose, so the honest output for them is section records, not a fake table, and no lane is tuned for them.

Archetype D: native or geometric grids (already handled)

The table is the document.

  • Price list. Fields: sku, name, price columns. Tells: long uniform table, price columns.
  • Financial statement. Fields: line items x periods. Tells: period headers, indented rows, totals.
  • Inventory/stock list. Fields: sku, name, qty, location. Tells: qty column, location codes.
  • Schedule / timetable. Fields: times x days/resources. Tells: time tokens in headers or first column.
  • Rate card. Fields: service, tier, rate. Tells: short table, currency column.
  • Comparison chart. Fields: features x products. Tells: checkmark/yes-no cells.
  • Bill of materials. Fields: part no, qty, unit, description. Tells: nested part numbers.
  • Grade sheet / marksheet. Fields: student, subject scores. Tells: name rows, score columns.
  • Attendance/payroll register. Fields: name x date grid. Tells: date headers, mark cells.
  • Election/sports results table. Fields: name, votes/points, rank. Tells: rank column, numeric body.
  • Menu (text only). Fields: item, price. Tells: dot leaders to prices.
  • Directory / contact list. Fields: name, phone, email columns. Tells: repeating contact patterns.

Lane: layout/tables.detect_tables (content-agnostic) for PDFs, plus native tables from the PPTX, Excel (XLSX) and comma-separated values (CSV) adapters, read through the product or generic schema. Status: handled, with regression tests in tests/test_smoke.py.

Archetype E: slide decks (PPTX lane)

  • Pitch deck. Fields: problem/solution/market slides. Tells: big titles, little body text.
  • Product deck (catalog deck). Fields: one product per slide, photo + specs. Tells: repeating slide layout, photos.
  • Financial review deck. Fields: key performance indicator (KPI) slides, table slides. Tells: native tables, chart images.
  • Lecture/training deck. Fields: titled bullet slides. Tells: bullets, slide numbers.
  • Photo deck / portfolio. Fields: full-bleed images, captions. Tells: image-only slides.

Lane: the PPTX adapter’s native tables and picture extraction. Product decks go through the catalog lane, one row per picture. The other deck types are mostly prose with occasional native tables.

Archetype F: flowing prose (out of scope for rows)

Books, novels, newsletters, essays, magazines and brochures of pure narrative. There is no record structure to reconstruct, and no lane targets them. When nothing scores, the classifier returns unknown; prose that happens to contain keywords such as “experience” or “invoice” can still be classified as another type, so check doc.doc_type and pass --type or doc_type= when the guess is wrong.

How the classifier decides

The classifier in terbium.classify scores each page on keywords, amounts and dates, invoice numbers, colon-terminated key-value lines, emails and phone numbers, bold or large headings, photo count and image density, SKU-like tokens, native tables and the file type, then sums the scores across pages. The full list is on Invoices, receipts and resumes.

The classifier suggests; --type and doc_type= override it. A wrong guess costs a re-run with a flag.