韩文办公文档智能解析
简介
读取并提取韩国HWP/HWPX文档内容的专用工具,支持政府表格、申请文件等韩文办公文档的文本解析,适合处理韩国官方文书场景。
原始描述
Extract and analyze text, tables, images, and metadata from Korean HWP and HWPX documents, supporting both legacy and modern formats.
通过你的 Agent 添加
安装目录:hwp-reader/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
🐧 HWP Reader — Read & Analyze Korean HWP/HWPX Documents
Author: 무펭이 🐧 | v1.0.0
Description
Author: 무펭이 🐧 | v1.0.0
Read and extract text content from Korean HWP (한글) and HWPX files. Supports both legacy HWP format (via pyhwp) and modern HWPX format (ZIP-based XML).
When to Use
- User asks to read/analyze a .hwp or .hwpx file
- Government support application forms (정부지원사업 신청서)
- Any Korean document in Hangul Word Processor format
How It Works
HWP Files (Legacy Format)
python3 -c "
from hwp5.hwp5txt import main
import sys
sys.argv = ['hwp5txt', 'FILE_PATH']
main()
"
HWPX Files (Modern XML Format)
HWP Files (Legacy Format)
python3 -c "
from hwp5.hwp5txt import main
import sys
sys.argv = ['hwp5txt', 'FILE_PATH']
main()
"
python3 -c "
import zipfile
z = zipfile.ZipFile('FILE_PATH')
# Quick preview text
if 'Preview/PrvText.txt' in z.namelist():
print(z.read('Preview/PrvText.txt').decode('utf-8'))
# Full content from section XMLs
import xml.etree.ElementTree as ET
for name in sorted(z.namelist()):
if name.startswith('Contents/section') and name.endswith('.xml'):
root = ET.fromstring(z.read(name))
for elem in root.iter():
if elem.text and elem.text.strip():
print(elem.text.strip())
"
Capabilities
Feature
HWP
HWPX
Text extraction
✅ pyhwp
✅ ZIP+XML
Table detection
⚠️ <표> markers
✅ XML tags
Image extraction
❌
✅ from BinData/
Metadata
✅ via hwp5
✅ from version.xml
Dependencies
- pyhwp (
pip install pyhwp) — installed at /Users/mupeng/Library/Python/3.9/lib/python/site-packages/hwp5/
- Python 3.9+ — standard library
zipfile, xml.etree.ElementTree
Limitations
- HWP text extraction loses table structure (shows
<표> placeholder)
- HWPX Preview/PrvText.txt is truncated to ~1KB; use section XMLs for full content
- Complex formatting (colors, fonts, page layout) not preserved in text mode
- Encrypted/password-protected HWP files not supported
Usage Examples
Read a government application form
"이 HWP 파일 읽어줘: /path/to/신청서.hwp"
→ Extract text → Analyze structure → Summarize sections
Compare two versions
"v1.hwp와 v2.hwp 차이점 분석해줘"
→ Extract both → Diff content → Report changes
Fill in a template
"이 양식에 우리 사업 내용 채워줘"
→ Read template → Identify blanks → Generate content suggestions
| Feature | HWP | HWPX |
|---|---|---|
| Text extraction | ✅ pyhwp | ✅ ZIP+XML |
| Table detection | ⚠️ <표> markers |
✅ XML tags |
| Image extraction | ❌ | ✅ from BinData/ |
| Metadata | ✅ via hwp5 | ✅ from version.xml |
- pyhwp (
pip install pyhwp) — installed at/Users/mupeng/Library/Python/3.9/lib/python/site-packages/hwp5/ - Python 3.9+ — standard library
zipfile,xml.etree.ElementTree
Limitations
- HWP text extraction loses table structure (shows
<표> placeholder)
- HWPX Preview/PrvText.txt is truncated to ~1KB; use section XMLs for full content
- Complex formatting (colors, fonts, page layout) not preserved in text mode
- Encrypted/password-protected HWP files not supported
Usage Examples
Read a government application form
"이 HWP 파일 읽어줘: /path/to/신청서.hwp"
→ Extract text → Analyze structure → Summarize sections
Compare two versions
<표> placeholder)Read a government application form
"이 HWP 파일 읽어줘: /path/to/신청서.hwp"
→ Extract text → Analyze structure → Summarize sections
"v1.hwp와 v2.hwp 차이점 분석해줘"
→ Extract both → Diff content → Report changes
Fill in a template
"이 양식에 우리 사업 내용 채워줘"
→ Read template → Identify blanks → Generate content suggestions
🐧 무펭이 — Making Korean documents accessible to AI agents
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。