自然語言生成在最近發展的相當蓬勃,無論是基於對抗式生成網 路 (GAN) 或是變分自動編碼器 (VAE),都有相當的佳作發表。在自然 語言生成的領域中,條件式的改寫是較少人專注的題目,在這篇論文 中,我們對這個題目有更正式的定義-將句子依據給定的條件改寫, 且生成的句子需和原句相像並滿足給定的條件。我們提出了一個基於 序列變分自動編碼器的模型解決這個問題。這個模型在訓練時和自動 編碼器相同,輸入和目標是同個句子,但我們額外加入了條件提醒的 機制,讓模型在生成句子時會去注意在我們給定的條件上,達成控制 的目標。最後我們的實驗結果支持這個模型能生成好品質的句子並符 合條件的改寫。
Natural language generation has been a popular field with lots of quality works published based on generative adversarial network (GAN) or varia- tional autoencoder (VAE). However, rephrasing with condition is a problem that few people focus on. In this work, the problem is formally defined as ”rephrase a sentence with given condition, and the generated sentence should be similar to the origin sentence and it should satisfy the given condition”. Moreover, we propose a conditional model based on sentence-VAE to solve the problem. The model is trained as an autoencoder, but we can control the condition of the generated sentence. And, it inherits the nature of autoencoder that the generated sentences would be similar to the input sentence. With experiment results supported, the model can solve the problem with quality sentences.