one move: define the contract
Make raw text batchable by defining a deterministic lowercase whitespace tokenizer before adding a learned vocabulary. In the Lexical Search system, implement this level as a deterministic contract before composing it with the next service.
def tokenize(text):
return token_list