MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / normalize_id

Function normalize_id

experiments/baselines/citation_enhanced/runner.py:144–151  ·  view source on GitHub ↗
(value: Any)

Source from the content-addressed store, hash-verified

142
143
144def normalize_id(value: Any) -> str:
145 value_text = str(value or "").strip().casefold()
146 if not value_text:
147 return ""
148 value_text = re.sub(r"^https?://doi\.org/", "doi:", value_text)
149 value_text = re.sub(r"^doi:\s*", "doi:", value_text)
150 value_text = re.sub(r"^arxiv:\s*", "arxiv:", value_text)
151 return re.sub(r"\s+", "", value_text)
152
153
154def tokenize(text: Any) -> List[str]:

Callers 2

identity_aliasesFunction · 0.85
extract_id_setFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected