Rewrote regex parser, added end-of-sentence recognition.
The parser now distinguishes between normal words and 'start-of-sentence' words.