MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / _score_keywords

Function _score_keywords

bench/clawrouter_v2_compat.py:129–135  ·  view source on GitHub ↗
(text: str, keywords: list[str], low_thresh: int, high_thresh: int, low_score: float, high_score: float)

Source from the content-addressed store, hash-verified

127
128
129def _score_keywords(text: str, keywords: list[str], low_thresh: int, high_thresh: int, low_score: float, high_score: float) -> float:
130 matches = sum(1 for kw in keywords if kw.lower() in text)
131 if matches >= high_thresh:
132 return high_score
133 if matches >= low_thresh:
134 return low_score
135 return 0.0
136
137
138def _score_multi_step(text: str) -> float:

Callers 1

classify_clawrouter_v2Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected