main algorithm

A little bit creaky. Can't handle pairs ', ' '; ' and etc. but works fine with spaces and single punctuation marks.
Algorithm is simple: all new words are placed in vector, then compared with next one.