MCPcopy Create free account
hub / github.com/THUDM/AgentTuning / clean_text

Function clean_text

AgentBench.old/src/tasks/mind2web/data_utils/dom_utils.py:25–29  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

23
24
25def clean_text(text):
26 if text is None:
27 return ""
28 text = re.sub(r"\s+", " ", text)
29 return text.strip()
30
31
32def get_descendants(node, max_depth, current_depth=0):

Callers 1

clean_treeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected