Update code regarding thai segmentation