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

Function resolve_semantic_topic_family

agents/master-coordinator/main.py:468–478  ·  view source on GitHub ↗

Resolve broad user-facing topic names to a stable semantic family.

(topic_text: str)

Source from the content-addressed store, hash-verified

466
467
468def resolve_semantic_topic_family(topic_text: str) -> Optional[str]:
469 """Resolve broad user-facing topic names to a stable semantic family."""
470 target = normalize_topic_token(topic_text)
471 if not target:
472 return None
473
474 for family_name, family in SEMANTIC_TOPIC_FAMILIES.items():
475 alias_tokens = {normalize_topic_token(alias) for alias in family.get("aliases", set())}
476 if target in alias_tokens:
477 return family_name
478 return None
479
480
481def derive_topic_key(topic: str) -> str:

Callers 1

Calls 2

normalize_topic_tokenFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected