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

Function stop_section_reason

scripts/common.py:1742–1755  ·  view source on GitHub ↗
(line: str, *, allow_prefix: bool = False)

Source from the content-addressed store, hash-verified

1740
1741
1742def stop_section_reason(line: str, *, allow_prefix: bool = False) -> str:
1743 normalized = normalize_heading(line)
1744 if not normalized:
1745 return ""
1746 reason = STOP_SECTION_REASONS.get(normalized, "")
1747 if reason or not allow_prefix:
1748 return reason
1749 if normalized.startswith(("references ", "bibliography ")):
1750 return "references"
1751 if normalized.startswith(("appendix ", "appendices ", "supplementary material ")):
1752 return "appendix"
1753 if normalized.startswith(("acknowledgments ", "acknowledgements ")):
1754 return "acknowledgments"
1755 return ""
1756
1757
1758def pdf_coverage_summary(pdf_path: Path, max_pages: int | None = None) -> dict[str, Any]:

Callers 2

extract_raw_sectionsFunction · 0.90
pdf_coverage_summaryFunction · 0.85

Calls 1

normalize_headingFunction · 0.85

Tested by

no test coverage detected