add some statistical tools for text segmentation