Made tokenizer as a function for named entity