Segmenting plain text