Skip to main content

Lexical Complexity Controlled Sentence Generation forĀ Language Learning

  • Conference paper
  • First Online:
Chinese Computational Linguistics (CCL 2023)

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 14232))

Included in the following conference series:

  • 343 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 59.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 79.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://www.englishprofile.org/wordlists/evp.

  2. 2.

    https://www.chinesetest.cn/index.do

  3. 3.

    https://github.com/pytorch/fairseq.

  4. 4.

    https://github.com/huggingface/transformers.

  5. 5.

    https://www.englishprofile.org/wordlists/evp.

  6. 6.

    https://www.chinesetest.cn/index.do

References

  1. Al-Jarf, R.: Efl studentsā€™ difficulties with lexical and syntactic features of news headlines and news stories. Technium Soc. Sci. J. 17, 524 (2021)

    Google ScholarĀ 

  2. 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)

    Google ScholarĀ 

  3. 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)

    Google ScholarĀ 

  4. Brown, T., et al.: Language models are few-shot learners. Adv. Neural. Inf. Process. Syst. 33, 1877ā€“1901 (2020)

    Google ScholarĀ 

  5. Caro, K., Mendinueta, N.R.: Lexis, lexical competence and lexical knowledge: a review. J. Lang. Teach. Res. 8(2) (2017)

    Google ScholarĀ 

  6. 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)

    Google ScholarĀ 

  7. Chen, H., Yi, X., Sun, M., Li, W., Yang, C., Guo, Z.: Sentiment-controllable Chinese poetry generation. In: IJCAI, pp. 4925ā€“4931 (2019)

    Google ScholarĀ 

  8. Dathathri, S., et al.: Plug and play language models: A simple approach to controlled text generation. arXiv preprint arXiv:1912.02164 (2019)

  9. 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)

    Google ScholarĀ 

  10. Fan, Z., et al.: An enhanced knowledge injection model for commonsense generation. arXiv preprint arXiv:2012.00366 (2020)

  11. Gao, T., Fisch, A., Chen, D.: Making pre-trained language models better few-shot learners. arXiv preprint arXiv:2012.15723 (2020)

  12. He, X.: Parallel refinements for lexically constrained text generation with bart. arXiv preprint arXiv:2109.12487 (2021)

  13. 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)

    Google ScholarĀ 

  14. 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)

    Google ScholarĀ 

  15. 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)

    Google ScholarĀ 

  16. 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)

    Google ScholarĀ 

  17. Khalifa, M., Elsahar, H., Dymetman, M.: A distributional approach to controlled text generation. arXiv preprint arXiv:2012.11635 (2020)

  18. Kingma, D.P., Ba, J.: Adam: a method for stochastic optimization. arXiv preprint arXiv:1412.6980 (2014)

  19. 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)

    Google ScholarĀ 

  20. Laufer, B.: Lexical thresholds and alleged threats to validity: a storm in a teacup? Reading Foreign Lang. 33(2), 238ā€“246 (2021)

    Google ScholarĀ 

  21. 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)

    Google ScholarĀ 

  22. Lewis, M., et al.: Bart: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. arXiv preprint arXiv:1910.13461 (2019)

  23. 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)

  24. 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)

    Google ScholarĀ 

  25. 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)

  26. 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)

  27. 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

    ChapterĀ  Google ScholarĀ 

  28. 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)

    Google ScholarĀ 

  29. 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)

    Google ScholarĀ 

  30. Nordlund, M., Norberg, C.: Vocabulary in EFL teaching materials for young learners. Int. J. Lang. Stud. 14(1), 89ā€“116 (2020)

    Google ScholarĀ 

  31. 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)

    Google ScholarĀ 

  32. 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)

    Google ScholarĀ 

  33. Post, M., Vilar, D.: Fast lexically constrained decoding with dynamic beam allocation for neural machine translation. arXiv preprint arXiv:1804.06609 (2018)

  34. Prabhumoye, S., Black, A.W., Salakhutdinov, R.: Exploring controllable text generation techniques. arXiv preprint arXiv:2005.01822 (2020)

  35. 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)

    Google ScholarĀ 

  36. 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)

    MathSciNetĀ  Google ScholarĀ 

  37. 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)

  38. Ribeiro, L.F., Zhang, Y., Gurevych, I.: Structural adapters in pretrained language models for amr-to-text generation. arXiv preprint arXiv:2103.09120 (2021)

  39. 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)

    Google ScholarĀ 

  40. Samanta, B., Agarwal, M., Ganguly, N.: Fine-grained sentiment controlled text generation. arXiv preprint arXiv:2006.09891 (2020)

  41. Sennrich, R., Haddow, B., Birch, A.: Neural machine translation of rare words with subword units. arXiv preprint arXiv:1508.07909 (2015)

  42. 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)

    Google ScholarĀ 

  43. 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)

    Google ScholarĀ 

  44. 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)

    Google ScholarĀ 

  45. 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)

  46. 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)

    Google ScholarĀ 

  47. Vaswani, A., et al.: Attention is all you need. Adv. Neural Inform. Process. Syst. 30, 5998ā€“6008 (2017)

    Google ScholarĀ 

  48. Wang, H., et al.: Retrieval enhanced model for commonsense generation. arXiv preprint arXiv:2105.11174 (2021)

  49. 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)

    Google ScholarĀ 

  50. 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)

    Google ScholarĀ 

  51. Wolf, T., et al.: Huggingfaceā€™s transformers: State-of-the-art natural language processing. arXiv preprint arXiv:1910.03771 (2019)

  52. 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)

  53. Zhang, R., Wang, Z., Yin, K., Huang, Z.: Emotional text generation based on cross-domain sentiment transfer. IEEE Access 7, 100081ā€“100089 (2019)

    ArticleĀ  Google ScholarĀ 

  54. Zhang, Y., et al.: Generating informative and diverse conversational responses via adversarial information maximization. arXiv preprint arXiv:1809.05972 (2018)

  55. 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)

  56. 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)

    Google ScholarĀ 

  57. 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)

    Google ScholarĀ 

Download references

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

Authors

Corresponding author

Correspondence to Liner Yang .

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.

Table 7. Complexity Embedding Id.

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.

Fig. 3.
figure 3

Distributions of the number of keywords and complexity levels.

Table 8. Statistics of the two datasets.

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

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.

Table 9. Generated examples from the English dataset.

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.

Table 10. Generated examples from the Chinese dataset.

Rights and permissions

Reprints and permissions

Copyright information

Ā© 2023 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics