Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
56
def
whitespace_clean(text):
57
text = re.sub(r
'\s+'
,
' '
, text)
58
text = text.strip()
59
return
text
60
61
62
class
SimpleTokenizer(object):
Callers
1
encode
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected