mirror of
https://github.com/Tencent/WeKnora.git
synced 2026-10-15 10:58:21 +08:00
English: Accept .html and .htm knowledge uploads across frontend, Go, and DocReader. Parse static HTML with charset-aware decoding, preserve document structure and local links, and keep scripts/network execution disabled. Add regression coverage for validation, engine registration, encoding, and parser behavior. 中文:打通知识库本地 .html 与 .htm 文件从前端、Go 服务到 DocReader 的完整上传链路。使用可识别字符编码的静态解析,保留文档结构和本地链接,不执行脚本或发起网络请求,并补充文件校验、引擎注册、编码及解析行为的回归测试。
41 lines
1.0 KiB
Python
41 lines
1.0 KiB
Python
"""
|
|
Parser module for WeKnora document processing system.
|
|
|
|
This module provides document parsers for various file formats including:
|
|
- Microsoft Word documents (.doc, .docx)
|
|
- PDF documents
|
|
- Markdown files
|
|
- Plain text files
|
|
- Images with text content
|
|
- Web pages
|
|
|
|
The parsers extract content from documents and can split them into
|
|
meaningful chunks for further processing and indexing.
|
|
"""
|
|
|
|
from .doc_parser import DocParser
|
|
from .docx2_parser import Docx2Parser
|
|
from .excel_parser import ExcelParser
|
|
from .html_parser import HTMLParser
|
|
from .image_parser import ImageParser
|
|
from .markdown_parser import MarkdownParser
|
|
from .parser import Parser
|
|
from .pdf_parser import PDFParser
|
|
from .registry import ParserEngineRegistry, registry
|
|
from .web_parser import WebParser
|
|
|
|
# Export public classes and modules
|
|
__all__ = [
|
|
"Docx2Parser",
|
|
"DocParser",
|
|
"PDFParser",
|
|
"MarkdownParser",
|
|
"ImageParser",
|
|
"WebParser",
|
|
"Parser",
|
|
"ExcelParser",
|
|
"HTMLParser",
|
|
"ParserEngineRegistry",
|
|
"registry",
|
|
]
|