MCPcopy Create free account
hub / github.com/FSoft-AI4Code/HyperAgent / name_matcher

Function name_matcher

src/hyperagent/tasks/utils/bl/name_utils.py:72–77  ·  view source on GitHub ↗
(short_name, full_name)

Source from the content-addressed store, hash-verified

70 return ".".join(method_name_lst)
71
72def name_matcher(short_name, full_name): # modified
73 # ex) `java.lang.Object` matches with `java.lang.Object`, `lang.Object`, `Object`,
74 # not with `bject` or `ang.Object`
75 type_depth = len(short_name) - 1
76 truncated_full_name = full_name[-type_depth-1:]
77 return short_name == truncated_full_name
78
79def lenient_matcher(pred_expr, gt_answer):
80 if pred_expr == gt_answer: # Exact Matching

Callers 1

lenient_matcherFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected