MCPcopy Create free account
hub / github.com/THUDM/GLM / _is_whitespace

Function _is_whitespace

tasks/seq2seq/dataset.py:236–239  ·  view source on GitHub ↗
(c)

Source from the content-addressed store, hash-verified

234 # Use heuristics to construct the token to char mapping for BertTokenizer
235
236 def _is_whitespace(c):
237 if c == " " or c == "\t" or c == "\r" or c == "\n" or ord(c) == 0x202F:
238 return True
239 return False
240
241 def _normalize(s):
242 # if s in tokenizer.command_token_map:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected