bag-of-words tokenizer