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

Function is_plausible_pdf_title_line

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

Source from the content-addressed store, hash-verified

1950
1951
1952def is_plausible_pdf_title_line(line: str) -> bool:
1953 normalized = clean_pdf_line(line)
1954 lower = normalized.lower()
1955 if len(normalized) < 20 or len(normalized.split()) < 4:
1956 return False
1957 if normalized.count(",") >= 3:
1958 return False
1959 if any(token in lower for token in ["doi.org/", "http://", "https://", "www.", "check for updates"]):
1960 return False
1961 if lower in {"abstract", "article", "preprint"}:
1962 return False
1963 if lower.startswith("npj |") or lower.startswith("arxiv:") or lower.startswith("submitted to"):
1964 return False
1965 if " doi:" in lower or lower.startswith("doi:"):
1966 return False
1967 return True
1968
1969
1970def first_page_title_candidate(first_page_text: str) -> str:

Callers 1

Calls 1

clean_pdf_lineFunction · 0.85

Tested by

no test coverage detected