N-Gram and Full-Text Search Algorithm Testing for Pattern Recognition in a Chatbot Engine †
Abstract
1. Introduction
2. Related Work
3. Literature Review
3.1. Core Technologies
3.2. Web Technologies
3.3. Database and Language Processing
3.4. Research Foundation
4. Design System
4.1. System Overview
4.2. Pattern Recognition Block
4.3. Physical Data Model
5. Implementation
5.1. Chatbot Interface
5.2. Testing Accuracy, Precision, Recall, and Computation Time
5.3. Chatbot Misresponse on Pattern Recognition
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Sukarsa, I.M.; Putra, I.K.G.D.; Sastra, N.P.; Jasa, L. A New Framework for Information System Development on Instant Messaging for Low Cost Solution. TELKOMNIKA (Telecommun. Comput. Electron. Control) 2018, 16, 2799. [Google Scholar] [CrossRef]
- Satoto, K.I.; Isnanto, R.R.; Kridalukmana, R.; Martono, K.T. Optimizing MySQL database system on information systems research, publications and community service. In Proceedings of the 2016 3rd International Conference on Information Technology, Computer, and Electrical Engineering (ICITACEE), Semarang, Indonesia, 19–20 October 2016; pp. 1–5. [Google Scholar] [CrossRef]
- Made Sukarsa, I.; Ketur Gede Darma Putra, I.; Putra Sastra, N.; Jasa, L. A Simple RBAC and SSO Architecture for ISONER Framework. In Proceedings of the 2019 International Conference of Artificial Intelligence and Information Technology (ICAIIT), Yogyakarta, Indonesia, 13–15 March 2019; pp. 517–520. [Google Scholar] [CrossRef]
- Sukarsa, I.M.; Antara, I.K.A.M.; Buana, P.W.; Bayupati, I.P.A.; Wisswani, N.W.; Puteri, D.W. Data storage model in low-cost mobile applications. Indones. J. Electr. Eng. Comput. Sci. 2022, 28, 1128–1138. [Google Scholar] [CrossRef]
- Setiaji, B.; Wibowo, F.W. Chatbot Using a Knowledge in Database: Human-to-Machine Conversation Modeling. In Proceedings of the 2016 7th International Conference on Intelligent Systems, Modelling and Simulation (ISMS), Bangkok, Thailand, 25–27 January 2016; pp. 72–77. [Google Scholar] [CrossRef]
- Sukarsa, I.M.; Buana, P.W.; Yogantara, U. Multi Parameter Design in AIML Framework for Balinese Calendar Knowledge Access. KSII Trans. Internet Inf. Syst. 2020, 14, 114–130. [Google Scholar] [CrossRef]
- Haristiani, N.; Rifa’i, M.M. Combining chatbot and social media: Enhancing personal learning environment (PLE) in language learning. Indones. J. Sci. Technol. 2020, 5, 487–506. [Google Scholar] [CrossRef]
- Elcholiqi, A.; Musdholifah, A. Chatbot in Bahasa Indonesia using NLP to Provide Banking Information. IJCCS (Indones. J. Comput. Cybern. Syst.) 2020, 14, 91. [Google Scholar] [CrossRef]
- Christian, Y.; Erline, M. Web-based chatbot with natural language processing and Knuth-Morris-Pratt (Case study: Universitas Internasional Batam). JST (J. Sains Dan Teknol.) 2022, 11, 132–141. [Google Scholar] [CrossRef]
- Malvin, D.; Rangkuti, A.H. WhatsApp chatbot customer service using natural language processing and support vector machine. Int. J. Emerg. Technol. Adv. Eng. 2022, 12, 130–136. [Google Scholar] [CrossRef] [PubMed]
- Wirawan, K.T.; Sukarsa, I.M.; Bayupati, I.P.A. Balinese Historian Chatbot using Full-Text Search and Artificial Intelligence Markup Language Method. Int. J. Intell. Syst. Appl. 2019, 11, 21–34. [Google Scholar] [CrossRef]
- Candra, H.; Riki, R. Designing a Chatbot Application for Student Information Centers on Telegram Messenger Using Fulltext Search Boolean. bit-Tech 2019, 2, 71–80. [Google Scholar] [CrossRef]
- Mesut, A.; Öztürk, E. A method to improve full-text search performance of MongoDB. Pamukkale Üniversitesi Mühendislik Bilim. Derg. 2022, 28, 720–729. [Google Scholar] [CrossRef]
- Santiko, I.; Arifin, M. Implementation of smart communication BOT model using machine learning with the N-gram method. J. Multimed. Trend Technol. 2023, 2, 28–35. [Google Scholar] [CrossRef]
- Anbananthen, K.S.M.; Kannan, S.; Busst, M.M.A.; Muthaiyah, S.; Lurudusamy, S.N. Typographic error identification and correction in chatbot using N-gram overlapping approach. J. Syst. Manag. Sci. 2022, 12, 91–104. [Google Scholar]
- Ghude, T.; Chauhan, R.; Dahake, K.; Bhosale, A.; Ghorpade, T. N-gram models for Text Generation in Hindi Language. ITM Web Conf. 2022, 44, 03062. [Google Scholar] [CrossRef]
- Georgieva-Trifonova, T.; Duraku, M. Research on N-grams feature selection methods for text classification. In IOP Conference Series: Materials Science and Engineering, Proceedings of the International Conference on Technics, Technologies and Education 2020 (ICTTE 2020), Yambol, Bulgaria, 4–6 November 2020; IOP Publishing: Bristol, UK, 2021; Volume 1031. [Google Scholar] [CrossRef]
- Russell, S.J.; Norvig, P. Artificial Intelligence: A Modern Approach, 1st ed.; Prentice Hall: Englewood Cliffs, NJ, USA, 1995. [Google Scholar]
- Nursetyo, A.; Setiadi, D.R.I.M.; Subhiyakto, E.R. Smart Chatbot System for E-Commerce Assitance based on AIML. In Proceedings of the 2018 International Seminar on Research of Information Technology and Intelligent Systems (ISRITI), Yogyakarta, Indonesia, 21–22 November 2018; pp. 641–645. [Google Scholar] [CrossRef]
- Nugraha, K.A.; Sebastian, D. Designing consultation chatbot using Telegram API and webhook-based NodeJS applications. In Proceedings of the 7th International Conference on Education and Technology (ICET 2021), Malang, Indonesia, 18–19 September 2021. [Google Scholar]
- Parlika, R.; Pratama, A. The Online Test application uses Telegram Bots Version 1.0. In Journal of Physics: Conference Series, Proceedings of the International Conference on Science and Technology 2019, Surabaya, Indonesia, 17–18 October 2019; IOP Publishing: Bristol, UK, 2020; Volume 1569. [Google Scholar] [CrossRef]
- Thakkar, J.; Raut, P.; Doshi, Y.; Parekh, K. Erasmus AI Chatbot. Int. J. Comput. Sci. Eng. 2018, 6, 498–502. [Google Scholar] [CrossRef]
- Lee, S.; Lee, J.; Lee, W.; Lee, S.; Kim, S.; Kim, E.T. Design of Integrated Messenger Anti-virus System using Chatbot Service. In Proceedings of the 2020 International Conference on Information and Communication Technology Convergence (ICTC), Jeju, Republic of Korea, 21–23 October 2020; pp. 1613–1615. [Google Scholar] [CrossRef]
- Habib, A.; Satya, R.; Hariadi, B. Development of management information system rental service photography web-based using PHP native: Case study at PT Dwipa Photowork Surabaya. J. Mantik 2022, 6, 408–416. [Google Scholar]
- Walia, E.S.; Gill, E.S.K. A framework for web-based student record management system using PHP. Int. J. Comput. Sci. Mob. Comput. 2014, 3, 24–33. [Google Scholar]
- Kate, A.; Kamble, S.; Bodkhe, A.; Joshi, M. Conversion of Natural Language Query to SQL Query. In Proceedings of the 2018 Second International Conference on Electronics, Communication and Aerospace Technology (ICECA), Coimbatore, India, 29–31 March 2018; pp. 488–491. [Google Scholar] [CrossRef]
- Feuerstein, S.; Pribyl, B. Oracle PL/SQL Programming, 6th ed.; O’Reilly Media Inc.: Sebastopol, CA, USA, 2014. [Google Scholar]
- Widodo, W.; Susilowati, T.; Widianto; Maseleno, A. Web-Based Sales Information System of Sengon and Chocolate Seeds. Int. J. Res. Sci. Eng. 2022, 2, 26–47. [Google Scholar] [CrossRef]
- Permatahati, I.; Muqorobin, M. Computer Sales Forecasting System Application Using Web-Based Single Moving Average Method. IJCIS 2022, 3, 56–63. [Google Scholar] [CrossRef]
- Pustejovsky, J.; Stubbs, A. Natural Language Annotation for Machine Learning: A Guide to Corpus-Building for Applications; O’Reilly Media Inc.: Sebastopol, CA, USA, 2012. [Google Scholar]
- Gurusamy, V.; Kannan, S. Preprocessing techniques for text mining. In Proceedings of the National Conference on Recent Trends and Research Issues in Computer Science (RTRICS 2014), Bodinayakanur, India, 9–10 October 2014. [Google Scholar]
- Buana, P.W.; Sukarsa, I.M.; Purwania, I.B.G.; Prasetya, I.G.B.Y. Real Time Trans Bus Tracking and Passenger Information System using Hybrid Application Technology. Int. J. Softw. Eng. Its Appl. 2016, 10, 35–50. [Google Scholar] [CrossRef]
FTS and Bigram | FTS and Trigram | FTS and Fourgram | FTS and Fivegram | FTS | |
---|---|---|---|---|---|
TP | 46 | 78 | 87 | 83 | 84 |
FP | 1 | 1 | 1 | 1 | 1 |
FN | 49 | 17 | 8 | 12 | 11 |
TN | 4 | 4 | 4 | 4 | 4 |
Total Data | Average Time |
---|---|
100 | 00:00:19 |
200 | 00:00:35 |
300 | 00:00:52 |
400 | 00:01:09 |
500 | 00:01:25 |
600 | 00:01:42 |
700 | 00:01:59 |
800 | 00:02:16 |
900 | 00:02:30 |
1000 | 00:02:49 |
No. | Causes | Solution |
---|---|---|
1 | There are different meanings between the parameter and the searched menu. Example: “Tambah departemen” with “Buat Departemen”. |
|
2 | Greater number of unmatched words in search. Example: “Lihat Daftar Departemen Perusahaan” with “Lihat Departemen” | Addition of a search feature that automatically lowers the threshold when the previous threshold is not found. |
3 | Errors in typing when abbreviating words. Example: “Lht Departemen” | Addition of a word repair function. |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Sukarsa, I.M.; Witarsyah, D.; Bayupati, I.P.A.; Buana, P.W.; Wisswani, N.W.; Purnawan, I.K.A.; Setiawan, I.P.A.P.; Dana, I.P.N.K.; Krissayoga, I.W.D.E.; Prasetyo, E. N-Gram and Full-Text Search Algorithm Testing for Pattern Recognition in a Chatbot Engine. Eng. Proc. 2025, 107, 86. https://doi.org/10.3390/engproc2025107086
Sukarsa IM, Witarsyah D, Bayupati IPA, Buana PW, Wisswani NW, Purnawan IKA, Setiawan IPAP, Dana IPNK, Krissayoga IWDE, Prasetyo E. N-Gram and Full-Text Search Algorithm Testing for Pattern Recognition in a Chatbot Engine. Engineering Proceedings. 2025; 107(1):86. https://doi.org/10.3390/engproc2025107086
Chicago/Turabian StyleSukarsa, I Made, Deden Witarsyah, I Putu Agung Bayupati, Putu Wira Buana, Ni Wayan Wisswani, I Ketut Adi Purnawan, I Putu Adi Putra Setiawan, I Putu Ngurah Krisna Dana, I Wayan Darmika Esa Krissayoga, and Eko Prasetyo. 2025. "N-Gram and Full-Text Search Algorithm Testing for Pattern Recognition in a Chatbot Engine" Engineering Proceedings 107, no. 1: 86. https://doi.org/10.3390/engproc2025107086
APA StyleSukarsa, I. M., Witarsyah, D., Bayupati, I. P. A., Buana, P. W., Wisswani, N. W., Purnawan, I. K. A., Setiawan, I. P. A. P., Dana, I. P. N. K., Krissayoga, I. W. D. E., & Prasetyo, E. (2025). N-Gram and Full-Text Search Algorithm Testing for Pattern Recognition in a Chatbot Engine. Engineering Proceedings, 107(1), 86. https://doi.org/10.3390/engproc2025107086