reads in corpus and converts to numbers