Skip to main content

PDF extraction pipeline for scientific papers

Project description

acatome-extract

PDF extraction and enrichment pipeline for scientific papers. Converts PDFs into structured, searchable bundles with block-level summaries and embeddings.

Features

  • Marker PDF extraction — structured block extraction with headings, tables, figures
  • Fitz fallback — recursive character chunking when Marker is unavailable
  • LLM enrichment — block and paper summaries via Ollama or litellm
  • Embeddings — sentence-transformer embeddings for semantic search
  • File watcheracatome-extract watch monitors an inbox folder
  • Bundle format.acatome companion files for sharing pre-built extractions
  • CLIacatome-extract command for extract, enrich, and watch workflows

Installation

uv pip install -e .

On macOS/Linux this includes Marker for structured PDF extraction. On Windows it installs with the lighter pymupdf (fitz) backend by default. To add Marker on Windows (requires C build tools):

uv pip install -e ".[marker]"

With GPU acceleration (embeddings + torch):

uv pip install -e ".[gpu]"

Everything at once:

uv pip install -e ".[full]"

Usage

from acatome_extract.pipeline import extract

bundle = extract("/path/to/paper.pdf")

CLI

# Extract (RAKE summaries included automatically, no LLM needed)
acatome-extract extract paper.pdf
acatome-extract extract --type datasheet TI_LM317.pdf   # non-article types

# Enrich — embeddings only by default; add --summarize for LLM summaries
acatome-extract enrich /path/to/bundle
acatome-extract enrich --summarize /path/to/bundle       # enable LLM summaries
acatome-extract enrich --summarize --skip-existing dir/   # incremental LLM pass

# Watch — extract + embed + ingest; LLM summaries off by default
acatome-extract watch ~/papers/inbox
acatome-extract watch ~/papers/inbox --summarize          # enable LLM summaries

# Migrate old bundles to new summaries dict format + add RAKE
acatome-extract migrate ~/.acatome/papers
acatome-extract migrate ~/.acatome/papers --dry-run       # preview changes

# Supplements
acatome-extract attach parent-slug supplement.pdf --name s1

Summaries

Extraction always generates RAKE (extractive keyword) summaries — instant, no LLM required. LLM-based summaries are opt-in via --summarize and require an Ollama or litellm-compatible model.

RAKE summaries are used as the default for search and display. To add LLM summaries later:

acatome-extract enrich --summarize --skip-existing ~/.acatome/papers

Sidecar metadata

Place a <stem>.meta.json alongside any PDF to override metadata:

{"type": "datasheet", "title": "LM317 Regulator", "author": "Texas Instruments", "year": 2022}

Supported fields: type, title, author (string or list), year, doi, abstract, journal.

Dependencies

  • acatome-meta — metadata lookup and verification
  • marker-pdf — structured PDF extraction
  • litellm / Ollama — LLM-based enrichment

Testing

uv run python -m pytest tests/ -v

License

GPL-3.0-or-later — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

acatome_extract-0.3.0.tar.gz (39.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

acatome_extract-0.3.0-py3-none-any.whl (32.6 kB view details)

Uploaded Python 3

File details

Details for the file acatome_extract-0.3.0.tar.gz.

File metadata

  • Download URL: acatome_extract-0.3.0.tar.gz
  • Upload date:
  • Size: 39.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for acatome_extract-0.3.0.tar.gz
Algorithm Hash digest
SHA256 3aa94468f838005b31ee1ae05d6707fe3ad1f7b22a52b580849698fc303d1217
MD5 901e9e15ffcef6e5436de8a373ca9204
BLAKE2b-256 c3e89077c439a56c3490582f05939eb33c72efdd14a75db53d10bda1d825cb4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for acatome_extract-0.3.0.tar.gz:

Publisher: publish.yml on retospect/acatome-extract

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file acatome_extract-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for acatome_extract-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6e4b37769675211e1ef446509396733af9fc35b78e985d8ae6808eb6621616ee
MD5 58c572d5eca351a2dbe106e1de942a7b
BLAKE2b-256 491cd9ec9c7ba53c03dd86434a05da125d3dbe13408652e9cebd82f8157c93fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for acatome_extract-0.3.0-py3-none-any.whl:

Publisher: publish.yml on retospect/acatome-extract

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page