Documents
Home>Documents>AI>Agent>Contextifier

Contextifier: Converting Documents into AI-Ready Text Chunks

5 min readJan 15, 2026Feb 22, 2026

What is Contextifier?

Contextifier is a Python library that converts documents in various formats (HWP, HWPX, DOCX, PDF, PPT, Excel, etc.) into text chunks that AI can understand. It's published on PyPI and plays a central role in the preprocessing stage of RAG pipelines.

Why We Built It

The most painful part of building a RAG system is document preprocessing. In Korean enterprise environments in particular, Hangul document formats like HWP and HWPX are unavoidable, and existing libraries simply didn't support them properly.

Supported File Formats

FormatTextTablesImagesCharts
PDF-
DOCX-
HWP
HWPX
PPT/PPTX
Excel-
RTF---

Architecture Overview

graph TD
    A[입력 문서] --> B{DocumentProcessor}
    B --> C[PDF Handler]
    B --> D[HWP Handler]
    B --> E[HWPX Handler]
    B --> F[DOCX Handler]
    B --> G[PPT Handler]
    B --> H[Excel Handler]
    B --> I[RTF Handler]

    C --> J[텍스트 추출]
    C --> K[테이블 추출]
    C --> L[이미지 추출]

    J --> M[ChunkResult]
    K --> M
    L --> N[OCR Engine]
    N --> M

    M --> O[최종 텍스트 청크]

Core Usage

from contextifier import DocumentProcessor

processor = DocumentProcessor()
result = processor.process("계약서.hwp")

for chunk in result.chunks:
    print(chunk.text)
    print(chunk.metadata)

Commit History Analysis

The library was completed in about three weeks (2026-01-15 to 2026-02-02) across 66 commits total. It started out named Contextify, then was renamed to Contextifier in version 0.1.1.

Development Timeline

  • v0.1.0: Initial release with PDF/HWP/HWPX/DOCX/PPT/Excel support
  • v0.1.5: Added OCR engine module; updated image hash length to 32 characters
  • v0.2.0: Refactored table/chart processing interface
  • v0.2.2: Improved table splitting logic using the force_chunking flag

66 commits in two weeks — roughly 5 commits per day, sustained throughout.

Tags
Contextifierdocument processingRAGNLPPythonPyPI