add some functions for text preprocess