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

Function normalize_label

scripts/plan_figure_table_decisions.py:39–44  ·  view source on GitHub ↗
(label: str)

Source from the content-addressed store, hash-verified

37
38
39def normalize_label(label: str) -> str:
40 text = normalize_whitespace(label).lower()
41 text = text.replace("figure", "fig")
42 text = re.sub(r"\bfig\.\s*", "fig ", text)
43 text = re.sub(r"\btable\.\s*", "table ", text)
44 return normalize_whitespace(text)
45
46
47def caption_items(source_manifest: dict[str, Any]) -> list[dict[str, Any]]:

Callers 2

planned_itemsFunction · 0.85
build_decisionsFunction · 0.85

Calls 1

normalize_whitespaceFunction · 0.90

Tested by

no test coverage detected