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

Function extract_doi

scripts/common.py:325–331  ·  view source on GitHub ↗
(text: str)

Source from the content-addressed store, hash-verified

323
324
325def extract_doi(text: str) -> str | None:
326 if not text:
327 return None
328 match = re.search(r"(10\.\d{4,9}/[-._;()/:A-Z0-9]+)", text, flags=re.IGNORECASE)
329 if not match:
330 return None
331 return match.group(1).rstrip(").,;]")
332
333
334def is_probable_url(text: str) -> bool:

Callers 9

_empty_candidateFunction · 0.90
_normalize_doiFunction · 0.90
pdf_source_candidatesFunction · 0.90
infer_source_typeFunction · 0.85
normalize_openalex_workFunction · 0.85
resolve_referenceFunction · 0.85
extract_local_pdf_hintsFunction · 0.85

Calls

no outgoing calls

Tested by 1