(label: str)
| 828 | |
| 829 | |
| 830 | def _recommendation_score(label: str) -> int: |
| 831 | normalized = _clean_text(label) |
| 832 | mapping = { |
| 833 | "强烈推荐": 5, |
| 834 | "推荐阅读": 4, |
| 835 | "值得快速浏览": 3, |
| 836 | "按需阅读": 2, |
| 837 | } |
| 838 | return mapping.get(normalized, 3) |
| 839 | |
| 840 | |
| 841 | def _recommendation_display_label(label: str, response_language: str = "zh") -> str: |
no test coverage detected