juz int64 1 30 | juz_name_arabic stringclasses 30
values | juz_name_english stringclasses 30
values | surah_number int64 1 114 | surah_name_arabic stringclasses 114
values | surah_name_english stringclasses 114
values | revelation_location stringclasses 4
values | aya_number int64 1 286 | english_translation stringlengths 6 1.73k | arabic_diacritics stringlengths 2 1.18k | arabic_clean stringlengths 2 721 | arabic_words_count int64 1 145 | arabic_letters_count int64 2 577 | embedding sequencelengths 1.54k 1.54k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | الم | Alif Lam Meem | 1 | الفاتحة | Al-Fatiha | Makki | 1 | In the name of Allah, Most Gracious, Most Merciful. | بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ | بسم الله الرحمن الرحيم | 4 | 19 | [
-0.020303316414356003,
-0.015722380951046,
-0.020747451111674,
-0.022295579314231,
-0.013565152883529,
0.024770045652985,
-0.006598577834665001,
-0.0059989956207570005,
-0.0034896326251320003,
-0.020189110189676,
0.033779643476009,
0.009929590858519001,
0.001368094584904,
-0.01551934797316... |
1 | الم | Alif Lam Meem | 1 | الفاتحة | Al-Fatiha | Makki | 2 | Praise be to Allah, the Cherisher and Sustainer of the worlds; | الْحَمْدُ لِلَّهِ رَبِّ الْعَالَمِينَ | الحمد لله رب العالمين | 4 | 18 | [
-0.012234834954142002,
-0.010637352243065001,
-0.009672597981989,
-0.02668735012412,
-0.016526110470294002,
0.019570723176002003,
-0.019357725977897002,
-0.015185478143393001,
-0.010317855514585,
-0.018230091780424,
0.018355384469032003,
-0.0032027952838680003,
-0.019896484911441,
0.005365... |
1 | الم | Alif Lam Meem | 1 | الفاتحة | Al-Fatiha | Makki | 3 | Most Gracious, Most Merciful; | الرَّحْمَٰنِ الرَّحِيمِ | الرحمن الرحيم | 2 | 12 | [
-0.016420759260654002,
-0.010813985019922001,
-0.008951504714787001,
-0.033047743141651,
-0.009731297381222,
0.033228192478418,
-0.000308332295389,
-0.013250031508505001,
-0.018753692507743003,
-0.023793345317244002,
0.031810387969017,
0.027763199061155003,
0.000005154395694262348,
-0.0171... |
1 | الم | Alif Lam Meem | 1 | الفاتحة | Al-Fatiha | Makki | 4 | Master of the Day of Judgment. | مَالِكِ يَوْمِ الدِّينِ | مالك يوم الدين | 3 | 12 | [
-0.0013369431253520002,
-0.0023592114448540004,
-0.015580660663545002,
-0.012981615960597001,
-0.008838112466037001,
0.013866107910871001,
-0.016859771683812003,
-0.013396646827459,
-0.018479071557521,
-0.00479666609317,
0.031188536435365004,
0.0030974217224860002,
-0.000710995227564,
0.00... |
1 | الم | Alif Lam Meem | 1 | الفاتحة | Al-Fatiha | Makki | 5 | Thee do we worship, and Thine aid we seek. | إِيَّاكَ نَعْبُدُ وَإِيَّاكَ نَسْتَعِينُ | إياك نعبد وإياك نستعين | 4 | 19 | [
0.0005604324978770001,
-0.00040703825652500006,
0.0060971193015570005,
-0.032595269381999005,
-0.010113552212715001,
0.034141290932893004,
0.004853860940784,
0.00676384055987,
-0.003336827969178,
0.002860138192772,
0.010319688357412002,
-0.00006914819095982239,
0.016890276223421,
-0.010880... |
1 | الم | Alif Lam Meem | 1 | الفاتحة | Al-Fatiha | Makki | 6 | Show us the straight way, | اهْدِنَا الصِّرَاطَ الْمُسْتَقِيمَ | اهدنا الصراط المستقيم | 3 | 19 | [
-0.0031512801069760003,
-0.015912845730781,
-0.014648503623902001,
-0.006347259040921,
0.000900365703273,
0.040816579014062,
-0.002739410614594,
0.017854060977697,
-0.00951450318098,
0.00458164839074,
0.0014630942605430002,
-0.005127614829689001,
0.006516476627439,
-0.010580893605947,
0.... |
1 | الم | Alif Lam Meem | 1 | الفاتحة | Al-Fatiha | Makki | 7 | "The way of those on whom Thou hast bestowed Thy Grace, those whose (portion) is not wrath, and who (...TRUNCATED) | "صِرَاطَ الَّذِينَ أَنْعَمْتَ عَلَيْهِمْ غَيْرِ الْمَ(...TRUNCATED) | صراط الذين أنعمت عليهم غير المغضوب عليهم ولا الضالين | 9 | 44 | [-0.016664648428559,-0.024606395512819002,0.0019480063347140002,-0.0020375137683000004,-0.0148419532(...TRUNCATED) |
1 | الم | Alif Lam Meem | 2 | البقرة | Al-Baqara | Medani | 1 | A. L. M. | الم | الم | 1 | 3 | [-0.004140386823564,-0.018272001296281003,-0.022819640114903002,-0.02439434453845,-0.013805814087390(...TRUNCATED) |
1 | الم | Alif Lam Meem | 2 | البقرة | Al-Baqara | Medani | 2 | This is the Book; in it is guidance sure, without doubt, to those who fear Allah; | "ذَٰلِكَ الْكِتَابُ لَا رَيْبَ ۛ فِيهِ ۛ هُدًى لِلْمُت(...TRUNCATED) | ذلك الكتاب لا ريب ۛ فيه ۛ هدًى للمتقين | 9 | 30 | [0.008003712631762,0.006894608028233,-0.01879640109837,-0.010170033201575,-0.000444695731857,0.01928(...TRUNCATED) |
1 | الم | Alif Lam Meem | 2 | البقرة | Al-Baqara | Medani | 3 | "Who believe in the Unseen, are steadfast in prayer, and spend out of what We have provided for them(...TRUNCATED) | "الَّذِينَ يُؤْمِنُونَ بِالْغَيْبِ وَيُقِيمُونَ الصّ(...TRUNCATED) | "الذين يؤمنون بالغيب ويقيمون الصلاة ومما رزقناهم ينفقو(...TRUNCATED) | 8 | 47 | [0.013152565807104001,-0.014770119450986002,-0.001990452641621,0.0036991590168320002,0.0028323759324(...TRUNCATED) |
Quran Embeddings Dataset
This repository contains vector embeddings for the Holy Quran, generated using OpenAI's embedding model. These embeddings can be used for semantic search, question answering, and other natural language processing tasks related to Quranic text.
Dataset Information
The dataset consists of a single JSON file:
quran_embeddings.json: Contains embeddings for each verse (ayah) of the Quran with associated metadata
Metadata Structure
Each verse embedding includes the following metadata:
- Surah (chapter) name
- Surah number
- Ayah (verse) number
- Juz number
- Revelation location (Meccan/Medinan)
- Original Arabic text
- English translation
Usage Example
The embeddings can be loaded into a vector database like Chroma for similarity search:
from langchain.vectorstores import Chroma
from langchain.embeddings import OpenAIEmbeddings
from langchain.schema import Document
import json
# Load the embeddings
with open("quran_embeddings.json", "r", encoding="utf-8") as f:
quran_data = json.load(f)
documents = []
for verse in quran_data:
content = verse.get("english_translation", "")
metadata = {
"type": "quran",
"surah": verse.get("surah_name"),
"surah_number": verse.get("surah_number"),
"ayah_number": verse.get("ayah_number"),
"juz_number": verse.get("juz_number"),
"revelation": verse.get("revelation_type"),
"arabic": verse.get("arabic_text"),
}
documents.append(Document(page_content=content, metadata=metadata))
# Initialize embedding function
embedding_function = OpenAIEmbeddings()
# Create vector database
db = Chroma(
collection_name="quran_collection",
embedding_function=embedding_function,
persist_directory="./db"
)
# Add documents to the database (if not already added)
db.add_documents(documents)
# Example query
results = db.similarity_search("What does the Quran say about patience?", k=3)
Credits
This dataset builds upon the work from QuranGPT by Hazem Abdelkawy. The original project aims to make Islamic texts more accessible through natural language processing technologies.
License
These embeddings are provided for research, educational, and non-commercial purposes. Please respect the sanctity of the Quranic text when using this dataset.
- Downloads last month
- 20