N-Gram Accuracy Analysis in the Method of Chatbot Response


  • Dhebys Suryani Hormansyah
  • Eka Larasati Amalia
  • Luqman Affandi
  • Dimas Wahyu Wibowo
  • Indinabilah Aulia






Chatbot, TF-IDF, Cosine Similarity, N-gram, Bot Line


Chatbot is a computer program designed to simulate interactive conversations or communication to users. In this study, chatbot was created as a customer service that functions as a public health service in Malang. This application is expected to facilitate the public to find the desired information. The method for user input in this application used N-Gram. N-gram consists of unigram, bigram and trigram. Testing of this application is carried out on  3 N-gram methods, so that the results of the tests  have been done obtain the results for unigram 0.436, bigram 0.28, and trigram 0.26. From these results it can be seen that trigrams are faster in answering questions.


[1] Bayu Setiaji. 2016. “Chatbot Using A Knowledge in Database Human-to-Machine Conversation Modelingâ€. International Conference on Intelligent Systems, Modelling and Simulation. https://doi.org/10.1109/ISMS.2016.53

[2] Nirmala Shinde, 2018. “Chatbot using TensorFlow for small Businessesâ€. Proceedings of the 2nd International Conference on Inventive Communication and Computational Technologies (ICICCT 2018).

[3] Bhavika R. Ranoliya. 2017. “Chatbot for University Related FAQsâ€. IEEE

[4] Varvara Logacheva. 2018. “A Dataset of Topic-Oriented Human-to-Chatbot Dialoguesâ€. Bayan Abu Shawar. 2011. “A Chatbot as a Natural Web Interface to Arabic Web QAâ€. International Journal of Emerging Technologies in Learning. Vol. 6, No. 1. http://dx.doi.org/10.3991/ijet.v6i1.1502

[5] Aniket Dole. 2015. “Intelligent Chat Bot for Banking Systemâ€. International Journal of Emerging Technologies in Learning. Volume 4, Issue 5(2).

[6] Shunichi Ishihara. 2014. “A Comparative Study of Likelihood Ratio Based Forensic Text Comparison Proceduresâ€. Fifth Cybercrime and Trustworthy Computing Conference. https://doi.org/10.1109/CTC.2014.9

[7] Ranjeet Kumar. 2014. “A Trigram Word Selection Methodology to Detect Textual Similarity with Comparative Analysis of Similar Techniquesâ€. Fourth International Conference on Communication Systems and Network Technologies. https://doi.org/10.1109/CSNT.2014.82

[8] Sixing Wu. 2018. “A Fully Character-level Encoder-Decoder Model for Neural Responding Conversationâ€. IEEE International Conference on Computer Software & Applications.

View Full Article:

How to Cite

Suryani Hormansyah, D., Larasati Amalia, E., Affandi, L., Wahyu Wibowo, D., & Aulia, I. (2018). N-Gram Accuracy Analysis in the Method of Chatbot Response. International Journal of Engineering & Technology, 7(4.44), 152–155. https://doi.org/10.14419/ijet.v7i4.44.26973
Received 2019-02-02
Accepted 2019-02-02
Published 2018-12-01