add vertex for period/end of sentence, add while loop for multiple lines

note that this now throw std::bad_alloc with -O2, going to figure out why