flatten the text function & add a second tokenizer form with an original word index.