mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 00:50:36 +08:00
Deterministic, zero-LLM chapter tree extraction from MinerU layout.json: column blacklist -> chapter regex -> page-top position band -> adjacent merge, plus a header/footer path that reads the running chapter title and the printed page number from discarded page furniture. Nothing in this package imports deeptutor.
42 lines
1.1 KiB
Python
42 lines
1.1 KiB
Python
"""Closed vocabulary of textbook feature-column names (layer 0).
|
|
|
|
These are recurring textbook activity/column names — MinerU often classifies
|
|
them as ``title`` blocks, but they are never chapter headings. The list is
|
|
closed on purpose: no fuzzy matching, to avoid swallowing real titles.
|
|
Append new names as new textbook editions introduce new column types.
|
|
"""
|
|
|
|
COLUMN_BLACKLIST: frozenset[str] = frozenset(
|
|
{
|
|
# civics / politics
|
|
"探究与分享",
|
|
"相关链接",
|
|
"专家点评",
|
|
"名词点击",
|
|
"观点一",
|
|
"观点二",
|
|
"观点三",
|
|
# Chinese / English
|
|
"学习提示",
|
|
"单元导语",
|
|
"思考与探究",
|
|
# math / physics / chemistry / biology
|
|
"思考",
|
|
"探究",
|
|
"实验",
|
|
"练习",
|
|
"习题",
|
|
"复习与巩固",
|
|
"本章小结",
|
|
"信息技术应用",
|
|
"阅读与思考",
|
|
"观察与思考",
|
|
# geography / history
|
|
"问题研究",
|
|
"自学窗",
|
|
"活动",
|
|
"案例",
|
|
"知识窗",
|
|
}
|
|
)
|