preprocess of topics and subtopic strings