MCPcopy Create free account
hub / github.com/Notgnoshi/generative / tokenize

Method tokenize

generative/lsystem/interpreter.py:47–51  ·  view source on GitHub ↗

Tokenize the given input using the configured commandset.

(self, commands: io.TextIOWrapper)

Source from the content-addressed store, hash-verified

45 self.stack = []
46
47 def tokenize(self, commands: io.TextIOWrapper) -> Tokens:
48 """Tokenize the given input using the configured commandset."""
49 if self.commandset == "default":
50 return self._tokenize_default(commands)
51 raise ValueError(f"tokenize not supported (yet) for '{self.commandset}'")
52
53 @staticmethod
54 def _tokenize_default(commands: io.TextIOWrapper) -> Tokens:

Callers 12

mainFunction · 0.95
test_forwardMethod · 0.80
test_forward_no_drawMethod · 0.80
test_yawMethod · 0.80
test_draw_no_drawMethod · 0.80
test_pitchMethod · 0.80
test_rollMethod · 0.80
test_flipMethod · 0.80
test_stackMethod · 0.80

Calls 1

_tokenize_defaultMethod · 0.95

Tested by 11

test_forwardMethod · 0.64
test_forward_no_drawMethod · 0.64
test_yawMethod · 0.64
test_draw_no_drawMethod · 0.64
test_pitchMethod · 0.64
test_rollMethod · 0.64
test_flipMethod · 0.64
test_stackMethod · 0.64