Added a tokenizer util function.