MCPcopy Create free account
hub / github.com/917Dhj/DeepPaperNote / appendix_section_title

Function appendix_section_title

scripts/common.py:1835–1850  ·  view source on GitHub ↗
(line: str)

Source from the content-addressed store, hash-verified

1833
1834
1835def appendix_section_title(line: str) -> str:
1836 cleaned = clean_pdf_line(line)
1837 if not cleaned:
1838 return ""
1839 lower = cleaned.lower()
1840 if lower in {"appendix", "appendices", "supplementary material"}:
1841 return ""
1842 if re.match(r"^fig(?:ure)?\.?\s*\d+", cleaned, re.IGNORECASE):
1843 return ""
1844 if re.match(r"^table\.?\s*\d+", cleaned, re.IGNORECASE):
1845 return ""
1846 if len(cleaned) > 120:
1847 return ""
1848 if re.match(r"^(?:appendix\s+)?[A-Z]\.?\s+.{3,}$", cleaned, re.IGNORECASE):
1849 return cleaned
1850 return ""
1851
1852
1853def extract_appendix_index(

Callers 1

extract_appendix_indexFunction · 0.85

Calls 1

clean_pdf_lineFunction · 0.85

Tested by

no test coverage detected