Tokenizing the text into word indices