MCPcopy
hub / github.com/BytedTsinghua-SIA/DAPO / remove_boxed

Function remove_boxed

eval/math_dapo.py:51–63  ·  view source on GitHub ↗

Remove the LaTeX boxed command from a string. Args: s: String with format "\\boxed{content}" Returns: The content inside the boxed command

(s: str)

Source from the content-addressed store, hash-verified

49
50
51def remove_boxed(s: str) -> str:
52 """Remove the LaTeX boxed command from a string.
53
54 Args:
55 s: String with format "\\boxed{content}"
56
57 Returns:
58 The content inside the boxed command
59 """
60 left = "\\boxed{"
61 assert s[:len(left)] == left, f"box error: {s}"
62 assert s[-1] == "}", f"box error: {s}"
63 return s[len(left):-1]
64
65
66class timeout:

Callers 2

is_correct_minervaFunction · 0.85
is_correct_strict_boxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected