自然語言處理(Natural Language Processing, NLP)應用領域中生成風格文本是一個具有挑戰性的研究,而在深度學習(Deep Learning)中的生成預訓練模型(Generative Pre-trained Transformer 2, GPT-2)可以進行文本的生成。本論文提出基於GPT-2之文本風格轉換機制,使用提取自行設計的關鍵字與文本風格轉換的方法,產生不同種類的文本風格。此外本論文也實作我們提出的方法,讓使用者輸入文章主題的語句,再由系統提取其中的關鍵字並透過詞頻和斷詞斷句的方法,提供給使用者相關文章的摘要做勾選,最後將生成出的文章進行風格處理和轉換成包含原始語意和不同風格的文本。
Generative text generation is a challenging research in natural language processing (NLP) applications, while Generative Pre-trained Transformer 2 (GPT-2) in deep learning text generation is possible. This thesis proposes a text style conversion mechanism based on GPT-2, which uses the method of extracting keywords and text style conversion to generate different types of text styles. In addition, this thesis also implements our proposed method, allowing users to input sentences of the subject of the article, and then the system extracts the keywords and provides users with the abstracts of relevant articles to check through the methods of word frequency and word segmentation. Finally, the generated articles are stylized and converted into texts containing the original semantics and different styles.