{'fraction_non_alphanumeric': 0.016652059596844872, 'fraction_numerical': 0.0, 'mean_word_length': 5.344444444444444, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
CTG:A Controllable Text Generation Method based on the Joint Work of Language Model and Text Classifier

Text generation is an important research field in natural language processing. Today pre-trained models can generate text with high readability and fluency. However, the generated text content is usually not restricted, and the generated content cannot be controlled. Therefore, there is an urgent need for a controllable text generation method. Traditional controllable text generation methods usually have the disadvantages of high training cost and difficulty in adjustment. We propose a lightweight and easy-to-adjust method to update the language model through the discrimination results of the text classification model on the language model, thereby completing controllable text generation. And we have solved the problem of imbalance and quality degradation in text generation. Experiments show that the quality of the text generated by this method can also reach a higher level with strong subjectivity, can achieves the purpose of controlling text generation. And this method is easy to adjust, suitable for various scenarios.