The Holy Book of Quran is believed to be the literal word of God (Allah) as revealed to the Prophet Muhammad (PBUH) over a period of approximately 23 years. It is the book where God provides guidance on how to live a righteous and just life, emphasizing principles like honesty, compassion, charity and justice, as well as providing rules for personal conduct, family matters, business ethics and much more. However, due to constraints related to the language and the Quran organization, it is challenging for Muslims to get all relevant ayahs (verses) pertaining to a matter or inquiry of interest. Hence, we developed a Quran semantic search tool which finds the verses pertaining to the user inquiry or prompt. To achieve this, we trained several models on a large dataset of over 30 tafsirs, where typically each tafsir corresponds to one verse in the Quran and, using cosine similarity, obtained the tafsir tensor which is most similar to the prompt tensor of interest, which was then used to index for the corresponding ayah in the Quran. Using the SNxLM model, we were able to achieve a cosine similarity score as high as 0.97 which corresponds to the abdu tafsir for a verse relating to financial matters.
翻译:《古兰经》被认为是真主(安拉)降示给先知穆罕默德(愿主福安之)历时约23年的真言。这部经典指导人们如何过正直公正的生活,强调诚实、怜悯、慈善和正义等原则,并为个人行为、家庭事务、商业道德等诸多方面提供规范。然而,由于语言和《古兰经》编排方式的限制,穆斯林难以获取与特定主题或查询相关的所有经文。为此,我们开发了一款《古兰经》语义搜索工具,能够找出与用户查询或提示相关的经文。为了实现这一目标,我们在包含30多部经注的大规模数据集上训练了多个模型(通常每部经注对应《古兰经》中的一节经文),并利用余弦相似度计算与用户提示张量最相似的经注张量,再以此索引对应的经文。使用SNxLM模型后,我们获得了高达0.97的余弦相似度得分,该得分对应的是涉及财务事务的相关经文的阿卜杜勒经注。