File size: 7,527 Bytes
0c7c74a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0322dd0
0c7c74a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0322dd0
0c7c74a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
---
language:
- en
- fr
- ar
license: cc-by-nc-4.0
task_categories:
- text-retrieval
- text-classification
pretty_name: QESC - Quranic Emotional Situation Corpus
size_categories:
- n<1K
tags:
- Islamic education
- emotional support
- children
- Arabic
- Moroccan Darija
- NLP
- retrieval
- CASS
- prophet stories
- emotional intensity
---

# QESC — Quranic Emotional Situation Corpus

## Dataset Description

**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).

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.

- **Paper:** *CASS: A Context-Aware Semantic Similarity Framework for Safe Retrieval in Child-Facing Educational Applications* (Sadouk and Gadi)
- **GitHub:** [https://github.com/lsadouk/CASS](https://github.com/lsadouk/CASS)
- **Application:** Ya Allah — Islamic children's emotional support app

---

## Dataset Summary

| Property | Value |
|---|---|
| Total entries | 100 |
| Quranic figures covered | 26 |
| EI scale | 1–5 (mild → severe) |
| RT scale | 1–3 (immediate → delayed) |
| Primary language | English |
| Additional languages | Arabic (names), French, Moroccan Darija (paraphrases) |
| License | CC BY-NC 4.0 |

---

## Supported Tasks

- **Emotional situation retrieval** — match a child's free-text emotional query to the most appropriate prophet story
- **Emotional intensity classification** — predict EI level from situation description
- **Resolution type classification** — predict RT from situation description

---

## Dataset Structure

### Fields

| Field | Type | Description |
|---|---|---|
| `id` | string | Unique identifier e.g. `moses_003` |
| `prophet_latin` | string | Prophet name in English e.g. `Moses` |
| `prophet_arabic` | string | Prophet name in Arabic e.g. `موسى` |
| `situation_en` | string | 3–5 sentence English description of the emotional situation |
| `emotions` | list[string] | 2–5 primary emotion labels |
| `EI` | float | Emotional Intensity 1.0–5.0 (half-point increments) |
| `RT` | int | Resolution Type: 1=immediate, 2=gradual, 3=delayed |
| `RT_label` | string | Human-readable RT label |
| `child_paraphrase` | string | Child-friendly multilingual explanation and lesson |
| `quran_ref` | string | Quranic verse or hadith reference |
| `RL` | int | Recitation Level 1–3 |
| `gender_of_protagonist` | string | `male` or `female` |
| `annotator_agreed` | bool | Annotation confirmed by domain reviewer |
| `version` | string | Corpus version |

### EI Distribution

| EI | Label | Count |
|---|---|---|
| 1 | Mild everyday emotion | 19 |
| 2 | Low-moderate distress | 19 |
| 3 | Moderate distress | 19 |
| 4 | High distress | 24 |
| 5 | Severe crisis-level distress | 19 |

### RT Distribution

| RT | Label | Count |
|---|---|---|
| 1 | Immediate resolution | 27 |
| 2 | Gradual resolution | 29 |
| 3 | Delayed resolution (long patient endurance) | 23 |

### Quranic Figures Covered

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.

Key figures (non-prophets): Mary, Hagar.

---

## Example Entry

```json
{
  "id": "joseph_003",
  "prophet_latin": "Joseph",
  "prophet_arabic": "يوسف",
  "situation_en": "Joseph was separated from his beloved father Jacob
    and thrown into a well by his own brothers out of jealousy.
    He was then sold into slavery in Egypt, far from everything
    he loved. Despite years of separation, Joseph never lost hope
    in Allah or stopped praying for his family.",
  "emotions": ["grief", "loneliness", "abandonment", "yearning", "patient_hope"],
  "EI": 3.0,
  "RT": 3,
  "RT_label": "delayed_resolution",
  "child_paraphrase": "Prophet Yusuf missed his father every single
    day for many years. He never stopped loving him even when they
    were far apart. Allah never forgot Yusuf, and one day reunited
    them in a way more beautiful than either could have imagined.",
  "quran_ref": "12:15-18",
  "RL": 2,
  "gender_of_protagonist": "male",
  "annotator_agreed": true,
  "version": "1.0"
}
```

---

## Usage

```python
from datasets import load_dataset

ds = load_dataset("lamyaa/QESC")

# All entries
print(f"Total entries: {len(ds['train'])}")

# Filter by EI level
mild = [e for e in ds['train'] if e['EI'] <= 2.0]
severe = [e for e in ds['train'] if e['EI'] == 5.0]

# Filter by prophet
joseph = [e for e in ds['train'] if e['prophet_latin'] == 'Joseph']

# Filter by resolution type
immediate = [e for e in ds['train'] if e['RT'] == 1]
```

### Use with CASS retrieval

```python
# See full code in: https://github.com/lsadouk/CASS

# English query
retrieve("I feel sad and nobody understands me")
# → joseph_003 (EI=3, RT=3)

# French query
retrieve("Je me sens abandonné par mes amis")
# → muhammad_002 (EI=3, RT=2)

# Moroccan Darija query
retrieve("ma kaynch had li yfahmni")
# → shuaib_001 (EI=3, RT=3)
```

---

## Safety Properties

QESC is designed with child safety in mind. The EI annotation enables the CASS framework to prevent emotionally dangerous matches:

- A child at EI=1 (mild embarrassment) will **never** receive an EI=5 story (extreme suffering)
- A child at EI=5 (severe crisis) will **never** receive an EI=1 story (gentle everyday lesson)
- Safety filtering is automatic — no user configuration required

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**.

---

## Annotation Guidelines

**EI scale:**
- EI=1: Mild everyday emotion — embarrassment, small disappointment, gentle worry
- EI=2: Low-moderate distress — social exclusion, mild loneliness, minor conflict
- EI=3: Moderate distress — betrayal, sustained loneliness, public humiliation
- EI=4: High distress — acute fear, grief, unjust accusation, family conflict
- EI=5: Severe crisis — extreme suffering, hopelessness, years of loss

**RT scale:**
- RT=1: Immediate resolution — comfort or answer arrives quickly (within the same scene)
- RT=2: Gradual resolution — situation improves over weeks or months
- RT=3: Delayed resolution — resolution requires long patient endurance (years)

---

## Citation

```bibtex
@article{sadouk2025cass,
  title     = {CASS: A Context-Aware Semantic Similarity Framework
               for Safe Retrieval in Child-Facing Educational Applications},
  author    = {Sadouk, Lamyaa AND Gadi, Taoufiq},
  journal   = {Education and Information Technologies},
  year      = {2025},
  publisher = {Springer}
}
```

---

## Dataset Card Authors

**Lamyaa Sadouk**
Ecole Marocaine des Sciences de l'Ingénieur, Casablanca, Morocco

**Taoufiq Gadi**
Laboratoire de Recherche en Mathématique, Informatique et Sciences de l'Ingénieur (MISI), Morocco

## License

[CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/) — Attribution-NonCommercial 4.0 International

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.