#12: move readWordIndex() to Corpus class
fix #12: recognize end of sentence