📄

LiteParse · Pipeline OCR Local

Legaltech Ibérica SL — Ingesta de contratos 2026

✓ Completado Local · Sin Cloud OCR Activo v2.0.0
Páginas parseadas
4
contrato_arrendamiento_urban_01234.pdf
Text items extraídos
847
con bounding boxes x/y/w/h
OCR (páginas)
1
Página 4 · firma escaneada
Confianza media OCR
91.4%
Tesseract eng · 150 dpi
Tiempo total
1.8s
4 workers · CPU local
💻 Comandos ejecutados
$ lit parse contrato_arrendamiento_urban_01234.pdf --format json --ocr-language spa -o contrato_parsed.json
  Parsed 4 pages — 847 text items — OCR on page 41.8s
$ lit screenshot contrato_arrendamiento_urban_01234.pdf --dpi 150 --target-pages "1-4" -o ./screenshots
  Saved 4 PNGs — ./screenshots/page_1.png .. page_4.png
$ # Output: 9.2 MB JSON · 4 PNGs (2.1 MB cada uno) · 100% local
📃 Vista del documento con bounding boxes Página 1 de 4
CONTRATO DE ARRENDAMIENTO URBANO
Ref.: LTI-2026-01234  |  Madrid, 10 de junio de 2026
PRIMERA. — PARTES CONTRATANTES
De una parte, INMOBILIARIA ALTAVERDE SL, con CIF B-87654321, representada por D. Roberto Solana Prats, como arrendador. De otra, D.ª Carmen Vidal Ruiz, con DNI 45.123.678-K, como arrendataria.
SEGUNDA. — OBJETO DEL CONTRATO
El arrendador cede en arrendamiento a la arrendataria el inmueble sito en Calle Gran Vía 47, 3.º Dcha., Madrid, C.P. 28013, de uso exclusivamente residencial.
TERCERA. — DURACIÓN
El presente contrato tendrá una duración de 12 meses, con inicio el 1 de julio de 2026 y finalización el 30 de junio de 2027, conforme a la LAU.
Expediente: LTI/2026/01234  |  Notario: D. Ignacio Flores
Protocolo n.º: 2.847/2026
Título (H1)
Sección
Cuerpo
Metadato
Firma/OCR
📄 contrato_parsed.json — text_items (extracto) 847 items totales
{ "document": "contrato_arrendamiento_urban_01234.pdf", "liteparse_version": "2.0.0", "parse_time_ms": 1842, "total_pages": 4, "total_text_items": 847, "ocr_pages": [4], "pages": [ { "page_num": 1, "width": 595.3, "height": 841.9, "is_ocr": false, "text_items": [ { "id": "p1_0", "text": "CONTRATO DE ARRENDAMIENTO URBANO", "x": 142.5, "y": 47.2, "width": 310.0, "height": 18.0, "font_name": "Times-Bold", "font_size": 14.0, "confidence": null // native PDF }, { "id": "p1_1", "text": "Ref.: LTI-2026-01234 | Madrid, 10 de junio de 2026", "x": 178.0, "y": 68.4, "width": 238.0, "height": 11.2, "font_name": "Helvetica", "font_size": 9.5, "confidence": null }, // ... 284 items más en página 1 ... ] }, // páginas 2-3 (texto nativo, ~180 items cada una) ... { "page_num": 4, "is_ocr": true, "ocr_language": "spa", "ocr_dpi": 150, "text_items": [ { "id": "p4_0", "text": "Firmado en Madrid a 10 de junio de 2026", "x": 68.0, "y": 122.3, "width": 280.0, "height": 14.0, "confidence": 0.947 // OCR }, { "id": "p4_1", "text": "El arrendador: Roberto Solana Prats", "confidence": 0.921 }, { "id": "p4_2", "text": "La arrendataria: Carmen Vidal Ruiz", "confidence": 0.894 } ] } ] }
🚀 Pipeline RAG — Legaltech Ibérica
Ingest PDF
lit parse → JSON con bboxes
0.4s · 4 workers · spa OCR
Screenshots
4 PNGs · 150 dpi · multimodal
1.4s · ImageMagick local
Chunk + embed
text_items → chunks 512 tokens
0.3s · bboxes preservados
Vector store
Chroma local · 847 vectores
0.2s · embeddings Claude
RAG Query → UI
Respuesta con fuente resaltada
En producción → LTI Q3 2026
🚀 Integración Python RAG
from liteparse import LiteParse, search_items from pathlib import Path # 1. Parseo local con OCR en español parser = LiteParse( output_format="json", ocr_enabled=True, ocr_language="spa", num_workers=4, quiet=True ) result = parser.parse("contrato_arrendamiento.pdf") # 2. Screenshots para agente multimodal shots = parser.screenshot( "contrato_arrendamiento.pdf", page_numbers=[4] # solo pág escaneada ) Path("screenshots").mkdir(exist_ok=True) for s in shots: Path(f"screenshots/page_{s.page_num}.png").write_bytes(s.image_bytes) # 3. Búsqueda con bboxes → highlight en UI page1 = result.get_page(1) matches = search_items( page1.text_items, "PARTES CONTRATANTES", case_sensitive=False ) for m in matches: bbox = (m.x, m.y, m.width, m.height) highlight_in_viewer(bbox) # → UI
📊 Métricas de rendimiento
Confianza OCR pág 4
91.4%
Páginas nativas
3 / 4
Items con bbox
100%
Throughput (pág/s)
2.2/s
Uso CPU (4 workers)
62%
Datos enviados nube
0 B
📷 Página 4 detectada como escaneada — OCR Tesseract spa aplicado automáticamente
DÉCIMA. — FIRMA DE LAS PARTES
Firmado en Madrid a 10 de junio de 2026, en prueba de conformidad con todo lo anteriormente expuesto.
El arrendador
Roberto Solana P.
CIF B-87654321
La arrendataria
Carmen Vidal R.
DNI 45.123.678-K
NOTARIA
FLORES
MADRID
n.º 2.847
📋 Text items extraídos — muestra representativa (pág. 1 + pág. 4 OCR) 847 items totales
ID Texto x y w h Fuente Tam. OCR conf. Tipo
p1_0 CONTRATO DE ARRENDAMIENTO URBANO 142.547.2310.018.0 Times-Bold 14.0 H1
p1_1 Ref.: LTI-2026-01234 | Madrid, 10 jun 2026 178.068.4238.011.2 Helvetica 9.5 Meta
p1_2 PRIMERA. — PARTES CONTRATANTES 56.798.0165.012.5 Times-Bold 11.0 Secc.
p1_3 De una parte, INMOBILIARIA ALTAVERDE SL, con CIF B-87654321... 56.7115.0481.828.0 Times-Roman 10.5 Body
p1_4 SEGUNDA. — OBJETO DEL CONTRATO 56.7156.0152.012.5 Times-Bold 11.0 Secc.
p4_0 Firmado en Madrid a 10 de junio de 2026 68.0122.3280.014.0
0.947
OCR
p4_1 El arrendador: Roberto Solana Prats 68.0180.5210.012.0
0.921
OCR
p4_2 La arrendataria: Carmen Vidal Ruiz 310.0180.5205.012.0
0.894
OCR