Collaboration between Convolutional Neural Network and Semantic Search for English Hadith Search Using Automatic Topic Classification, TF-IDF, and Sentence-BERT
Abstract
This research was conducted with the intention of developing an English-language hadith search system that is not only syntactically accurate, but also contextually appropriate. The system was developed using a combination of convolutional neural networks (CNN) and two text representation methods, namely Term Frequency–Inverse Document Frequency (TF-IDF) and Sentence-BERT (SBERT). CNN is used to classify hadiths into seven main categories based on chapter titles. In the semantic retrieval stage, TF-IDF and SBERT were utilized to represent the text of the hadith and user queries, then both were evaluated using cosine similarity. Testing was conducted using five queries commonly used in Islamic studies, then evaluated manually for semantic similarity. As a result, the tuned CNN achieved a classification accuracy of 94%. On the other hand, although the TF-IDF approach produced greater similarity results, SBERT proved to be superior in generating more relevant results in semantic searches. These results indicate that TF-IDF is superior in terms of speed, but SBERT is better at understanding sentence context in depth. This research contributes to the development of a meaning-based hadith search system and emphasizes the importance of a semantic approach in religious text search. Moving forward, system development can be directed toward multilingual support and evaluation on a larger scale.
Downloads
References
M. Amin, “EASY STEPS TO SEARCH AND USE HADITH FOR THE GENERAL PUBLIC,” AQWAL Journal of Qur’an and Hadis Studies, vol. 3, no. 2, pp. 140–162, Jan. 2023, doi: 10.28918/aqwal.v3i2.3149.
K. I. Siregar, “Pelatihan Memahami Hadits ‘Hidupkanlah Saya Miskin’ dengan Metode Semantik di Pesantren Modern Nurul Huda-Cikarageman-Setu-Bekasi,” Satwika : Jurnal Pengabdian kepada Masyarakat, vol. 1, no. 1, pp. 1–5, Dec. 2021, doi: 10.21009/satwika.010101.
D. C. Hidayati, S. Al Faraby, and A. Adiwijaya, “Klasifikasi Topik Multi Label pada Hadis Shahih Bukhari Menggunakan K-Nearest Neighbor dan Latent Semantic Analysis,” JURIKOM (Jurnal Riset Komputer), vol. 7, no. 1, p. 140, Feb. 2020, doi: 10.30865/jurikom.v7i1.2013.
Yudi Widhiyasana, Transmissia Semiawan, Ilham Gibran Achmad Mudzakir, and Muhammad Randi Noor, “Penerapan Convolutional Long Short-Term Memory untuk Klasifikasi Teks Berita Bahasa Indonesia,” Jurnal Nasional Teknik Elektro dan Teknologi Informasi, vol. 10, no. 4, pp. 354–361, Nov. 2021, doi: 10.22146/jnteti.v10i4.2438.
B. Juarto and A. Suganda Girsang, “Neural Collaborative with Sentence BERT for News Recommender System,” JOIV : International Journal on Informatics Visualization, vol. 5, no. 4, p. 448, Dec. 2021, doi: 10.30630/joiv.5.4.678.
A. Ramadhani, N. Safaat, S. Agustian, I. Iskandar, and S. Sanjaya, “Perbandingan Performa Metode Klasifikasi Teks Multilabel Hadis Terjemahan Bukhari Menggunakan Support Vector Machine dan Long Short Term Memory,” MALCOM: Indonesian Journal of Machine Learning and Computer Science, vol. 5, no. 3, pp. 896–907, Jul. 2025, doi: 10.57152/malcom.v5i3.2051.
W. Darmalaksana, C. Slamet, W. B. Zulfikar, I. F. Fadillah, D. S. adillah Maylawati, and H. Ali, “Latent semantic analysis and cosine similarity for hadith search engine,” Telkomnika (Telecommunication Computing Electronics and Control), vol. 18, no. 1, pp. 217–227, Feb. 2020, doi: 10.12928/TELKOMNIKA.V18I1.14874.
I. Akbar, M. Faisal, and T. Chamidy, “Penerapan Long Short-Term Memory untuk Klasifikasi Multi-Label Terjemahan Al-Qur’an dalam Bahasa Indonesia,” Journal of Information Technology and Computer Science), vol. 9, no. 1, pp. 41–54, Jun. 2024, doi: 10.31328/jointecs.v8i1.5291.
E. T. Luthfi, Z. I. M. Yusoh, and B. M. Aboobaider, “Enhancing the Takhrij Al-Hadith based on Contextual Similarity using BERT Embeddings,” International Journal of Advanced Computer Science and Applications, vol. 12, no. 11, p. 2021, 2021, doi: 10.14569/IJACSA.2021.0121133.
M. Yuslan Abu Bakar and Adiwijaya, “KLASIFIKASI TEKS HADIS BUKHARI TERJEMAHAN INDONESIA MENGGUNAKAN RECURRENT CONVOLUTIONAL NEURAL NETWORK (CRNN),” Jurnal Teknologi Informasi dan Ilmu Komputer (JTIIK), vol. 8, no. 5, pp. 907–918, Oct. 2021, doi: 10.25126/jtiik.202183750.
D. Saputra, F. Firman, A. Rafika, and S. A. Yasti, “Historical Bacground Dan Manhaj Kepenulisan Kitab Al Jami’ Al Bukhari,” Ushuly: Jurnal Ilmu Ushuluddin, vol. 3, no. 1, pp. 37–54, Jan. 2024, doi: 10.52431/ushuly.v3i1.2321.
F. P. Utami, “ANALISIS KUALITAS HADIS RIWAYAT SHAHIH MUSLIM NO. 2700: KAJIAN SANAD DAN MATAN,” At-Thullab : Jurnal Mahasiswa Studi Islam, vol. 7, no. 1, Jan. 2025, doi: 10.20885/tullab.vol7.iss1.art9.
M. Lamba and M. Madhusudhan, “Text Pre-Processing,” in Text Mining for Information Professionals, Cham: Springer International Publishing, 2022, pp. 79–103. doi: 10.1007/978-3-030-85085-2_3.
M. U. Albab, Y. K. P., and M. N. Fawaiq, “Optimization of the Stemming Technique on Text Preprocessing President 3 Periods Topic,” Jurnal Transformatika, vol. 20, no. 2, pp. 1–12, Jan. 2023, doi: 10.26623/transformatika.v20i2.5374.
M. R. Athallah and K. M. Lhaksmana, “Hadith Text Classification Based on Topic Using Convolutional Neural Network (CNN) and TF-IDF,” Journal of Renewable Energy, Electrical, and Computer Engineering, vol. 5, no. 1, pp. 30–36, Mar. 2025, doi: 10.29103/jreece.v5i1.20354.
C. C. Aggarwal, Neural Networks and Deep Learning : a Textbook. Cham: Springer International Publishing, 2018. doi: 10.1007/978-3-319-94463-0.
Ž. Vujović, “Classification Model Evaluation Metrics,” International Journal of Advanced Computer Science and Applications, vol. 12, no. 6, pp. 599–606, 2021, doi: 10.14569/IJACSA.2021.0120670.
A. H. Dani and E. Y. Puspaningrum, “Studi Performa TF-IDF dan Word2Vec Pada Analisis Sentimen Cyberbullying,” Router : Jurnal Teknik Informatika dan Terapan, vol. 2, no. 2, pp. 94–106, 2024, doi: 10.62951/router.v2i2.76.
O. Galal, A. H. Abdel-Gawad, and M. Farouk, “Rethinking of BERT sentence embedding for text classification,” Neural Comput Appl, vol. 36, no. 32, pp. 20245–20258, Nov. 2024, doi: 10.1007/s00521-024-10212-3.
M. A. Rifai and I. G. Anugrah, “Semantic Search for Scientific Articles by Language Using Cosine Similarity Algorithm and Weighted Tree Similarity,” Journal of Development Research, vol. 5, no. 2, pp. 106–114, Nov. 2021, doi: 10.28926/jdr.v5i2.150.
D. W. Eller, “Transparency and the future of semantic searching in academic libraries,” Inf Serv Use, vol. 42, no. 3–4, pp. 453–461, Aug. 2022, doi: 10.3233/ISU-220175.
Bila bermanfaat silahkan share artikel ini
Berikan Komentar Anda terhadap artikel Collaboration between Convolutional Neural Network and Semantic Search for English Hadith Search Using Automatic Topic Classification, TF-IDF, and Sentence-BERT
Pages: 2017-2024
Copyright (c) 2025 Akmal Sidki Razaka, Kemas Muslim Lhaksmana

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (Refer to The Effect of Open Access).





















