Chuyển đến nội dung
Skillpedia
Thu thập dữ liệu web51k · #3488

liteparse

Skill này làm gì

LiteParse là công cụ trích xuất văn bản từ tài liệu (như PDF và tệp Office) và hình ảnh. Nó hiểu bố cục văn bản trên trang và có thể nhận dạng ký tự quang học (OCR) trên tài liệu quét.

Khi nào nên dùng

  • ✓Khi bạn cần trích xuất văn bản từ PDF hoặc hình ảnh mà không gửi tệp lên đám mây.
  • ✓Để lấy vị trí chính xác của từng từ trong tài liệu, hữu ích khi cần tham chiếu chính xác.
  • ✓Để chuyển tài liệu quét hoặc hình ảnh thành văn bản có thể tìm kiếm.

Liên kết skill

https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/liteparse/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/liteparse/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Trích xuất văn bản từ báo cáo tài chính dạng PDF này, giữ nguyên định dạng gốc.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Bạn đưa một tệp (PDF, DOCX, hình ảnh) cho LiteParse. Công cụ đọc nội dung, xác định văn bản và vị trí của nó trên trang, rồi trả về thông tin này dưới dạng văn bản thuần, JSON có tọa độ hoặc Markdown.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

LiteParse — Local Document Parsing

Overview

LiteParse is an open-source document parser (Rust core, Python/Node bindings) for local, layout-aware text extraction. It produces layout text, structured JSON, or heuristic Markdown. Spatial text items may span several words; Python emit_word_boxes=True adds word boxes when needed.

Verified release: Python liteparse 2.15.0 (September 29, 2026); CLI and synthetic local PDF/image fixtures tested on Python 3.13. Node/Rust examples below are source-checked and illustrative. Images convert through bundled Rust libraries, not ImageMagick. No cloud account is needed, but missing Tesseract language data can download from GitHub and an explicitly configured HTTP OCR service receives document images.

For parser selection vs MarkItDown, PDF manipulation libraries, or LlamaParse, see references/choosing_a_parser.md.

When to Use This Skill

Use LiteParse when you need:

  • Fast local parsing of PDFs or converted Office/image files without cloud dependencies
  • Spatial text with bounding boxes for layout-aware RAG, citation grounding, or figure/table region logic
  • OCR on scanned PDFs or images (bundled Tesseract, or a user-run HTTP OCR server)
  • Page screenshots (PNG) for multimodal agents that must see charts, figures, or handwriting
  • Batch ingestion of literature folders, supplementary PDFs, or protocol libraries
  • Page subsets or password-protected PDFs

When Not to Use

Task Use instead
Markdown for LLM ingestion (EPUB, audio, YouTube, HTML) markitdown skill
Merge/split PDFs, forms, watermarks, rotation A PDF manipulation library such as pypdf
Dense tables, handwriting, production cloud pipelines LlamaParse (cloud; sign up separately)

Installation

uv pip install "liteparse==2.15.0"

This installs the Python bindings and the lit CLI. Verify:

lit --help
python -c "import liteparse; print(liteparse.__version__)"

Optional system tool (for Office inputs):

  • LibreOffice — Word, Excel, PowerPoint, OpenDocument, CSV/TSV

PNG, JPEG, TIFF, WebP, SVG and other supported images convert natively.

Install commands are in references/ocr_and_formats.md.

Node.js / TypeScript (optional): npm i @llamaindex/liteparse@2.15.0 — see references/api_reference.md.


Quick Start

Python

from liteparse import LiteParse

parser = LiteParse(quiet=True)
result = parser.parse("paper.pdf")
print(result.text)

for page in result.pages:
    print(f"Page {page.page_num}: {len(page.text_items)} items")

CLI

# Layout-preserved text (default)
lit parse paper.pdf

# Structured JSON with bounding boxes
lit parse paper.pdf --format json -o paper.json

# Heuristic Markdown, including headings, tables and links
lit parse paper.pdf --format markdown -o paper.md

# Disable OCR on text-native PDFs (faster)
lit parse paper.pdf --no-ocr

Core Workflows

1. Parse to layout-preserved text

Best for quick full-document text or feeding chunkers that do not need coordinates.

parser = LiteParse(ocr_enabled=True, quiet=True)
result = parser.parse("document.pdf")
full_text = result.text
lit parse document.pdf -o output.txt

2. Parse to structured JSON (bounding boxes)

Use when building layout-aware RAG, highlighting source regions, or joining text with screenshots.

from liteparse import LiteParse

parser = LiteParse(output_format="json", quiet=True)
result = parser.parse("document.pdf")

# Programmatic access
for page in result.pages:
    for item in page.text_items:
        bbox = (item.x, item.y, item.width, item.height)
        # item.text, item.confidence, item.font_name, item.font_size
lit parse document.pdf --format json -o document.json

JSON field layout: references/output_formats.md.

3. Parse specific pages

parser = LiteParse(target_pages="1-5,10,15-20", quiet=True)
result = parser.parse("long_paper.pdf")
lit parse long_paper.pdf --target-pages "1-5,10"

4. Parse from bytes or stdin

Useful for uploads, S3 downloads, or piping remote PDFs.

with open("document.pdf", "rb") as f:
    result = parser.parse(f.read())
curl -sL https://example.com/report.pdf | lit parse -

5. Page screenshots for multimodal agents

…

Câu hỏi thường gặp

Tôi có cần tài khoản đám mây để dùng không?

Không. LiteParse hoạt động cục bộ trên máy tính của bạn, không cần tài khoản hay gửi dữ liệu lên internet.

Công cụ có làm việc với tài liệu quét không?

Có. Nó có OCR tích hợp để chuyển hình ảnh văn bản (như trong tài liệu quét) thành văn bản bạn có thể sao chép và tìm kiếm.

Tôi có thể trích xuất chỉ một phần của tài liệu không?

Có. Bạn có thể chỉ định các trang muốn xử lý, như “trang 1 đến 5” hoặc “chỉ trang 10”.

Chi tiết

Mô tả gốc của tác giả

Local document and PDF parsing that returns spatial text with bounding boxes. Use for extracting text from PDFs, DOCX, Office files, and images; running OCR on scans; producing layout-preserved JSON for RAG; batch-ingesting folders of papers; or rendering pages to PNG for multimodal agents. Distinguishing capabilities are spatial text boxes, Markdown, page raster output, and local parsing with opt

repo: K-Dense-AI/scientific-agent-skills

Độ phổ biến

Sao GitHub
51k
Vị trí xếp hạng
#3488
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự