MCPcopy Create free account
hub / github.com/RASAAS/docmcp-knowledge / _normalize_title

Function _normalize_title

scripts/fetch_nmpa_fulltext.py:527–532  ·  view source on GitHub ↗

Normalize a Chinese title for comparison (remove spaces, punct variants).

(title: str)

Source from the content-addressed store, hash-verified

525
526
527def _normalize_title(title: str) -> str:
528 """Normalize a Chinese title for comparison (remove spaces, punct variants)."""
529 t = re.sub(r'\s+', '', title)
530 t = t.replace('/', '').replace('(', '(').replace(')', ')')
531 t = re.sub(r'\(\d{4}年.*?\)', '', t)
532 return t
533
534
535def _extract_core_subject(title: str) -> str:

Callers 1

content_matches_titleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected