사용 가이드
HWP Parser의 다양한 기능을 활용하는 방법을 안내합니다.
어떤 가이드를 찾고 계신가요?
빠른 비교
| 기능 |
Core |
LlamaIndex |
REST API |
| Python 코드에서 직접 호출 |
✅ |
✅ |
❌ |
| HTTP 요청으로 호출 |
❌ |
❌ |
✅ |
| RAG 파이프라인 통합 |
❌ |
✅ |
❌ |
| 추가 설치 필요 |
❌ |
[llama-index] |
[bentoml] |
주요 클래스
| 클래스 |
모듈 |
용도 |
HWPConverter |
hwp_parser.core |
HWP → 텍스트/HTML/Markdown/ODT 변환 |
ConversionResult |
hwp_parser.core |
변환 결과 데이터 |
HWPReader |
hwp_parser.adapters.llama_index |
LlamaIndex Document 로더 |
HWPService |
hwp_parser.adapters.api |
BentoML REST API 서비스 |
코드 한 줄 요약
Core - 파일 변환
from hwp_parser.core import HWPConverter
result = HWPConverter().to_markdown("document.hwp")
LlamaIndex - RAG 파이프라인
from hwp_parser.adapters.llama_index import HWPReader
docs = HWPReader().load_data("document.hwp")
REST API - HTTP 서비스
bentoml serve hwp_parser.adapters.api:HWPService
# curl -F "file=@document.hwp" localhost:3000/convert/markdown