(text)
| 302 | |
| 303 | |
| 304 | def extract_number(text): |
| 305 | pattern = re.compile( |
| 306 | r'(?:<NUMBER>\s*|\\boxed\{)\s*(-?\d*\.?\d+)\s*(?:</NUMBER>|\})') |
| 307 | matches = pattern.findall(text) |
| 308 | return [float(match) for match in matches] |
| 309 | |
| 310 | |
| 311 | @ICL_EVALUATORS.register_module() |