MCPcopy Create free account
hub / github.com/Unakar/Logic-RL / preprocess

Function preprocess

examples/data_preprocess/hellaswag.py:27–33  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

25
26
27def preprocess(text):
28 text = text.strip()
29 # NOTE: Brackets are artifacts of the WikiHow dataset portion of HellaSwag.
30 text = text.replace(" [title]", ". ")
31 text = re.sub("\\[.*?\\]", "", text)
32 text = text.replace(" ", " ")
33 return text
34
35
36if __name__ == '__main__':

Callers 1

process_fnFunction · 0.85

Calls 1

subMethod · 0.80

Tested by

no test coverage detected