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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
- fr
|
| 5 |
+
- ar
|
| 6 |
+
license: cc-by-nc-4.0
|
| 7 |
+
task_categories:
|
| 8 |
+
- text-retrieval
|
| 9 |
+
- text-classification
|
| 10 |
+
pretty_name: QESC - Quranic Emotional Situation Corpus
|
| 11 |
+
size_categories:
|
| 12 |
+
- n<1K
|
| 13 |
+
tags:
|
| 14 |
+
- Islamic education
|
| 15 |
+
- emotional support
|
| 16 |
+
- children
|
| 17 |
+
- Arabic
|
| 18 |
+
- Moroccan Darija
|
| 19 |
+
- NLP
|
| 20 |
+
- retrieval
|
| 21 |
+
- CASS
|
| 22 |
+
- prophet stories
|
| 23 |
+
- emotional intensity
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+
# QESC — Quranic Emotional Situation Corpus
|
| 27 |
+
|
| 28 |
+
## Dataset Description
|
| 29 |
+
|
| 30 |
+
**QESC** is the first structured corpus of Quranic prophet situational scenes annotated for emotional intensity and narrative resolution type, designed for child-facing emotional support retrieval in multilingual contexts (English, French, Moroccan Darija).
|
| 31 |
+
|
| 32 |
+
The corpus supports the **CASS (Context-Aware Semantic Similarity)** framework — a lightweight safety-aware retrieval system that matches a child's free-text emotional expression to the most contextually appropriate prophet story, while preventing emotionally dangerous mismatches.
|
| 33 |
+
|
| 34 |
+
- **Paper:** *CASS: A Context-Aware Semantic Similarity Framework for Safe Retrieval in Child-Facing Educational Applications* (Sadouk and Gadi)
|
| 35 |
+
- **GitHub:** [https://github.com/lamyaa/CASS](https://github.com/lamyaa/CASS)
|
| 36 |
+
- **Application:** Ya Allah — Islamic children's emotional support app
|
| 37 |
+
|
| 38 |
+
---
|
| 39 |
+
|
| 40 |
+
## Dataset Summary
|
| 41 |
+
|
| 42 |
+
| Property | Value |
|
| 43 |
+
|---|---|
|
| 44 |
+
| Total entries | 100 |
|
| 45 |
+
| Quranic figures covered | 26 |
|
| 46 |
+
| EI scale | 1–5 (mild → severe) |
|
| 47 |
+
| RT scale | 1–3 (immediate → delayed) |
|
| 48 |
+
| Primary language | English |
|
| 49 |
+
| Additional languages | Arabic (names), French, Moroccan Darija (paraphrases) |
|
| 50 |
+
| License | CC BY-NC 4.0 |
|
| 51 |
+
|
| 52 |
+
---
|
| 53 |
+
|
| 54 |
+
## Supported Tasks
|
| 55 |
+
|
| 56 |
+
- **Emotional situation retrieval** — match a child's free-text emotional query to the most appropriate prophet story
|
| 57 |
+
- **Emotional intensity classification** — predict EI level from situation description
|
| 58 |
+
- **Resolution type classification** — predict RT from situation description
|
| 59 |
+
|
| 60 |
+
---
|
| 61 |
+
|
| 62 |
+
## Dataset Structure
|
| 63 |
+
|
| 64 |
+
### Fields
|
| 65 |
+
|
| 66 |
+
| Field | Type | Description |
|
| 67 |
+
|---|---|---|
|
| 68 |
+
| `id` | string | Unique identifier e.g. `moses_003` |
|
| 69 |
+
| `prophet_latin` | string | Prophet name in English e.g. `Moses` |
|
| 70 |
+
| `prophet_arabic` | string | Prophet name in Arabic e.g. `موسى` |
|
| 71 |
+
| `situation_en` | string | 3–5 sentence English description of the emotional situation |
|
| 72 |
+
| `emotions` | list[string] | 2–5 primary emotion labels |
|
| 73 |
+
| `EI` | float | Emotional Intensity 1.0–5.0 (half-point increments) |
|
| 74 |
+
| `RT` | int | Resolution Type: 1=immediate, 2=gradual, 3=delayed |
|
| 75 |
+
| `RT_label` | string | Human-readable RT label |
|
| 76 |
+
| `child_paraphrase` | string | Child-friendly multilingual explanation and lesson |
|
| 77 |
+
| `quran_ref` | string | Quranic verse or hadith reference |
|
| 78 |
+
| `RL` | int | Recitation Level 1–3 |
|
| 79 |
+
| `gender_of_protagonist` | string | `male` or `female` |
|
| 80 |
+
| `annotator_agreed` | bool | Annotation confirmed by domain reviewer |
|
| 81 |
+
| `version` | string | Corpus version |
|
| 82 |
+
|
| 83 |
+
### EI Distribution
|
| 84 |
+
|
| 85 |
+
| EI | Label | Count |
|
| 86 |
+
|---|---|---|
|
| 87 |
+
| 1 | Mild everyday emotion | 19 |
|
| 88 |
+
| 2 | Low-moderate distress | 19 |
|
| 89 |
+
| 3 | Moderate distress | 19 |
|
| 90 |
+
| 4 | High distress | 24 |
|
| 91 |
+
| 5 | Severe crisis-level distress | 19 |
|
| 92 |
+
|
| 93 |
+
### RT Distribution
|
| 94 |
+
|
| 95 |
+
| RT | Label | Count |
|
| 96 |
+
|---|---|---|
|
| 97 |
+
| 1 | Immediate resolution | 27 |
|
| 98 |
+
| 2 | Gradual resolution | 29 |
|
| 99 |
+
| 3 | Delayed resolution (long patient endurance) | 23 |
|
| 100 |
+
|
| 101 |
+
### Quranic Figures Covered
|
| 102 |
+
|
| 103 |
+
Prophets: Adam, Idris, Noah, Hud, Salih, Abraham, Lot, Ishmael, Isaac, Jacob, Joseph, Job, Shuaib, Moses, Aaron, David, Solomon, Elijah, Elisha, Jonah, Zachariah, John, Jesus, Muhammad.
|
| 104 |
+
|
| 105 |
+
Key figures (non-prophets): Mary, Hagar.
|
| 106 |
+
|
| 107 |
+
---
|
| 108 |
+
|
| 109 |
+
## Example Entry
|
| 110 |
+
|
| 111 |
+
```json
|
| 112 |
+
{
|
| 113 |
+
"id": "joseph_003",
|
| 114 |
+
"prophet_latin": "Joseph",
|
| 115 |
+
"prophet_arabic": "يوسف",
|
| 116 |
+
"situation_en": "Joseph was separated from his beloved father Jacob
|
| 117 |
+
and thrown into a well by his own brothers out of jealousy.
|
| 118 |
+
He was then sold into slavery in Egypt, far from everything
|
| 119 |
+
he loved. Despite years of separation, Joseph never lost hope
|
| 120 |
+
in Allah or stopped praying for his family.",
|
| 121 |
+
"emotions": ["grief", "loneliness", "abandonment", "yearning", "patient_hope"],
|
| 122 |
+
"EI": 3.0,
|
| 123 |
+
"RT": 3,
|
| 124 |
+
"RT_label": "delayed_resolution",
|
| 125 |
+
"child_paraphrase": "Prophet Yusuf missed his father every single
|
| 126 |
+
day for many years. He never stopped loving him even when they
|
| 127 |
+
were far apart. Allah never forgot Yusuf, and one day reunited
|
| 128 |
+
them in a way more beautiful than either could have imagined.",
|
| 129 |
+
"quran_ref": "12:15-18",
|
| 130 |
+
"RL": 2,
|
| 131 |
+
"gender_of_protagonist": "male",
|
| 132 |
+
"annotator_agreed": true,
|
| 133 |
+
"version": "1.0"
|
| 134 |
+
}
|
| 135 |
+
```
|
| 136 |
+
|
| 137 |
+
---
|
| 138 |
+
|
| 139 |
+
## Usage
|
| 140 |
+
|
| 141 |
+
```python
|
| 142 |
+
from datasets import load_dataset
|
| 143 |
+
|
| 144 |
+
ds = load_dataset("lamyaa/QESC")
|
| 145 |
+
|
| 146 |
+
# All entries
|
| 147 |
+
print(f"Total entries: {len(ds['train'])}")
|
| 148 |
+
|
| 149 |
+
# Filter by EI level
|
| 150 |
+
mild = [e for e in ds['train'] if e['EI'] <= 2.0]
|
| 151 |
+
severe = [e for e in ds['train'] if e['EI'] == 5.0]
|
| 152 |
+
|
| 153 |
+
# Filter by prophet
|
| 154 |
+
joseph = [e for e in ds['train'] if e['prophet_latin'] == 'Joseph']
|
| 155 |
+
|
| 156 |
+
# Filter by resolution type
|
| 157 |
+
immediate = [e for e in ds['train'] if e['RT'] == 1]
|
| 158 |
+
```
|
| 159 |
+
|
| 160 |
+
### Use with CASS retrieval
|
| 161 |
+
|
| 162 |
+
```python
|
| 163 |
+
# See full code in: https://github.com/lamyaa/CASS
|
| 164 |
+
|
| 165 |
+
# English query
|
| 166 |
+
retrieve("I feel sad and nobody understands me")
|
| 167 |
+
# → joseph_003 (EI=3, RT=3)
|
| 168 |
+
|
| 169 |
+
# French query
|
| 170 |
+
retrieve("Je me sens abandonné par mes amis")
|
| 171 |
+
# → muhammad_002 (EI=3, RT=2)
|
| 172 |
+
|
| 173 |
+
# Moroccan Darija query
|
| 174 |
+
retrieve("ma kaynch had li yfahmni")
|
| 175 |
+
# → shuaib_001 (EI=3, RT=3)
|
| 176 |
+
```
|
| 177 |
+
|
| 178 |
+
---
|
| 179 |
+
|
| 180 |
+
## Safety Properties
|
| 181 |
+
|
| 182 |
+
QESC is designed with child safety in mind. The EI annotation enables the CASS framework to prevent emotionally dangerous matches:
|
| 183 |
+
|
| 184 |
+
- A child at EI=1 (mild embarrassment) will **never** receive an EI=5 story (extreme suffering)
|
| 185 |
+
- A child at EI=5 (severe crisis) will **never** receive an EI=1 story (gentle everyday lesson)
|
| 186 |
+
- Safety filtering is automatic — no user configuration required
|
| 187 |
+
|
| 188 |
+
Across 5 diagnostic queries, CASS suppressed **27 of 28** emotionally dangerous entries with a mean rank drop of **37 positions** and maximum of **62 positions**.
|
| 189 |
+
|
| 190 |
+
---
|
| 191 |
+
|
| 192 |
+
## Annotation Guidelines
|
| 193 |
+
|
| 194 |
+
**EI scale:**
|
| 195 |
+
- EI=1: Mild everyday emotion — embarrassment, small disappointment, gentle worry
|
| 196 |
+
- EI=2: Low-moderate distress — social exclusion, mild loneliness, minor conflict
|
| 197 |
+
- EI=3: Moderate distress — betrayal, sustained loneliness, public humiliation
|
| 198 |
+
- EI=4: High distress — acute fear, grief, unjust accusation, family conflict
|
| 199 |
+
- EI=5: Severe crisis — extreme suffering, hopelessness, years of loss
|
| 200 |
+
|
| 201 |
+
**RT scale:**
|
| 202 |
+
- RT=1: Immediate resolution — comfort or answer arrives quickly (within the same scene)
|
| 203 |
+
- RT=2: Gradual resolution — situation improves over weeks or months
|
| 204 |
+
- RT=3: Delayed resolution — resolution requires long patient endurance (years)
|
| 205 |
+
|
| 206 |
+
---
|
| 207 |
+
|
| 208 |
+
## Citation
|
| 209 |
+
|
| 210 |
+
```bibtex
|
| 211 |
+
@article{sadouk2025cass,
|
| 212 |
+
title = {CASS: A Context-Aware Semantic Similarity Framework
|
| 213 |
+
for Safe Retrieval in Child-Facing Educational Applications},
|
| 214 |
+
author = {Sadouk, Lamyaa AND Gadi, Taoufiq},
|
| 215 |
+
journal = {Education and Information Technologies},
|
| 216 |
+
year = {2025},
|
| 217 |
+
publisher = {Springer}
|
| 218 |
+
}
|
| 219 |
+
```
|
| 220 |
+
|
| 221 |
+
---
|
| 222 |
+
|
| 223 |
+
## Dataset Card Authors
|
| 224 |
+
|
| 225 |
+
**Lamyaa Sadouk**
|
| 226 |
+
Ecole Marocaine des Sciences de l'Ingénieur, Casablanca, Morocco
|
| 227 |
+
|
| 228 |
+
**Taoufiq Gadi**
|
| 229 |
+
Laboratoire de Recherche en Mathématique, Informatique et Sciences de l'Ingénieur (MISI), Morocco
|
| 230 |
+
|
| 231 |
+
## License
|
| 232 |
+
|
| 233 |
+
[CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/) — Attribution-NonCommercial 4.0 International
|
| 234 |
+
|
| 235 |
+
You may use and share this dataset for research and educational purposes with attribution. Commercial use is not permitted without explicit permission from the author.
|