Preparation of text data