MCPcopy Create free account
hub / github.com/BIT-DataLab/LakeBench / preprocessString

Function preprocessString

union/TUS/generalFunctions.py:43–47  ·  view source on GitHub ↗
(string)

Source from the content-addressed store, hash-verified

41#removes punctuations and whitespaces from string. The same preprocessing
42#is done in yago label file
43def preprocessString(string):
44 string = re.sub(r'[^\w]', ' ', string)
45 string = string.replace("nbsp",'')
46 string =" ".join(string.split())
47 return (string)
48
49#removes punctuations and whitespaces from list items
50def preprocessListValues(valueList):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected