(text: str, keywords: list[str], low_thresh: int, high_thresh: int, low_score: float, high_score: float)
| 127 | |
| 128 | |
| 129 | def _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 | |
| 138 | def _score_multi_step(text: str) -> float: |
no outgoing calls
no test coverage detected