simple tokenizer with HMM