MCPcopy Create free account
hub / github.com/SooLab/CGFormer / whitespace_clean

Function whitespace_clean

utils/simple_tokenizer.py:56–59  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

54
55
56def whitespace_clean(text):
57 text = re.sub(r'\s+', ' ', text)
58 text = text.strip()
59 return text
60
61
62class SimpleTokenizer(object):

Callers 1

encodeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected