(line: str)
| 168 | |
| 169 | |
| 170 | def _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 | |
| 179 | def _get_rapidocr_engine(): |
no outgoing calls
no test coverage detected