Searching Sahih Hadiths Based on Queries using Neural Models and FastText
Abstract
Hadith is the second source of Islamic law after the Qur’an, and the availability of accurate and easily accessible information about hadith is crucial, as it directly affects a person’s belief (aqidah). This highlights the importance of having hadith collections as essential guidance in everyday life. Today, digital versions of hadiths are available in various applications, e-books, and websites. However, users often complain that these sources are incomplete and do not contain the entire collection of the Prophet's hadiths from al-Kutub as-Sittah. Additionally, the complex presentation of these digital resources makes it difficult to find relevant hadiths efficiently. This study aims to improve access to accurate and relevant hadith information, focusing specifically on al-Kutub as-Sittah, using Information Retrieval systems that search for hadiths based on keywords. IR is employed because it has proven effective in retrieving precise documents according to the search terms. A Neural Network is used to match user queries with the document collection, while FastText word embedding is implemented for text representation. FastText is particularly useful for detecting similar meanings across different words, which is essential when interpreting Indonesian-translated hadiths that require nuanced understanding. The dataset used in this study consists of 31,275 Indonesian-translated hadiths from al-Kutub as-Sittah. In this study, it was found that many hadith translations have ancient language so that query reformulation is needed to get the right hadith because users often enter commands with currently trending words. In this study, it was also found that word2vec has less performance than FastText in weighting words in hadith translations. The results indicate that the neural network performs well in retrieving relevant hadith content according to the user’s commands or keywords. With a training data proportion of 70% and a testing data proportion of 30%, the Recall value was 0.7721 and the Precision value was 0.75112.
Keywords
Full Text:
PDFReferences
T. Azhar, “HADITH ISNAD STUDY IN THE DISCOVERY OF ISLAMIC LAW (Critique of the Thoughts of Goldziher and Schacht),” Eduvest-Journal of Universal Studies, vol. 4, no. 05, 2024, [Online]. Available: http://eduvest.greenvest.co.id
D. Rasyid, A. D. Rasyid, A. Lubis, M. A. W. F. B. M. Balwi, and B. D. Rasyid, “The writing of hadith in the era of prophet muhammad A Critique on Harun Nasution’s Thought,” Al-Jami’ah, vol. 59, no. 1, pp. 191–220, 2021, doi: 10.14421/ajis.2021.591.191-220.
N. Suhaili, B. N. Fauzi, M. Hoque, K. A. Kadir, F. P. Quran, and D. Sunnah, “SPREADING HADITH MAUDHU’ VIA INFORMATION AND COMMUNICATION TECHNOLOGY: REASONS AND SUGGESTIONS,” Journal Of Hadith Studies, vol. 7, no. 1, pp. 2550–1488, 2022, doi: 10.26438/ijcse/v5i10.35135.
K. Jamal, A. Iman Mauliddin, and D. Bulan Dalimunthe, “The Implication of Asbabun Nuzul for Al-Quran Verses Interpretation,” Kawanua International Journal of Multicultural Studies, vol. 3, no. 1, pp. 12–17, 2022, doi: 10.30984/KIJMS.v3i1.
R. Abbas, “Nahwu Al Fiqh Al Jadid: Controversy Surrounding Jamal Al banna’s Thought About Hadith Narrated by the Companions of the Prophet,” Europan Journal for Philosophy of Religion, vol. 15, no. 3, pp. 331–345, 2023.
S. Noureddine, H. Adam, A. M. Abd, A. Sulyman, and N. Al-Makki, “Role of Family and Masjid in Preserving Morals and Thoughts from Pollution,” Social Science Journal, vol. 13, pp. 3520–3526, 2023.
M. Zulqarnain, R. Ghazali, Y. M. M. Hassim, and M. Rehan, “A comparative review on deep learning models for text classification,” Indonesian Journal of Electrical Engineering and Computer Science, vol. 19, no. 1, pp. 325–335, 2020, doi: 10.11591/ijeecs.v19.i1.pp325-335.
E. D. Sri Mulyani, N. Nelis Febriani Sm, A. Darmawan, R. A. Wiyono, R. Deli Saputra, and D. Rohpandi, “Keyword-Based Hadith Grouping Using Fuzzy C-Means Method,” in 2020 2nd International Conference on Cybernetics and Intelligent System, ICORIS 2020, Institute of Electrical and Electronics Engineers Inc., Oct. 2020. doi: 10.1109/ICORIS50180.2020.9320796.
J. Guo et al., “A Deep Look into Neural Ranking Models for Information Retrieval,” Journal of Information Processing and Management, Mar. 2019, [Online]. Available: http://arxiv.org/abs/1903.06902
Y. Hassan-Montero and V. Herrero-Solana, “Improving Tag-Clouds as Visual Information Retrieval Interfaces,” in International Conference on Multidisciplinary Information Sciences and Technologies, 2010.
P. Ansari, “Reigious Moderation in Caring for Indonesian Plurality (Analysis of Mental Revolution from The Qur’an Perspective),” International Journal of Academic Research, vol. 1, no. 1, pp. 55–62, 2023.
W. X. Zhao, J. Liu, R. Ren, and J.-R. Wen, “Dense Text Retrieval Based on Pretrained Language Models: A Survey,” ACM Trans Inf Syst, vol. 42, no. 4, pp. 1–60, Feb. 2024.
C. N. Tulu, “Experimental Comparison of Pre-Trained Word Embedding Vectors of Word2Vec, Glove, FastText for Word Level Semantic Text Similarity Measurement in Turkish,” Advances in Science and Technology Research Journal, vol. 16, no. 4, pp. 147–156, 2022, doi: 10.12913/22998624/152453.
Y. Zhu et al., “Large Language Models for Information Retrieval: A Survey,” New York, Aug. 2023. [Online]. Available: http://arxiv.org/abs/2308.07107
S. Bruch, C. Lucchese, and F. M. Nardini, “Efficient and Effective Tree-based and Neural Learning to Rank,” Foundations and Trends in Information Retrieval, vol. 17, no. 1, pp. 1–123, 2023, doi: 10.1561/1500000071.
H.-T. Nguyen, M.-K. Phi, X.-B. Ngo, V. Tran, L.-M. Nguyen, and M.-P. Tu, “Attentive Deep Neural Networks for Legal Document Retrieval,” Springer Nature, Dec. 2022, doi: 10.1007/s10506-022-09341-8.
G. Faggioli, T. Formal, S. Marchesin, S. Clinchant, N. Ferro, and B. Piwowarski, “Query Performance Prediction for Neural IR: Are We There Yet?,” in 45th European Conference on Information Retrieval, Dublin: ECIR, Apr. 2023, pp. 512–521.
S. E. Pratama, W. Darmalaksana, D. Sa’adillah Maylawati, H. Sugilar, T. Mantoro, and M. A. Ramdhani, “Weighted inverse document frequency and vector space model for hadith search engine,” Indonesian Journal of Electrical Engineering and Computer Science, vol. 18, no. 2, pp. 1004–1014, 2020, doi: 10.11591/ijeecs.v18.i2.pp1004-1014.
B. Sulistio, A. Ramadhan, E. Abdurachman, M. Zarlis, and A. Trisetyarso, “The utilization of machine learning on studying Hadith in Islam: A systematic literature review,” Educ Inf Technol, vol. 29, pp. 5381–5419, Dec. 2023.
A. Abdi, S. Hasan, M. Arshi, S. M. Shamsuddin, and N. Idris, “A question answering system in hadith using linguistic knowledge,” Comput Speech Lang, vol. 60, Mar. 2020, doi: 10.1016/j.csl.2019.101023.
Z. Abbasiantaeb and S. Momtazi, “Text-based question answering from information retrieval and deep neural network perspectives: A survey,” Nov. 01, 2021, John Wiley and Sons Inc. doi: 10.1002/widm.1412.
E. S. Qorina, A. Zamhari, H. Hasan, K. Hulliyah, and D. Saepudin, “Comparative Analysis of the Performance of the Fasttext and Word2vec Methods on the Semantic Similarity Query of Sirah Nabawiyah Information Retrieval System: A systematic literature review,” in 2020 8th International Conference on Cyber and IT Service Management, CITSM 2020, Institute of Electrical and Electronics Engineers Inc., Oct. 2020. doi: 10.1109/CITSM50537.2020.9268827.
A. Esteva et al., “COVID-19 information retrieval with deep-learning based semantic search, question answering, and abstractive summarization,” NPJ Digit Med, vol. 4, no. 1, Dec. 2021, doi: 10.1038/s41746-021-00437-0.
A. Aldoseri, K. N. Al-Khalifa, and A. M. Hamouda, “Re-Thinking Data Strategy and Integration for Artificial Intelligence: Concepts, Opportunities, and Challenges,” Jun. 01, 2023, MDPI. doi: 10.3390/app13127082.
I. H. Sarker, “Deep Learning: A Comprehensive Overview on Techniques, Taxonomy, Applications and Research Directions,” Nov. 01, 2021, Springer. doi: 10.1007/s42979-021-00815-1.
K. A. Hambarde and H. Proenca, “Information Retrieval: Recent Advances and Beyond,” Jan. 2023, doi: 10.1109/ACCESS.2023.3295776.
S. Namasudra, S. Dhamodharavadhani, and R. Rathipriya, “Nonlinear Neural Network Based Forecasting Model for Predicting COVID-19 Cases,” Neural Process Lett, vol. 55, no. 1, pp. 171–191, Feb. 2023, doi: 10.1007/s11063-021-10495-w.
M. M. Taye, “Theoretical Understanding of Convolutional Neural Network: Concepts, Architectures, Applications, Future Directions,” Mar. 01, 2023, MDPI. doi: 10.3390/computation11030052.
Z. Li, X. Yang, L. Zhou, H. Jia, and W. Li, “Text Matching in Insurance Question-Answering Community Based on an Integrated BiLSTM-TextCNN Model Fusing Multi-Feature,” Entropy, vol. 25, no. 4, Apr. 2023, doi: 10.3390/e25040639.
M. Ciaperoni, A. Gionis, and H. Mannila, “The Hadamard decomposition problem,” Data Min Knowl Discov, 2024, doi: 10.1007/s10618-024-01033-y.
N. Kaur and H. Aggarwal, “Query reformulation approach using domain specific ontology for semantic information retrieval,” International Journal of Information Technology, vol. 13, pp. 1745–1753, May 2020.
R. Kumar and S. C. Sharma, “Hybrid optimization and ontology-based semantic model for efficient text-based information retrieval,” Journal of Supercomputing, vol. 79, no. 2, pp. 2251–2280, Feb. 2023, doi: 10.1007/s11227-022-04708-9.
Y. Ramdhani, D. F. Apra, and D. P. Alamsyah, “Feature selection optimization based on genetic algorithm for support vector classification varieties of raisin,” Indonesian Journal of Electrical Engineering and Computer Science, vol. 30, no. 1, pp. 192–199, Apr. 2023, doi: 10.11591/ijeecs.v30.i1.pp192-199.
M. Yahya, D. Puyu, Ilyas, Z. Alwi, and Mujahid, “Comparative Critical Analysis of Methodologies for Establishing the Validity of Hadith Among Sunni and Shia,” International Journal of Religion, vol. 5, no. 6, pp. 777–792, Apr. 2024, doi: 10.61707/31ec2561.
Z.-Y. Dou and G. Neubig, “Word Alignment by Fine-tuning Embeddings on Parallel Corpora,” in Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, Jan. 2021. [Online]. Available: http://arxiv.org/abs/2101.08231
B. Yildiz and M. Tezgider, “Improving word embedding quality with innovative automated approaches to hyperparameters,” in Concurrency and Computation: Practice and Experience, John Wiley and Sons Ltd, Sep. 2021. doi: 10.1002/cpe.6091.
DOI: https://doi.org/10.47738/jads.v6i1.467
Refbacks
- There are currently no refbacks.

Journal of Applied Data Sciences
| ISSN | : | 2723-6471 (Online) |
| Publisher | : | Bright Publisher |
| Website | : | http://bright-journal.org/JADS |
| : | taqwa@amikompurwokerto.ac.id (principal contact) | |
| support@bright-journal.org (technical issues) |
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0




.png)