MCPcopy Create free account
hub / github.com/InternScience/SciReason / remove_boxed

Function remove_boxed

opencompass/datasets/math_intern.py:41–48  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

39
40
41def remove_boxed(s):
42 left = '\\boxed{'
43 try:
44 assert s[:len(left)] == left
45 assert s[-1] == '}'
46 return s[len(left):-1]
47 except Exception:
48 return None
49
50
51def extract_boxed_answer(pred_str, strip_double_curly_brace=False):

Callers 1

extract_boxed_answerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected