MCPcopy Create free account
hub / github.com/Depth2World/VLADBench / extract_options

Function extract_options

evaluate_utils.py:67–79  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

65 return cleaned_string
66
67def extract_options(text):
68
69 pattern = re.compile(r"\[([^\]]+)\]")
70 matches = pattern.findall(text)
71
72 if matches:
73 option_string = matches[-1]
74 if "'" not in option_string:
75 option_list = option_string.split(", ")
76 else:
77 option_list = [item.strip().strip("'") for item in option_string.split("', '")]
78 return option_list
79 return []
80
81
82def compare_and_count(array_a, array_b):

Callers 4

Geneal_criterion_QAFunction · 0.85
Grounding_criterion_QAFunction · 0.85
RoadChange_criterion_QAFunction · 0.85
Judge_criterion_QAFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected