Datasets:

File size: 1,695 Bytes
46637ac
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---

license: openrail
language:
- ar
- en
tags:
- hadith
- islam
- religion
- arabic
size_categories:
- 100K<n<1M
---


# 📚 Comprehensive Hadith Dataset

Welcome to the **Comprehensive Hadith Dataset**. This repository contains a highly structured and categorized collection of Hadiths (Prophetic traditions), optimized for developers and AI researchers.

## 🗂 Dataset Structure

The dataset is divided into flexible structures to accommodate all use cases:

### 1. The Core Dataset (`all_hadiths.jsonl`)

- Contains all Hadiths in a single, flattened JSONL format.

- Perfect for NLP tasks, machine learning, and semantic search engines.

- Hugging Face automatically parses this for the Dataset Viewer.



### 2. By Category (`by_category/`)
- Contains Hadiths grouped by their specific topics (e.g., Purification, Prayer, Fasting).
- Ideal for developers building apps focused on specific Islamic topics.

### 3. Metadata and Indexes
- `categories_index.json` and `manifest.json` provide a complete tree of available categories.

## 🚀 How to Use (Python / AI)

You can load all Hadiths effortlessly using the datasets library:
```python

from datasets import load_dataset



dataset = load_dataset("Islamiccontent/Hadith-Dataset")

print(dataset['train'][0])

```

## 💻 How to Use (Web & Mobile Developers)
You can easily fetch specific category files directly via REST API:
```javascript

// Example: Fetch a specific category by its ID

const response = await fetch("https://huggingface.co/datasets/Islamiccontent/Hadith-Dataset/resolve/main/by_category/1.json");

const categoryData = await response.json();

console.log(categoryData);

```