(label: str)
| 2104 | |
| 2105 | |
| 2106 | def caption_label_key(label: str) -> str: |
| 2107 | normalized = normalize_caption_label(label).lower() |
| 2108 | normalized = re.sub(r"\bfigure\b", "fig", normalized) |
| 2109 | normalized = re.sub(r"\bfig\.\s*", "fig ", normalized) |
| 2110 | normalized = re.sub(r"\btable\.\s*", "table ", normalized) |
| 2111 | return normalize_whitespace(normalized) |
| 2112 | |
| 2113 | |
| 2114 | def caption_preference_score(label: str, caption: str) -> int: |
no test coverage detected