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

Function split_strings

data_utils/lazy_loader.py:97–101  ·  view source on GitHub ↗

Split strings based on string lengths and given start.

(strings, start, chr_lens)

Source from the content-addressed store, hash-verified

95
96
97def split_strings(strings, start, chr_lens):
98 """
99 Split strings based on string lengths and given start.
100 """
101 return [strings[i - start:j - start] for i, j in zip([start] + chr_lens[:-1], chr_lens)]
102
103
104class ProcessorTokenizer:

Callers 1

__getitem__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected