added word segmentation support