Abstract
Language teachers spend a lot of time developing good examples for language learners. For this reason, we define a new task for language learning, lexical complexity controlled sentence generation, which requires precise control over the lexical complexity in the keywords to examples generation and better fluency and semantic consistency. The challenge of this task is to generate fluent sentences only using words of given complexity levels. We propose a simple but effective approach for this task based on complexity embedding while controlling sentence length and syntactic complexity at the decoding stage. Compared with potential solutions, our approach fuses the representations of the word complexity levels into the model to get better control of lexical complexity. And we demonstrate the feasibility of the approach for both training models from scratch and fine-tuning the pre-trained models. To facilitate the research, we develop two datasets in English and Chinese respectively, on which extensive experiments are conducted. Experimental results show that our approach provides more precise control over lexical complexity, as well as better fluency and diversity.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Al-Jarf, R.: Efl studentsā difficulties with lexical and syntactic features of news headlines and news stories. Technium Soc. Sci. J. 17, 524 (2021)
Alonzo, O., Seita, M., Glasser, A., Huenerfauth, M.: Automatic text simplification tools for deaf and hard of hearing adults: benefits of lexical simplification and providing users with autonomy. In: Proceedings of the 2020 CHI Conference on Human Factors in Computing Systems, pp. 1ā13 (2020)
Amer, M.A.B.: Lexical density and readability of secondary stage English textbooks in Jordan. Int. J. Manage. Modern Educ. 2(2), 11ā20 (2021)
Brown, T., et al.: Language models are few-shot learners. Adv. Neural. Inf. Process. Syst. 33, 1877ā1901 (2020)
Caro, K., Mendinueta, N.R.: Lexis, lexical competence and lexical knowledge: a review. J. Lang. Teach. Res. 8(2) (2017)
Chakraborty, S., Nayeem, M.T., Ahmad, W.U.: Simple or complex? Learning to predict readability of bengali texts. In: Proceedings of the AAAI Conference on Artificial Intelligence. vol. 35, pp. 12621ā12629 (2021)
Chen, H., Yi, X., Sun, M., Li, W., Yang, C., Guo, Z.: Sentiment-controllable Chinese poetry generation. In: IJCAI, pp. 4925ā4931 (2019)
Dathathri, S., et al.: Plug and play language models: A simple approach to controlled text generation. arXiv preprint arXiv:1912.02164 (2019)
Doddington, G.: Automatic evaluation of machine translation quality using n-gram co-occurrence statistics. In: Proceedings of the Second International Conference on Human Language Technology Research, pp. 138ā145 (2002)
Fan, Z., et al.: An enhanced knowledge injection model for commonsense generation. arXiv preprint arXiv:2012.00366 (2020)
Gao, T., Fisch, A., Chen, D.: Making pre-trained language models better few-shot learners. arXiv preprint arXiv:2012.15723 (2020)
He, X.: Parallel refinements for lexically constrained text generation with bart. arXiv preprint arXiv:2109.12487 (2021)
He, X., Li, V.O.: Show me how to revise: Improving lexically constrained sentence generation with xlnet. In: Proceedings of the AAAI Conference on Artificial Intelligence. vol. 35, pp. 12989ā12997 (2021)
Hu, J.E., et al.: Improved lexically constrained decoding for translation and monolingual rewriting. In: Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pp. 839ā850 (2019)
Hu, Z., Yang, Z., Liang, X., Salakhutdinov, R., Xing, E.P.: Toward controlled generation of text. In: International Conference on Machine Learning, pp. 1587ā1596. PMLR (2017)
Imamura, K., Sumita, E.: Ensemble and reranking: using multiple models in the nict-2 neural machine translation system at wat2017. In: Proceedings of the 4th Workshop on Asian Translation (WAT2017), pp. 127ā134 (2017)
Khalifa, M., Elsahar, H., Dymetman, M.: A distributional approach to controlled text generation. arXiv preprint arXiv:2012.11635 (2020)
Kingma, D.P., Ba, J.: Adam: a method for stochastic optimization. arXiv preprint arXiv:1412.6980 (2014)
Kriz, R., Miltsakaki, E., Apidianaki, M., Callison-Burch, C.: Simplification using paraphrases and context-based lexical substitution. In: Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pp. 207ā217 (2018)
Laufer, B.: Lexical thresholds and alleged threats to validity: a storm in a teacup? Reading Foreign Lang. 33(2), 238ā246 (2021)
Lavie, A., Agarwal, A.: Meteor: An automatic metric for MT evaluation with high levels of correlation with human judgments. In: Proceedings of the Second Workshop on Statistical Machine Translation, pp. 228ā231 (2007)
Lewis, M., et al.: Bart: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. arXiv preprint arXiv:1910.13461 (2019)
Li, J., Galley, M., Brockett, C., Gao, J., Dolan, B.: A diversity-promoting objective function for neural conversation models. arXiv preprint arXiv:1510.03055 (2015)
Li, X.L., Liang, P.: Prefix-tuning: optimizing continuous prompts for generation. In: Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pp. 4582ā4597 (2021)
Liu, Y., Wan, Y., He, L., Peng, H., Yu, P.S.: Kg-bart: knowledge graph-augmented bart for generative commonsense reasoning. arXiv preprint arXiv:2009.12677 (2020)
Liu, Y., Zhang, L., Han, W., Zhang, Y., Tu, K.: Constrained text generation with global guidance-case study on commongen. arXiv preprint arXiv:2103.07170 (2021)
Lu, D., Qiu, X., Cai, Y.: Sentence-level readability assessment for L2 Chinese learning. In: Hong, J.-F., Zhang, Y., Liu, P. (eds.) CLSW 2019. LNCS (LNAI), vol. 11831, pp. 381ā392. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-38189-9_40
Miao, N., Zhou, H., Mou, L., Yan, R., Li, L.: Cgmh: constrained sentence generation by metropolis-hastings sampling. In: Proceedings of the AAAI Conference on Artificial Intelligence. vol. 33, pp. 6834ā6842 (2019)
Nishihara, D., Kajiwara, T., Arase, Y.: Controllable text simplification with lexical constraint loss. In: Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics: Student Research Workshop, pp. 260ā266 (2019)
Nordlund, M., Norberg, C.: Vocabulary in EFL teaching materials for young learners. Int. J. Lang. Stud. 14(1), 89ā116 (2020)
Pandramish, V., Sharma, D.M.: Checkpoint reranking: an approach to select better hypothesis for neural machine translation systems. In: Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics: Student Research Workshop, pp. 286ā291 (2020)
Papineni, K., Roukos, S., Ward, T., Zhu, W.J.: Bleu: a method for automatic evaluation of machine translation. In: Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics, pp. 311ā318 (2002)
Post, M., Vilar, D.: Fast lexically constrained decoding with dynamic beam allocation for neural machine translation. arXiv preprint arXiv:1804.06609 (2018)
Prabhumoye, S., Black, A.W., Salakhutdinov, R.: Exploring controllable text generation techniques. arXiv preprint arXiv:2005.01822 (2020)
Radford, A., Wu, J., Child, R., Luan, D., Amodei, D., Sutskever, I., et al.: Language models are unsupervised multitask learners. OpenAI blog 1(8), 9 (2019)
Raffel, C., et al.: Exploring the limits of transfer learning with a unified text-to-text transformer. J. Mach. Learn. Res. 21(140), 1ā67 (2020)
Ravaut, M., Joty, S., Chen, N.F.: Summareranker: a multi-task mixture-of-experts re-ranking framework for abstractive summarization. arXiv preprint arXiv:2203.06569 (2022)
Ribeiro, L.F., Zhang, Y., Gurevych, I.: Structural adapters in pretrained language models for amr-to-text generation. arXiv preprint arXiv:2103.09120 (2021)
Ryu, J., Jeon, M.: An analysis of text difficulty across grades in Korean middle school English textbooks using Coh-Metrix. J. Asia TEFL 17(3), 921 (2020)
Samanta, B., Agarwal, M., Ganguly, N.: Fine-grained sentiment controlled text generation. arXiv preprint arXiv:2006.09891 (2020)
Sennrich, R., Haddow, B., Birch, A.: Neural machine translation of rare words with subword units. arXiv preprint arXiv:1508.07909 (2015)
Sha, L.: Gradient-guided unsupervised lexically constrained text generation. In: Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 8692ā8703 (2020)
Shao, Y., Shao, T., Wang, M., Wang, P., Gao, J.: A sentiment and style controllable approach for Chinese poetry generation. In: Proceedings of the 30th ACM International Conference on Information and Knowledge Management, pp. 4784ā4788 (2021)
Sheng, Z., et al.: Songmass: automatic song writing with pre-training and alignment constraint. In: Proceedings of the AAAI Conference on Artificial Intelligence. vol. 35, pp. 13798ā13805 (2021)
Su, Y., Vandyke, D., Wang, S., Fang, Y., Collier, N.: Plan-then-generate: controlled data-to-text generation via planning. arXiv preprint arXiv:2108.13740 (2021)
Tang, H., Li, M., Jin, B.: A topic augmented text generation model: Joint learning of semantics and structural features. In: Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pp. 5090ā5099 (2019)
Vaswani, A., et al.: Attention is all you need. Adv. Neural Inform. Process. Syst. 30, 5998ā6008 (2017)
Wang, H., et al.: Retrieval enhanced model for commonsense generation. arXiv preprint arXiv:2105.11174 (2021)
Wang, Y., Wood, I., Wan, S., Dras, M., Johnson, M.: Mention flags (mf): constraining transformer-based text generators. In: Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pp. 103ā113 (2021)
Weiss, Z., Meurers, D.: Assessing sentence readability for German language learners with broad linguistic modeling or readability formulas: When do linguistic insights make a difference? In: Proceedings of the 17th Workshop on Innovative Use of NLP for Building Educational Applications (BEA 2022), pp. 141ā153 (2022)
Wolf, T., et al.: Huggingfaceās transformers: State-of-the-art natural language processing. arXiv preprint arXiv:1910.03771 (2019)
Zhang, H., Song, H., Li, S., Zhou, M., Song, D.: A survey of controllable text generation using transformer-based pre-trained language models. arXiv preprint arXiv:2201.05337 (2022)
Zhang, R., Wang, Z., Yin, K., Huang, Z.: Emotional text generation based on cross-domain sentiment transfer. IEEE Access 7, 100081ā100089 (2019)
Zhang, Y., et al.: Generating informative and diverse conversational responses via adversarial information maximization. arXiv preprint arXiv:1809.05972 (2018)
Zhang, Y., Wang, G., Li, C., Gan, Z., Brockett, C., Dolan, B.: Pointer: constrained progressive text generation via insertion-based generative pre-training. arXiv preprint arXiv:2005.00558 (2020)
Zhao, C., Walker, M., Chaturvedi, S.: Bridging the structural gap between encoding and decoding for data-to-text generation. In: Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 2481ā2491 (2020)
Zou, X., Yin, D., Zhong, Q., Yang, H., Yang, Z., Tang, J.: Controllable generation from pre-trained language models via inverse prompting. In: Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining, pp. 2450ā2460 (2021)
Acknowledgement
This work was supported by the funds of Research Project of the National Language Commission No. ZDI145-24. We would like to thank all anonymous reviewers for their valuable comments and suggestions on this work.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Appendices
A Complexity Embedding Id
The English words have six levels. And the Chinese words have seven levels (Diff 1ā7). We give the design of the complexity embedding id for this two language in the Table 7. Note that, if a word is out of the complexity level vocabulary, its complexity is ā\(\langle out \rangle \)ā which is mapping into id 7 in English corpus and 8 in Chinese corpus. In addition, the special tokens such as ā\(\langle s \rangle \)ā ā\(\langle pad \rangle \)ā ā\(\langle \backslash s \rangle \)ā ā\(\langle unk \rangle \)ā are the common meaning in data preprocessing for model training.
B Details ofĀ Datasets Construction
1.1 B.1 English Dataset
We adopt the English word complexity levels in the Common European Framework of Reference for Languages (CEFR)Footnote 5 which is divided into six complexity levels (A1, A2, B1, B2, C1, and C2). First, we need to restrict the words in the corpus to ensure most of the words are in the complexity level vocabulary. Then, we need to extract keywords from the sentences. In this process, we command the number of keywords is related to the length of the sentence, and the number of keywords is between 1 to 5. Finally, we obtain the complexity information of each sentence through the complexity level vocabulary. The English raw corpus is collected from the monolingual English News dataset in ACL2019 WMT. We select those sentences which have 90% words in the complexity level vocabulary of CEFR. After the processes mentioned above, we get 199k samples in the English corpus, and we split the train, validation and test dataset as shown in the TableĀ 8.
1.2 B.2 Chinese Dataset
The word complexity levels in Chinese Proficiency Grading Standards for International Chinese Language Education (CPGS)Footnote 6 is divided into six complexity levels (1 to 7). The Chinese raw corpus is collected from 500 textbooks for Chinese learners. These textbooks contain two types of text: essay and dialogue. We split these texts into sentences and throw away those short sentences. If the raw text is a dialogue, after splitting, we need to remove the speakerās name to guarantee it is a proper sentence. Then, we command the number of keywords is related to the length of the sentence, and the number of keywords is between 1 to 5. After the processes mentioned above, we get 156k samples in the Chinese corpus, as shown in the TableĀ 8.
1.3 B.3 Analysis ofĀ theĀ Datasets
Coverage of Words with Levels. We first analyze the two datasets from the coverage rate of complexity level vocabulary. Due to the requirement of complexity level, the target text is proper to cover most of the vocabulary of complexity level. Both of the two datasets have covered over 93% of the vocabulary of complexity levels.
Distributions of the Number of Keywords and Complexity Levels. One or multiple complexity levels and keywords are given as the input to generate sentences. We give the distribution of the number of keywords and the complexity levels in Fig.Ā 3. From the statistics of (a) and (c) in Fig.Ā 3, the number of keywords in all samples has covered the range of 1 to 5 both in the English and Chinese datasets, but the distributions are quite different. On account of the average sentence length of English news data is longer than the Chinese corpus, the number of keywords in English is larger. From the statistics in (b) and (d) of Fig.Ā 3, the number of complexity levels distribution of the Chinese dataset is close to a standard normal distribution, and the English dataset concentrates on a wider range of complexity levels. This indicates that in the English dataset it tends to use more words of different complexity levels in the same sentence.
C Algorithm ofĀ Reranking
The algorithm is the detail of reranking method. We select the sentence that best meets the lexical complexity requirements from the N-best candidates, and \(N=10\). On the test set, We take the sum of ACC score and F1 score. The, we choose the candidate that has the largest score.
D Case Study
We choose some cases of the fine-tuning pattern from two datasets. The English cases are in the TableĀ 9, and the Chinese cases are in the TableĀ 10. In both tables, the required keywords as well as appearing in the sentences are shown in blue font, and certain given grades as well as words actually appearing in the sentences for the corresponding grade are shown in red font.
![figure a](http://media.springernature.com/lw685/springer-static/image/chp%3A10.1007%2F978-981-99-6207-5_7/MediaObjects/550576_1_En_7_Figa_HTML.png)
E Related Methods
1.1 E.1 Controlled Decoding
The gradients of an external discriminator is directly used to the generation of a pre-trained language model toward the target topic [8]. The output probabilities of a language model is modified by using the output of a discriminator that determines whether the future text will contain the desired attribute. Different from the controlled decoding methods, our method considers the constraint of lexical complexity during both training and prediction.
1.2 E.2 Prompting
The prompting method has emerged as a new way to perform natural language processing by conditioning on extra information. Brown et al. propose to use a task description and a few examples to adapt the GPT-3 model to downstream tasks, which is referred to as in-context learning [4]. Their prompts are manually designed. Gao et al. present LM-BFF for automatic prompts generation [11]. Liang et al. propose prefix-tuning, which uses continuous vectors as prompts [24]. Compared to the prompting method, our method fuses more fine-grained information on lexical complexity in model training.
1.3 E.3 Reranking
The reranking approach has been proved to have excellent performance in machine translation [31] and text generation [37]. The reranking method rescores the n-best candidates through a model or a function and selects the highest scoring candidate as the final prediction [16]. Unlike the reranking method, our method do not need to process the outputs after decoding.
F Limitation
Our proposed task has wide applications in the field of language teaching, and the proposed method has precise control over lexical difficulty. However, the task requires that the lexical complexity is known first. The vocabulary difficulty table is the experience summed up by the predecessors, and it is difficult to apply to all vocabulary. Therefore, we are actively exploring how to make the model automatically understand all vocabulary difficulties so that it can cover a wider vocabulary at generation.
Rights and permissions
Copyright information
Ā© 2023 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Nie, J., Yang, L., Chen, Y., Kong, C., Zhu, J., Yang, E. (2023). Lexical Complexity Controlled Sentence Generation forĀ Language Learning. In: Sun, M., et al. Chinese Computational Linguistics. CCL 2023. Lecture Notes in Computer Science(), vol 14232. Springer, Singapore. https://doi.org/10.1007/978-981-99-6207-5_7
Download citation
DOI: https://doi.org/10.1007/978-981-99-6207-5_7
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-99-6206-8
Online ISBN: 978-981-99-6207-5
eBook Packages: Computer ScienceComputer Science (R0)