Helper class TextUtils for word segmentation