pdftract/profiles/builtin/scientific_paper/profile.yaml
jedarden 21fcd902d1 feat(pdftract-2vajs): implement slide_deck profile with fixtures and tests
Implements the slide_deck document profile for PowerPoint/Keynote/Google
Slides exports as PDF. Includes 5 fixtures, expected outputs, and regression
tests.

Components:
- profiles/builtin/slide_deck/profile.yaml - Profile configuration
- tests/fixtures/profiles/slide_deck/ - 5 PDF fixtures with expected outputs
- crates/pdftract-cli/tests/test_slide_deck.rs - Regression tests (12 PASS)

Fixtures cover:
1. pitch_deck - Sales pitch (10 slides)
2. academic_lecture - Academic lecture (40 slides)
3. corporate_kickoff - Corporate kickoff (15 slides)
4. bilingual_deck - Bilingual EN/ES (12 slides)
5. googleslides_handout - Google Slides handout mode (4 pages, 3 slides/page)

Extracted fields: title, presenter, date, slide_titles

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

66 lines
1.6 KiB
YAML

# Scientific Paper Profile
#
# Academic papers from arXiv, journals, conference proceedings.
# Extracts title, authors, abstract, DOI, journal, publication_date, references.
name: scientific_paper
description: Academic papers from arXiv, journals, conference proceedings
priority: 30
# Matching predicates for scientific paper classification
match:
all:
# Must have at least one scientific paper marker
- any:
- text_contains: ["Abstract", "References", "doi:", "arXiv:", "Bibliography"]
- heading_matches: '^(Abstract|Introduction|References|Bibliography)'
# And either has math OR structured headings OR appropriate page count
- any:
- structural:
has_math: true
- structural:
heading_depth: {min: 2}
- structural:
page_count: {min: 4, max: 50}
# Extraction tuning for scientific papers
extraction:
# Use xy_cut reading order for 2-column layout handling
reading_order: xy_cut
# Default table detection
table_detection: default
# Standard readability threshold
readability_threshold: 0.5
# Don't include invisible text
include_invisible: false
# Field extraction specifications
fields:
title:
region: top_quarter
pick: largest_font
authors:
region: top_quarter
pick: nearest_below
after: title
abstract:
near: ["Abstract"]
region: top_half
doi:
regex: 'doi[:\.]\s*(10\.\d{4,9}/[\w\-\._;()/:]+)'
parse: string
journal:
region: top_eighth
pick: first
publication_date:
near: ["Published", "Received", "Accepted"]
parse: date
references:
region: bottom_half
after_heading: References