Jiwa ← return

Methodology · v1

A computational affective lexicon of the Qur'an

And the consolation engine built upon it — the corpus, the classification, the matching, the evidence, and the limits we do not hide.

Jiwa maps the emotional vocabulary of the Qur'an and uses it to meet a person's stated feeling with the verse that already addresses it — consoling through the account of a prophet who felt the same, never issuing a ruling. This note documents the corpus, the affective classification, the consolation layer, the matching method, and the validation, including what the system does not yet claim. Every figure below is computed from the production data set and is reproducible from source.

IThe corpus — an affective lexicon

The unit of analysis is the Qur'anic word in place. Each token is resolved to its triliteral Arabic root, glossed for meaning, assigned a salience score, and located structurally within its sūrah.

6,014
word-tokens, each in its verse context
1,583
distinct triliteral roots resolved
8
affective clusters at the lexical layer
114
sūrahs, tokenized word by word

Each token is classified into one of eight affective clusters — Seen, Fear, Doubt, Awe, Grief, Loneliness, Shame, Weight. The pipeline is deterministic and versioned: the same text yields the same lexicon, so the map can be audited and reproduced rather than trusted on assertion.

IIThe affective map — قبض / بسط

The clusters are organized under the classical Qur'anic polarity of qabḍ (contraction) and basṭ (expansion) — the tightening and the opening of the heart. At the map layer the taxonomy widens to ten clusters, adding Hope and Helplessness, resolved against 2,004 verse-level fingerprints. The framework is drawn from the text and its tradition, not imposed from modern affect theory.

IIIThe consolation layer

Above the lexicon sits the console atlas: the emotional states a person actually arrives in, each paired with a curated response.

36
emotional states mapped
88
consolations, each anchored to a verse
46
distinct Qur'anic sources
0
integrity flags — no orphaned claim

Every consolation is written by hand and tied to a verified source; 12 sources carry their occasion of revelation (asbāb al-nuzūl) and 38 carry classical narrative detail (Ibn Kathīr), each graded for authenticity. A reveal-safety axis of five wound-types — desire, loss, injustice, doubt, unworthiness — governs which reframe is safe for a given wound; where the type is ambiguous, the system withholds the reframe and simply sits with the person.

IVMatching — from stated feeling to verse

Interpretation runs in two stages. A lexical detector maps the person's own words to an emotional state. Where it cannot resolve confidently, a multilingual sentence embedding (paraphrase-multilingual-MiniLM-L12-v2, 8-bit) routes the input by nearest-seed cosine similarity, gated by a confidence margin — below the margin, the system asks for a little more rather than guess.

Candidate verses are then scored across eight dimensions: salience, structural significance, intensity alignment, novelty, arc coherence, qabḍ/basṭ alignment, sūrah profile, and a multivalent-root bonus. The machinery stays hidden; the person only feels the result.

VValidation

The system is measured against a held-out set of 66 labelled synthetic confessions spanning English, Malay, and rojak, and both direct and oblique phrasing.

88%
overall comprehension (English 96%, Malay 95%)
100%
on directly-stated feeling
0
dangerous misclassifications — never the wrong consolation
0
cross-type reveals on the wound-type golden set

The safety-critical metric is not accuracy but error direction: a miss fails to a gentle reprompt, never to a wrong answer. Across the set, no confession was routed to a consolation for a different wound. The system is deliberately not tuned to this evaluation — fitting the 66 cases would inflate the figure and degrade generalization; the honest instrument is a held-out set (§VII).

VIThe trust contract

VIILimitations & what is not yet claimed

Rigor is as much what is withheld as what is asserted.

Figures computed from the Jiwa production data set, v1. Reproducible from source. The complete served-content inventory — every verse, translation, and attribution — is available for scholarly review on request.

Return to Jiwa →