Enhancing Quranic Ethics and Morality: An NLP- Based Semantic Search Model for Urdu Translation

Authors

  • Yasir Aftab Department of Computer Science, Allama Iqbal Open University (AIOU), Islamabad.
  • Dr. Muhammad Arshad Awan Department of Computer Science, Allama Iqbal Open University (AIOU), Islamabad. https://orcid.org/0000-0002-3351-9664
  • Danish Khaleeq Department of Computer Science, Allama Iqbal Open University (AIOU), Islamabad https://orcid.org/0009-0000-6961-4922
  • Tehmima ismail Department of Computer Science, Allama Iqbal Open University (AIOU), Islamabad

Keywords:

Ethics in Quran, Islamic Morality, Urdu Quran Translation, Urdu NLP, Text Analysis

Abstract

The Quran offers unparalleled guidance on ethics and morality, but extracting relevant teachings from its Urdu translations remains a challenge due to conventional keyword-based search methods that lack contextual understanding. This research proposes a Natural Language Processing (NLP)--based query model designed to improve the retrieval of Quranic verses related to ethics and morality in Urdu translations. By integrating Sentence Transformers for semantic search and a custom synonym expansion module, the model enhances accuracy and relevance in retrieving verses. The dataset widely accepted Urdu translation of the Quran, and the system is evaluated using precision, recall, and relevance scoring metrics to ensure effectiveness. The study demonstrates how NLP techniques can bridge the gap between traditional Quranic studies and modern computational methods, providing scholars, educators, and researchers with an advanced tool for exploring Quranic ethics. The proposed system achieves high precision and recall, offering a more effective approach to Quranic verse retrieval compared to conventional keyword-based searches. The research also highlights future opportunities for expanding the model to support multiple languages and broader thematic searches, further enhancing accessibility to Quranic knowledge.

References

O. Ahmed, “Semantic search engine for the holy Quran,” Theseus J., 2023, [Online]. Available: https://www.theseus.fi/bitstream/handle/10024/855111/Ahmed_Omar.pdf;jsessionid=7C1EE5DF915E3B72370EA6CA0DB45189?sequence=2

J. Devlin, M. W. Chang, K. Lee, and K. Toutanova, “BERT: Pre-training of deep bidirectional transformers for language understanding,” NAACL HLT 2019 - 2019 Conf. North Am. Chapter Assoc. Comput. Linguist. Hum. Lang. Technol. - Proc. Conf., vol. 1, pp. 4171–4186, 2019.

E. Alshammeri, A., & Atwell, “Detecting Semantic-based Similarity Between Verses of The Quran,” Proc. 12th Int. Conf. Lang. Resour. Eval. (LREC 2020), 2020.

Zaigham Khaleeq, “Exploring Contextual Similarity in Quranic Ayahs: A Case Study of Surah Al-Baqarah and Aal-e-Imran in Urdu Translations,” Int. J. Innov. Sci. Technol., 2025, [Online]. Available: https://www.researchgate.net/publication/389624795_Exploring_Contextual_Similarity_in_Quranic_Ayahs_A_Case_Study_of_Surah_Al-Baqarah_and_Aal-e-Imran_in_Urdu_Translations

T. Abbasi, K. M., Awan, M. A., & Ismail, “A Deep Learning Approach to Semantic Clarity in Urdu Translations of the Holy Quran,” Int. J. Innov. Sci. Technol., vol. 7, no. 1, pp. 259–271, 2025, [Online]. Available: https://www.researchgate.net/publication/389676054_A_Deep_Learning_Approach_to_Semantic_Clarity_in_Urdu_Translations_of_the_Holy_Quran

D. Tariq, M., Awan, D. M. A., & Khaleeq, “Developing a Quranic QA System: Bridging Linguistic Gaps in Urdu Translation Using NLP and Transformer Model,” Int. J. Innov. Sci. Technol., vol. 7, no. 1, pp. 492–505, 2025, [Online]. Available: https://journal.50sea.com/index.php/IJIST/article/view/1216

M. I. Tania Afzal, Sadaf Abdul Rauf, Muhammad Ghulam Abbas Malik, “Fine-Tuning QurSim on Monolingual and Multilingual Models for Semantic Search,” Information, vol. 16, no. 2, p. 84, 2025, doi: https://doi.org/10.3390/info16020084.

E. H. Mohamed and E. M. Shokry, “QSST: A Quranic Semantic Search Tool based on word embedding,” J. King Saud Univ. - Comput. Inf. Sci., vol. 34, no. 3, pp. 934–945, 2022, doi: https://doi.org/10.1016/j.jksuci.2020.01.004.

S. A. Shohoud, Y., M. Shoman, “Quranic Conversations: Developing a Semantic Search Tool for the Quran Using Arabic NLP Techniques,” arXiv, 2023, [Online]. Available: https://doi.org/10.48550/arXiv.2311.05120

Mohammed Alqarni, “Embedding Search for Quranic Texts based on Large Language Models,” Int. Arab J. Inf. Technol., vol. 21, no. 2, 2024, [Online]. Available: https://iajit.org/upload/files/Embedding-Search-for-Quranic-Texts-based-on-Large-Language-Models.pdf

U. S. Ameer Hamza,Shengbing Ren, “ET-Network: A novel efficient transformer deep learning model for automated Urdu handwritten text recognition,” PLoS One, 2024, doi: https://doi.org/10.1371/journal.pone.0302590.

M. A. N. Musa Dildar Ahmed Cheema, Mohammad Daniyal Shaiq, Farhaan Mirza, Ali Kamal, “Adapting multilingual vision language transformers for low-resource Urdu optical character recognition (OCR),” PeerJ Comput. Sci., 2024, [Online]. Available: https://peerj.com/articles/cs-1964/

G. Butt, U., Veranasi, S., & Neumann, “Enabling Low-Resource Language Retrieval: Establishing Baselines for Urdu MS MARCO,” arXiv Prepr. arXiv2412.12997., 2024, [Online]. Available: https://arxiv.org/abs/2412.12997

D. E. Z. Faiza Beirade, Hamid Azzoune, “Semantic query for Quranic ontology,” J. King Saud Univ. - Comput. Inf. Sci., vol. 33, no. 6, pp. 753–760, 2021, doi: https://doi.org/10.1016/j.jksuci.2019.04.005.

R. I. and R. A. Ahmad M. Mustafa, Saja Nakhleh, “INTERPRETING ARABIC TRANSFORMER MODELS: A STUDY ON XAIINTERPRETABILITY FOR QUR’ANIC SEMANTIC-SEARCH MODELS,” Jordanian J. Comput. Inf. Technol., vol. 10, no. 4, 2024, [Online]. Available: https://www.ejmanager.com/mnstemps/71/71-1704878720.pdf?t=1743150831

F. N. Muhammad Afifi Mohamad Safee, Madihah Mohd Saudi, Sakinah A. Pitchay, Farida Ridzuan, Nurlida Basir, Kamarudin Saadan, “Hybrid Search Approach for Retrieving Medical and Health Science Knowledge from Quran,” Int. J. Eng. Technol., vol. 7, no. 4, 2018, doi: https://doi.org/10.14419/ijet.v7i4.15.21374.

Ezieddin Elmahjub, “Artificial Intelligence (AI) in Islamic Ethics: Towards Pluralist Ethical Benchmarking for AI,” Philos. Technol., vol. 36, no. 73, 2023, doi: https://doi.org/10.1007/s13347-023-00668-x.

N. M. M. Tajudin Zuhri, Lalan Sahlani, “The Ethics of Artificial Intelligence (AI) Utilization in Qur’anic Studies: An Islamic Philosophical Perspective,” Asyahid J. Islam. Quranic Stud., vol. 6, no. 2, 2024, doi: https://doi.org/10.62213/b6hexr21.

M. Umair, M. B., & Kiran, “Artificial Intelligence and the Study of Seerah: Computational analysis, Educational Innovation, and Ethical Frameworks,” Islam. Res. J. {المرصوص, vol. 3, no. 2, 2025, [Online]. Available: https://al-marsoos.com/index.php/AMRJ/article/view/67

W. Arif, M., Irfan, S., Shaoan, M. M. R., & Ali, “AI And Machine Learning in Islamic Guidance: Opportunities, Ethical Considerations, And Future Directions,” Guidance, vol. 02, no. 2, pp. 429–451, 2024, doi: 10.34005/guidance.v21i02.4449.

A. ’Aatieff B. A. H. Nurul Aiman Binti Mohd Nazri, A’wathif Binti Omar, “Fine-tuning Large Language Model (BERT) for Islamic Moral Inquiry and Response,” Int. J. Perceptive Cogn. Comput., vol. 11, no. 1, pp. 88–94, 2025, doi: https://doi.org/10.31436/ijpcc.v11i1.533.

Ben Hutchinson, “Modeling the Sacred: Considerations when Using Religious Texts in Natural Language Processing,” Assoc. Comput. Linguist., pp. 1029–1043, 2024, doi: 10.18653/v1/2024.findings-naacl.65.

M. A. Lal, M., Kumar, K., Wagan, A. A., Laghari, A. A., Khuhro, M. A., Saeed, U., ... & Chahjro, “A systematic study of Urdu language processing its tools and techniques: A review,” Int. J. Eng. Res. Technol., vol. 9, no. 12, pp. 37–43, 2020, [Online]. Available: https://www.researchgate.net/publication/346787682_A_Systematic_Study_of_Urdu_Language_Processing_its_Tools_and_Techniques_A_Review

K. B. Burney, S. A., & Muhammad, “Advancements and Applications of Urdu Natural Language Processing: A Comprehensive Review with Emphasis on Sentiment Analysis,” J. Inf. Commun. Technol., vol. 18, no. 1, 2024, [Online]. Available: https://jict.ilmauniversity.edu.pk/arc/Vol18/i1p1

M. A. Qureshi et al, “Sentiment Analysis of Reviews in Natural Language: Roman Urdu as a Case Study,” IEEE access, vol. 10, pp. 24945–24954, 2022, doi: 10.1109/ACCESS.2022.3150172.

R. A.-S. Harrag, F., A. Al-Nasser, A. Al-Musnad, “Quran Intelligent Ontology Construction Approach Using Association Rules Mining,” arXiv, 2020.

Y. K. O. & N. H. A. J. Ahmed Samir Ahmed Ibrahim El khadrawy, Safia Abbas, “Extracting Semantic Relationship Between Fatiha Chapter (Sura) and the Holy Quran,” Proc. 8th Int. Conf. Adv. Intell. Syst. Informatics 2022, pp. 612–626, 2022, doi: https://doi.org/10.1007/978-3-031-20601-6_50.

A. M. Alashqar, “A Classification of Quran Verses Using Deep Learning,” Int. J. Comput. Digit. Syst., vol. 16, no. 1, pp. 1041–1053, Jul. 2024, doi: 10.12785/IJCDS/160176.

D I A Putra and M Yusuf, “Proposing machine learning of Tafsir al-Quran: In search of objectivity with semantic analysis and Natural Language Processing,” IOP Conf. Ser. Mater. Sci. Eng., vol. 1098, 2021, doi: 10.1088/1757-899X/1098/2/022101.

Downloads

Published

2025-03-30

How to Cite

Aftab, Y., Arshad Awan, M., KHALEEQ, D., & Ismail, T. (2025). Enhancing Quranic Ethics and Morality: An NLP- Based Semantic Search Model for Urdu Translation. International Journal of Innovations in Science & Technology, 7(1), 651–663. Retrieved from https://journal.50sea.com/index.php/IJIST/article/view/1255