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

Function classify_standard

scripts/fetch_eu_mdr_standards.py:248–254  ·  view source on GitHub ↗

Classify a standard into a category based on number and title.

(entry: dict)

Source from the content-addressed store, hash-verified

246
247
248def classify_standard(entry: dict) -> str:
249 """Classify a standard into a category based on number and title."""
250 search_text = f"{entry['number']} {entry.get('title', '')}"
251 for pattern, category in CATEGORY_RULES:
252 if re.search(pattern, search_text, re.IGNORECASE):
253 return category
254 return "other"
255
256
257def fetch_and_parse(args) -> list[dict]:

Callers 3

fetch_and_parseFunction · 0.85
generate_jsonFunction · 0.85
show_diffFunction · 0.85

Calls 2

getMethod · 0.80
searchMethod · 0.45

Tested by

no test coverage detected