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

Function remove_boxed

opencompass/datasets/math.py:44–51  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

42
43
44def remove_boxed(s):
45 left = '\\boxed{'
46 try:
47 assert s[:len(left)] == left
48 assert s[-1] == '}'
49 return s[len(left):-1]
50 except Exception:
51 return None
52
53
54def 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