Skip to content
/ quranic Public

Semantic search on Quran and Hadith using sentence embeddings

Notifications You must be signed in to change notification settings

kyb3r/quranic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quran and Hadith Semantic Search

Using sentence embeddings to perform semantic text search on Quran and Hadith translations

In this project I used a variety of sentence embedding models to generate embeddings for each verse/hadith. You can then easily search through the embeddings by checking vector similarity with a query. The best performing model was Instructor Embedding.

from quranic.corpus import SearchEngine

quran = SearchEngine("quran")

scores, verses = quran.search(query, k=5)
for verse in verses:
    print(f"Surah {verse.surah.name}\n  {verse}\n")

Installation

pip install git+https://github.com/kyb3r/quranic

About

Semantic search on Quran and Hadith using sentence embeddings

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages