LangExtract Docling is a lightweight wrapper around LangExtract that adds native support for processing PDF files via Docling.
pip install langextract-doclingimport 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=[...]
)MIT License