MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / tokenize

Function tokenize

21-async/mojifinder/charindex.py:43–46  ·  view source on GitHub ↗

return iterator of uppercased words

(text: str)

Source from the content-addressed store, hash-verified

41
42
43def tokenize(text: str) -> Iterator[str]:
44 """return iterator of uppercased words"""
45 for word in text.upper().replace('-', ' ').split():
46 yield word
47
48
49class InvertedIndex:

Callers 2

__init__Method · 0.70
searchMethod · 0.70

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected