Research Article
BibTex RIS Cite

Telegram Bot Application with Sequence to Sequence LSTM Model

Year 2020, Volume: 6 Issue: 1, 32 - 39, 30.04.2020

Abstract

Chatbot is a software that chat with the user by audio or textual methods. Advanced chat bots are able to provide appropriate answers related issues. Using artificial intelligence methods in chat bots increases efficiency. In this context, telegram bot application was developed with LSTM (Long Short Term Memory) and seq2seq model. The use of LSTM in the study enabled the return to speech history to predict the next speech action. Time saving was achieved by using chatterbot dataset from kaggle.com in the study. Telegram integration is provided via pythonanywhere for user interaction. The loss rate and other performance parameters during the training of the study were visualized with TensorBoard. In the study, the 50-step training was completed in 13 seconds. The loss rate in the study decreased at each step and decreased to 0.2772 at the end of 50 steps and 79 percent accuracy rate was obtained. The study is designed modularly and open to development. By continuing the education process of the modular study, it will be possible to teach different linguistic expressions. Open source and free software were used in the study. The presented study has brought together the features of the outstanding studies in the literature using state of art technologies.

References

  • Bonilla, F., Ugalde, F. (2019). Automatic Translation of Spanish Natural Language Commands to Control Robot Comands based on LSTM neural network. Third IEEE International Conference on Robotic Computing (IRC), February 2019, 125-130.
  • Chawla, J.S. (2018), What is GloVe?, Erişim Adresi: https://medium.com/@japneet121/word-vectorization-using-glove-76919685ee0b , Erişim Tarihi: 2019.
  • Getting Started with Word2Vec and GloVe, Erişim Adresi: https://textminingonline.com/getting-started-with-word2vec-and-glove, Erişim Tarihi: 2019.
  • Huang, J., Zhou, M., Yang, D. (2007). Extracting Chatbot Knowledge from Online Discussion Forums. Proceedings of the 20th International Joint Conference on Artificial Intelligence(IJCAI), January 6-12, 2007, India.
  • Jongerius, C. (2018). Quantifying Chatbot Performance by using Data Analytics, Utrecht University, Faculty of Science Theses(Master thesis).
  • Kaus, R. Dataset for chatbots, Erişim Adresi: https://www.kaggle.com/kausr25/chatterbotenglish Erişim Tarihi: 2019.
  • Kompella, R. (2018). Neural Machine Translation — Using seq2seq with Keras, Erişim Adresi: https://towardsdatascience.com/neural-machine-translation-using-seq2seq-with-keras-c23540453c74, Erişim Tarihi: 2019.
  • Lee, W.C., Wang, Y.S., Hsu, T.S., Chen, K.Y. (2018). Scalable Sentiment for Sequence-to-Sequence Chatbot Response with Performance Analysis. 2018 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), April 15-20, 2018, Canada, 6164-6167.
  • Muangkammuen, P., Intiruk, N., Saikaew, K.R. (2018). Automated Thai-FAQ Chatbot using RNN-LSTM, 2018 22nd International Computer Science and Engineering Conference (ICSEC), November 21-24, 2018, Thailand.
  • Muslih, M., Supardi, D., Multipi, E., Nyaman, Y.M. (2018). Developing Smart Workspace Based IOT with Artificial Intelligence Using Telegram Chatbot, 2018 International Conference on Computing, Engineering, and Design (ICCED), September 6-8, 2018, Thailand.
  • PythonAnywhere in one minute, Erişim Adresi: https://www.youtube.com/watch?v=NH2PhXYvrWs, Erişim Tarihi: 2019.
  • Rahman, F. Sequence to Sequence Learning with Keras, Erişim Adresi: https://github.com/farizrahman4u/seq2seq, Erişim Tarihi: 2018.
  • Su, M.H., Wu, C.H., Huang, Y. (2017). A chatbot using LSTM-based multi-layer embedding for elderly care. 2017 International Conference on Orange Technologies(ICOT), December 8-10, 2017, Singapore.
  • Sutskever, I., Le, Q., Vinyals, O. (2014). Sequence to Sequence Learning with Neural Networks, arXiv preprint arXiv:1409.3215.
  • Telegram Bot Api, Erişim Adresi: https://core.telegram.org/bots/api#available-methods, Erişim Tarihi: 2019.
  • TensorBoard, Erişim Adresi: https://www.tensorflow.org/tensorboard, Erişim Tarihi: 2019.
  • Xu, A., Liu, Z., Guo, Y. (2017). A New Chatbot for Customer Service on Social Media, CHI 2017, May 6–11, 2017, Denver, CO, USA.

Sequence to Sequence LSTM Modeli ile Telegram Bot Uygulaması

Year 2020, Volume: 6 Issue: 1, 32 - 39, 30.04.2020

Abstract

Sohbet botu (Chatbot), işitsel veya metinsel yöntemlerle kullanıcı ile sohbet eden bir yazılımdır. Gelişmiş sohbet botları, ilgili konuya uygun cevaplar verebilmektedir. Sohbet botlarında yapay zeka yöntemlerinin kullanılması etkinliğini artırmaktadır. Bu kapsamda, çalışmada LSTM (Uzun Kısa Süreli Bellek) ve seq2seq modeli ile telegram bot uygulaması geliştirilmiştir. Çalışmada LSTM kullanılması bir sonraki konuşma eylemini tahmin etmek için konuşma geçmişine geri dönülebilmesini sağlamıştır. Çalışmada kaggle.com’dan alınan chatterbot veri kümesi kullanılarak zaman tasarrufu sağlanmıştır. Kullanıcı etkileşimi için pythonanywhere üzerinden telegram ile entegrasyon yapılmıştır. Çalışmanın eğitimi sırasındaki kayıp oranı ve diğer performans parametreleri TensorBoard ile görselleştirilmiştir. Çalışmada 50 adımlık eğitim, 13 saniyede tamamlanmıştır. Çalışmadaki kayıp oranı her adımda azalarak 50 adım sonunda 0.2772’ye düşmüş ve yüzde 79 doğruluk oranı elde edilmiştir. Çalışma, modüler ve geliştirmeye açık bir şekilde tasarlanmıştır. Modüler yapıdaki çalışmanın eğitim süreci devam edilmesi sağlanarak farklı dilsel ifadelerin öğretilmesi sağlanabilecektir. Çalışmada, açık kaynak kodlu ve ücretsiz yazılımlar kullanılmıştır. Sunulan çalışma, güncel teknolojilerin kullanıldığı literatürde öne çıkan çalışmaların özelliklerinin biraraya getirilmesini sağlamıştır.

References

  • Bonilla, F., Ugalde, F. (2019). Automatic Translation of Spanish Natural Language Commands to Control Robot Comands based on LSTM neural network. Third IEEE International Conference on Robotic Computing (IRC), February 2019, 125-130.
  • Chawla, J.S. (2018), What is GloVe?, Erişim Adresi: https://medium.com/@japneet121/word-vectorization-using-glove-76919685ee0b , Erişim Tarihi: 2019.
  • Getting Started with Word2Vec and GloVe, Erişim Adresi: https://textminingonline.com/getting-started-with-word2vec-and-glove, Erişim Tarihi: 2019.
  • Huang, J., Zhou, M., Yang, D. (2007). Extracting Chatbot Knowledge from Online Discussion Forums. Proceedings of the 20th International Joint Conference on Artificial Intelligence(IJCAI), January 6-12, 2007, India.
  • Jongerius, C. (2018). Quantifying Chatbot Performance by using Data Analytics, Utrecht University, Faculty of Science Theses(Master thesis).
  • Kaus, R. Dataset for chatbots, Erişim Adresi: https://www.kaggle.com/kausr25/chatterbotenglish Erişim Tarihi: 2019.
  • Kompella, R. (2018). Neural Machine Translation — Using seq2seq with Keras, Erişim Adresi: https://towardsdatascience.com/neural-machine-translation-using-seq2seq-with-keras-c23540453c74, Erişim Tarihi: 2019.
  • Lee, W.C., Wang, Y.S., Hsu, T.S., Chen, K.Y. (2018). Scalable Sentiment for Sequence-to-Sequence Chatbot Response with Performance Analysis. 2018 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), April 15-20, 2018, Canada, 6164-6167.
  • Muangkammuen, P., Intiruk, N., Saikaew, K.R. (2018). Automated Thai-FAQ Chatbot using RNN-LSTM, 2018 22nd International Computer Science and Engineering Conference (ICSEC), November 21-24, 2018, Thailand.
  • Muslih, M., Supardi, D., Multipi, E., Nyaman, Y.M. (2018). Developing Smart Workspace Based IOT with Artificial Intelligence Using Telegram Chatbot, 2018 International Conference on Computing, Engineering, and Design (ICCED), September 6-8, 2018, Thailand.
  • PythonAnywhere in one minute, Erişim Adresi: https://www.youtube.com/watch?v=NH2PhXYvrWs, Erişim Tarihi: 2019.
  • Rahman, F. Sequence to Sequence Learning with Keras, Erişim Adresi: https://github.com/farizrahman4u/seq2seq, Erişim Tarihi: 2018.
  • Su, M.H., Wu, C.H., Huang, Y. (2017). A chatbot using LSTM-based multi-layer embedding for elderly care. 2017 International Conference on Orange Technologies(ICOT), December 8-10, 2017, Singapore.
  • Sutskever, I., Le, Q., Vinyals, O. (2014). Sequence to Sequence Learning with Neural Networks, arXiv preprint arXiv:1409.3215.
  • Telegram Bot Api, Erişim Adresi: https://core.telegram.org/bots/api#available-methods, Erişim Tarihi: 2019.
  • TensorBoard, Erişim Adresi: https://www.tensorflow.org/tensorboard, Erişim Tarihi: 2019.
  • Xu, A., Liu, Z., Guo, Y. (2017). A New Chatbot for Customer Service on Social Media, CHI 2017, May 6–11, 2017, Denver, CO, USA.
There are 17 citations in total.

Details

Primary Language Turkish
Subjects Computer Software
Journal Section Research Articles
Authors

Ali Hakan Isık 0000-0003-3561-9375

Ayşenur Yağcı 0000-0001-8664-8067

Publication Date April 30, 2020
Submission Date February 23, 2020
Acceptance Date April 25, 2020
Published in Issue Year 2020 Volume: 6 Issue: 1

Cite

IEEE A. H. Isık and A. Yağcı, “Sequence to Sequence LSTM Modeli ile Telegram Bot Uygulaması”, GJES, vol. 6, no. 1, pp. 32–39, 2020.

Gazi Journal of Engineering Sciences (GJES) publishes open access articles under a Creative Commons Attribution 4.0 International License (CC BY). 1366_2000-copia-2.jpg