Skip to content

tijoseymathew/langextract-docling

Repository files navigation

LangExtract Docling

LangExtract Docling is a lightweight wrapper around LangExtract that adds native support for processing PDF files via Docling.

Installation

pip install langextract-docling

Usage

import langextract_docling as lx

# Extract from plain text (same as LangExtract)
result = lx.extract(
    text_or_documents="Your document text here.",
    prompt_description="Extract entities",
    examples=[...]
)

# Extract from a local PDF
result = lx.extract(
    text_or_documents="path/to/document.pdf",
    prompt_description="Extract entities",
    examples=[...]
)

# Extract from a PDF URL
result = lx.extract(
    text_or_documents="https://example.com/document.pdf",
    prompt_description="Extract entities",
    examples=[...]
)

License

MIT License

About

A wrapper for langextract that adds PDF processing capability using docling.

Resources

License

Stars

Watchers

Forks

Packages

No packages published