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

Function _normalize_person_name

agents/coldstart-agent/main.py:667–671  ·  view source on GitHub ↗
(value: str)

Source from the content-addressed store, hash-verified

665 splitter = re.sub(r"\s+(?:and|&)\s+", ",", normalized_line, flags=re.IGNORECASE)
666 candidates = [segment.strip() for segment in re.split(r"[;,]", splitter) if segment.strip()]
667 def _normalize_person_name(value: str) -> str:
668 cleaned = _collapse_whitespace(value)
669 cleaned = re.sub(r"^(?:dr|prof|professor)\.?\s+", "", cleaned, flags=re.IGNORECASE)
670 cleaned = re.sub(r"[^\w\u4e00-\u9fff]+", " ", cleaned, flags=re.UNICODE)
671 return _collapse_whitespace(cleaned).casefold()
672
673 normalized_scholar_name = _normalize_person_name(scholar_name)
674

Callers 1

_parse_author_namesFunction · 0.85

Calls 1

_collapse_whitespaceFunction · 0.85

Tested by

no test coverage detected