Parse your first document in under 5 minutes.
pip install longparserfrom longparser import DocumentPipeline, ProcessingConfig
# Create pipeline with defaults
pipeline = DocumentPipeline(ProcessingConfig())
# Parse a PDF
result = pipeline.process_file("research_paper.pdf")
print(f"Pages: {result.document.metadata.total_pages}")
print(f"Chunks: {len(result.chunks)}")
print(result.chunks[0].text)for chunk in doc.chunks[:3]:
print(f"[{chunk.chunk_type}] tokens={chunk.token_count}")
print(chunk.text[:200])
print("---")from longparser.integrations.langchain import LongParserLoader
loader = LongParserLoader("report.pdf")
documents = loader.load() # Returns List[Document]from longparser.integrations.llamaindex import LongParserReader
reader = LongParserReader()
nodes = reader.load_data(file="report.pdf")# Set environment variables
cp .env.example .env
# Edit .env with your keys
# Run server
uvicorn longparser.server.app:app --reloadThen visit http://localhost:8000/docs for the Swagger UI.
| Format | Extension | Notes |
|---|---|---|
.pdf |
OCR + table structure | |
| Word | .docx |
OMML equation injection |
| PowerPoint | .pptx |
Slide-by-slide chunking |
| Excel | .xlsx |
Sheet-aware table parsing |
| CSV | .csv |
Column-profile chunks |