feat: add hwp/hwpx support and fixtures for testing#2230
Open
kimtth wants to merge 1 commit into
Open
Conversation
Author
|
@chienyuanchang |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why MarkItDown Should Support HWP and HWPX
What Are HWP and HWPX?
Hangul is a Korean word processor made by Hancom, first released in 1988. Its position in South Korea, particularly in government and education, reflects its early Korean-language support when foreign alternatives were more limited.
The estimate is necessarily speculative:
Hangul has two document formats:
.hwp.hwpxHWP has been the standard for decades. HWPX was introduced with Hangul 2010 as the modernization path:
Interesting Facts
Microsoft tried to acquire Hancom. In the late 1990s, Microsoft reportedly attempted to buy Hancom, the company behind Hangul. The deal did not go through, leaving Hancom independent and illustrating Hangul's strategic importance in the Korean market.
Hangul benefited from Korean text input. Korean characters are composed from phonetic components (jamo). Software historically used two approaches:
When Hangul rose to dominance:
This gave Hangul an important technical advantage before Microsoft Word caught up.
Why Both Formats Still Coexist
South Korea is actively migrating from HWP to HWPX, but the transition is gradual. A Korean document-ingestion pipeline will encounter both:
Supporting only one format misses a large portion of real-world Korean documents.
Why MarkItDown Supports Both
MarkItDown extracts structured text for LLM and search pipelines. Korean primary-source documents often arrive as HWP or HWPX attachments, including:
The Korean government's AI strategy makes this more urgent:
Why
rhwp-pythonIs the BackendDiscussion #1667 demonstrates the need for HWP-to-Markdown conversion in Korean government, legal, and academic workflows. Its Docpler-based plugin is a useful HWP-only option, but MarkItDown uses
rhwp-python(rhwp-python>=0.8.1) because it is a better fit for built-in support:hwpextra and registered as a built-in converter, rather than requiring a separate plugin to be discovered and enabled.rhwpandrhwp-pythonuse MIT licenses; the Docpler plugin uses Elastic License 2.0, which restricts hosted or managed-service use.rhwp-pythonis an independent community binding for the Rust-basedrhwpproject. It is not affiliated with Hancom; report parser-core defects to the upstream project.Interoperability Context
HWP interoperability has existed for years:
Public footprint signals, observed on 2026-07-22:
These are snapshots, not a document-volume claim. The project does not publish opened or converted totals because its browser extension avoids analytics and tracking.
Reference Fixtures
These reference fixtures show the support decision against real Korean-government documents:
test_hwp.hwp— English translation of the standard residential lease agreement.test_hwpx.hwpx— Ministry of Justice press release announcing translated standard residential-lease agreements.Fixture provenance:
test_hwpx.hwpxexpected_outputs/test_hwpx.mdtest_hwpx.pdftest_hwp.hwpexpected_outputs/test_hwp.mdtest_hwp.pdfThese are content-bearing public documents, not synthetic samples. They cover common Korean administrative features:
Scope
rhwp-python, its bundled rhwp core, or converter behavior changes.References