计算机工程与应用2026,Vol.62Issue(6):134-145,12.DOI:10.3778/j.issn.1002-8331.2412-0005
基于主题约束采样的文本生成方法
Text Generation Method Based on Topic Constraint Sampling
摘要
Abstract
Pre-trained large language models can be fine-tuned to incorporate relevant knowledge and linguistic conven-tions of a local corpus,though this process typically involves high training costs and computing resources.Therefore,this paper proposes a sampling method based on topic-constrained.The method employs a local corpus to construct a latent Dirichlet distribution(LDA)topic model.LDA is used to topic-constrained the output content.On the one hand,this method is easy to implement.On the other hand,it enhances the generalization capabilities of model on local corpus.Experimental results reveal that the proposed method achieves better performance than the baseline model in both diversity and generalization.关键词
预训练语言模型/主题约束/文本生成/采样策略Key words
pre-trained language model/topic constrained/text generation/sampling strategy分类
信息技术与安全科学引用本文复制引用
冉文议,万家强,喻靖峰,李琪玥,陈鼎丽,邢欣来..基于主题约束采样的文本生成方法[J].计算机工程与应用,2026,62(6):134-145,12.基金项目
重庆市教委科学技术研究计划项目(KJQN202301153). (KJQN202301153)