Segmenting individual characters or words