Added a convenience function to Tokenizer