dalil / README.md
Alkanani's picture
dalil data: books, search databases, catalog, recipe
a4cda7e
|
Raw History Blame Contribute Delete
5.32 kB
---
language:
- ar
pretty_name: dalil
license: other
viewer: false
task_categories:
- text-retrieval
- question-answering
size_categories:
- 100K<n<1M
tags:
- islamic
- islamic-rag
- rag
- quran
- hadith
- sunnah
- tafsir
- tafseer
- fiqh
- aqeedah
- seerah
- arabic
- islamic-texts
- retrieval
- semantic-search
- embeddings
- faiss
- bm25
---
# dalil data
The books and search databases of **dalil** (دليل, "evidence"), a search system
over classical Islamic texts in Arabic: the Quran, hadith collections, tafsir,
fiqh, aqeedah and seerah. The code that reads this data is on GitHub:
[abdallah-alkanani/dalil](https://github.com/abdallah-alkanani/dalil).
## What it holds
- 542 books by 37 authors, plus the Quran and al-Ahadith al-Qudsiyya
- 349,633 parents (the passages that are shown and cited)
- 927,744 retrieval views (the chunks that are embedded and searched)
- Vectors from Qwen3-Embedding-8B, 4,096 dimensions, in an exact FAISS
`IndexFlatIP`
| category | books | views |
|---|---:|---:|
| hadith | 100 | 461,950 |
| fiqh | 168 | 256,556 |
| aqeedah | 183 | 108,019 |
| tafsir | 58 | 70,487 |
| seerah | 12 | 22,213 |
| quran | 1 | 6,236 |
| fiqh_usul | 20 | 2,283 |
## The books
- **ابن تيمية** (119 books): مجموع الفتاوى، جامع المسائل - المجموعة الرابعة، منهاج السنة النبوية، مجموعة الرسائل والمسائل - ط وهبة، and 115 more
- **ابن عثيمين** (108 books): فتاوى نور على الدرب للعثيمين، مجموع فتاوى ورسائل العثيمين، لقاء الباب المفتوح، اللقاء الشهري، and 104 more
- **الألباني** (107 books): صحيح وضعيف الجامع الصغير، تفريغ «سلسلة الهدى والنور» للشيخ الألباني - الإصدار 4، صحيح الجامع الصغير وزيادته، التعليقات الحسان على صحيح ابن حبان، and 103 more
- **ابن القيم** (61 books): إعلام الموقعين عن رب العالمين ت مشهور، التبيان في أيمان القرآن ط عالم الفوائد، الطرق الحكمية في السياسة الشرعية ط عالم الفوائد، التفسير القيم لابن القيم، and 57 more
- **ابن باز** (60 books): فتاوى نور على الدرب لابن باز، فتاوى الدروس لابن باز، مجموع فتاوى ومقالات متنوعة - ابن باز، فتاوى نور على الدرب لابن باز - بعناية الشويعر، and 56 more
- **وليد السعيدان** (50 books): تلخيص مسائل الحج على القول الراجح، تمام المنة ببعض ما اتفق عليه أهل السنة، إتحاف أهل الألباب بمعرفة التوحيد والعقيدة في سؤال وجواب، الشرح المبدي جمال منظومة الشيخ ابن سعدي، and 46 more
- **The Quran and the hadith collections:** القرآن الكريم، صحيح البخاري، صحيح مسلم، سنن أبي داود، جامع الترمذي، سنن النسائي، سنن ابن ماجه، موطأ مالك، مسند أحمد، الأربعون النووية، الأحاديث القدسية
- **Tafsir:** تفسير ابن كثير، جامع البيان (الطبري)، الجامع لأحكام القرآن (القرطبي)، التحرير والتنوير (ابن عاشور)
- and 22 more books by other scholars
The full list, scholar by scholar, is in [docs/books.md](https://github.com/abdallah-alkanani/dalil/blob/main/docs/books.md).
## Layout
| path | size | what it is |
|---|---:|---|
| `db/dense_faiss_ar.index` | 15.2 GB | FAISS index; row *n* is the view in row *n* of `child_metadata` |
| `db/faiss_metadata.sqlite` | 5.9 GB | table `child_metadata`: one row per view (view id, parent id, book, section, text, embedding text) |
| `db/parents.sqlite` | 5.5 GB | table `parents`: one row per parent (citation, section path, references, original text, page number where the source has one) |
| `db/bm25.sqlite` | 3.2 GB | FTS5 keyword index over the views (`child_fts`) |
| `db/BUILD_REPORT.json` | | counts and checks from the build |
| `books/original/` | 1.0 GB | every book in its original form, one folder per author and per book (Arabic names) |
| `books/cleaned/` | 886 MB | every book's full cleaned text, one `.txt` per book, in the same folders as `books/original/` |
| `catalog/` | 66 MB | `library/<scholar>/<book>/<book>.json`: one card per book (title, scholar, category, source, its folder in `books/original/`, its file in `books/cleaned/`, passage and chunk counts); `hadith/`: the al-Albani grade tables of the four Sunan |
| `recipe/` | 9 MB | what a rebuild needs besides the books: which books to use, how each is cut, the al-Albani grades of the four Sunan |
## Using it with the dalil code
Clone the code, then download everything except `recipe/` into the code's `data/` folder, and
`recipe/` into the code's root folder:
```bash
hf download Alkanani/dalil --repo-type dataset --exclude "recipe/*" --local-dir data
hf download Alkanani/dalil --repo-type dataset --include "recipe/*" --local-dir .
```
Then search with `python -m dalil.s8_search "<question>"`.