MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _normalize_heading_line

Function _normalize_heading_line

skills/pdf-parser/scripts/parse_pdf.py:170–176  ·  view source on GitHub ↗
(line: str)

Source from the content-addressed store, hash-verified

168
169
170def _normalize_heading_line(line: str) -> str:
171 normalized = re.sub(
172 r"^\s*(?:(?:\d+(?:\.\d+)*[.)]?)|(?:[IVXivx]+[.)]?)|(?:[一二三四五六七八九十]+[、.)]?))?\s*",
173 "",
174 (line or "").strip(),
175 )
176 return normalized.strip().lower().rstrip("::")
177
178
179def _get_rapidocr_engine():

Callers 2

is_section_headingFunction · 0.85
extract_abstractFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected