§ 瀏覽學位論文書目資料
系統識別號 U0002-0307201901183500
DOI 10.6846/TKU.2019.00065
論文名稱(中文) 應用序列到序列生成模型於情感型聊天機器人之研究
論文名稱(英文) Using the sequence to sequence generative model for an emotional chatbot
第三語言論文名稱
校院名稱 淡江大學
系所名稱(中文) 資訊管理學系碩士班
系所名稱(英文) Department of Information Management
外國學位學校名稱
外國學位學院名稱
外國學位研究所名稱
學年度 107
學期 2
出版年 108
研究生(中文) 曹光中一
研究生(英文) Guang-Zhong-Yi Cao
學號 606634011
學位類別 碩士
語言別 繁體中文
第二語言別
口試日期 2019-06-01
論文頁數 39頁
口試委員 指導教授 - 魏世杰
委員 - 魏世杰
委員 - 壽大衛
委員 - 戴敏育
關鍵字(中) 聊天機器人
文字生成
深度學習
基於情感的問答模型
關鍵字(英) chatbots
text generation
deep learning
sentiment-based response model
第三語言關鍵字
學科別分類
中文摘要
受益於深度學習技術的快速發展,聊天機器人在商務客服應用中愈來
愈被普遍採用。在 2018 年舉辦的 NTCIR-14 年度資訊檢索競賽中,中文情感對話生成(CECG)子任務要求聊天機器人在問答中加入情感因素的考量,即針對同一問句,須因應不同情感標籤,生成不同的回應。受此須求啟發,本文將利用給定語料,為每種情感訓練一個序列到序列問答模型,從中挑選合適的情感答句。最後,本文將透過便利抽樣方式對 30 位使用簡體中文的微博用戶進行問卷調查,以此評測聊天機器人在加入情感因素下的答覆和傳統不加入情感因素下的答覆,兩者的表現差異。問卷結果發現加入情感標籤的問答模型,在多個面向的評估上都略勝傳統不加入情感標籤的問答模型。
英文摘要
Benefiting from the development of the deep learning technologies, the application of chatbots in business customer services has become more and more popular. In the CECG subtask of NTCIR-14 in 2018, the chatbots are required to generate different responses with different types of sentiments. Inspired by this demand, a generative chatbot system was constructed, which trains a response model for each type of sentiments and selects the appropriate one for response. Finally, 30 Weibo users are selected based on convenience sampling to evaluate the difference between the performance of chatbots with and without sentiment considerations. The study found that the generative model considering sentiments is slightly better than the generative model with no consideration of sentiments in various aspects.
第三語言摘要
論文目次
目錄
壹、 導論 1
1.1 研究背景 1
1.2 研究動機 1
1.3 研究目的 2
1.4 論文架構 2
贰、 文獻探討 3
2.1 NTCIR-14 3
2.2 檢索式聊天機器人 3
2.2.1 樣板式作法 3
2.2.2 規則式作法 4
2.3 生成式聊天機器人 4
2.4 Sequence-to-Sequence 模型 4
2.4.1 深度學習 5
2.4.2 循環神經網路 5
2.4.3 LSTM 和 GRU 單元 6
2.5 詞嵌入 8
2.6 注意力機制 9
2.7 基於注意力機制的 Seq2Seq 模型 10
2.7.1 GRU 編碼器 11
2.7.2 帶注意力的 GRU 解碼器 11
2.8 CNN 情感分類器模型 12
2.9 語義相似度 13
叁、 方法介紹 16
3.1 問題定義 16
3.2 資料集觀察 16
3.3 系統架構 21
3.4 情感分類器 23
肆、 實驗設計與結果 25
4.1 實驗環境 25
4.2 實驗設計 26
4.2.1 序列生成模型之評估 26
4.2.2 情感分類器模型之評估 28
4.3 實驗結果 28
4.3.1 序列生成模型評估結果 28
4.3.2 多情感分類器模型評估結果 31
伍、 結語與未來發展 32
5.1 研究貢獻 32
5.2 研究限制 32
5.3 未來展望 33
參考文獻 34
附錄 研究問卷 36


表目錄
表 1 問答句情感匹配表 21
表 2 使用套件表 25
表 3 實驗資料集對照表 26
表 4 混淆矩陣表 28
表 5 問卷結果統計表 29
表 6 M1,M2 問答句相關度統計表 30
表 7 模型訓練資料集不重複詞數統計表 31
表 8 多情感分類器混淆矩陣表 31


圖目錄
圖 1 Seq2Seq 模型示意圖 5
圖 2 RNN 模型示意圖 6
圖 3 LSTM 和 GRU 模型示意圖 8
圖 4 注意力計算示意圖 9
圖 5 Seq2Seq 系統架構圖 10
圖 6 GRU 編碼器示意圖 10
圖 7 帶注意力的 GRU 解碼器示意圖示意圖 12
圖 8 CNN 文本分類器示意圖 13
圖 9 PV-DM 模型示意圖 14
圖 10 PV-DBOW 模型示意圖 14
圖 11 餘弦相似度示意圖 15
圖 12 針對不同問句情感統計得到的答句情感分佈圖 17
圖 13 標籤為“喜歡”的資料集文字雲 18
圖 14 標籤為“悲傷”的資料集文字雲 18
圖 15 標籤為“厭惡”的資料集文字雲 19
圖 16 標籤為“憤怒”的資料集文字雲 19
圖 17 標籤為“快樂”的資料集文字雲 20
圖 18 系統架構圖 22
圖 19 訓練資料流向示意圖 23
圖 20 Colab 環境配置圖 25
圖 21 問卷實驗結果對比圖 29
圖 22 問卷實驗結果對比圖(總平均分)29
參考文獻
參考文獻
1.Bahdanau, D., Cho, K., & Bengio, Y. (2016). Neural Machine Translation by Jointly Learning to Align and Translate, International Conference on Learning Representations (ICLR).
2.Cho, K., Merrienboer, B., Gulcehre, C., Bahdanau, D., Bougares, F., Schwenk, H., & Bengio, Y. (2014). Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation, Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP).
3.Goyal, P., Pandey, S., & Jain, K. (2018). Deep Learning for Natural Language Processing: Creating Neural Networks with Python (1st ed). Apress.
4.Thanaki, J. (2017). Python Natural Language Processing. Birmingham, Munbai: Packt.
5.Jozefowicz, R., Vinyals, O., Schuster, M., Shazeer, N., & Wu, Y. (2016). Exploring the Limits of Language Modeling. International Conference on Machine Learning (ICML).
6.Kim, Y. (2014). Convolutional Neural Networks for Sentence Classification. Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), Pages 1746-1751.
7.Luong, M., Pham, H., & Manning, C. D. (2015). Effective Approaches to Attention-based Neural Machine Translation. Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing (EMNLP), Pages1412-1421.
8.Shang, L., Sakai, T., Li, H., Higashinaka, R., Miyao, Y., Arase, Y., & Nomoto, M. (2017). Overview of the NTCIR-13 Short Text Conversation Task. Proceedings of the 13th NTCIR Conference on Evaluation of Information Access Technologies.
9.Sutskever, I., Vinyals, O., & Le, Q. (2014). Sequence to Sequence Learning with Neural Networks. Proceedings of the 27th International Conference on Neural Information Processing Systems (NIPS'14). Volume 2, Pages 3104-3112.
10.Wu, Y., Wu, W., Xing, C., Zhou, M., & Li, Z. (2017). Sequential Matching Network: A New Architecture for Multi-turn Response Selection in Retrieval-based Chatbots. arXiv:1612.01627.
11.Zaccone, G. (2016). Getting Started with Tensorflow. Birmingham, England: Packt.
12.Zhang, Y., Huang, M. (2019). Overview of the NTCIR-14 Short Text Generation Subtask: Emotion Generation Challenge. Proceedings of the 14th NTCIR Conference on Evaluation of Information Access Technologies.
13.Zhao, H., Du, Y., & Li, H. (2017). SG01 at the NTCIR-13 STC-2 Task. Proceedings of the 13th NTCIR Conference on Evaluation of Information Access Technologies.
14.Zhou, H., Huang, M., Zhang, T., Zhu, X., & Liu, B. (2018). Emotional Chatting Machine: Emotional Conversation Generation with Internal and External Memory. Proceedings of the Association for the Advancement of Artificial Intelligence (AAAI).
論文全文使用權限
校內
紙本論文於授權書繳交後5年公開
同意電子論文全文授權校園內公開
校內電子論文於授權書繳交後5年公開
校外
同意授權
校外電子論文於授權書繳交後5年公開

如有問題,歡迎洽詢!
圖書館數位資訊組 (02)2621-5656 轉 2487 或 來信