The Affective Algorithm: Mapping the Emotional Architecture of Fatimid Geniza Petitions (Part 1)

This is a guest post by Abdulqadir K Haidermota.

Introduction: The Affective Engine of the State

Recently the slave was afflicted with a disease in his eyes and he lost his sight. He and his family are dying of hunger.—Petition fragment T-S Ar.42.177

Encountering these lines on a thousand-year-old scrap of paper from the Cairo Geniza, the immediate impact is visceral and it presents a scene of absolute human abjection. The petitioner is blind. He is starving. He is isolated from his community. One might expect to find a singular, sustained outcry of desperation—a linear narrative of need. Yet, moving beyond the visceral shock of the qiṣṣa (‘the core request’), the text reveals a far more complex reality. The document presents not just a monologue of despair, but a structured combination of emotional expressions involving reverence, prostrate humility, and resilient hope.

For the historian of the Mediterranean, Geniza documents are rightly celebrated for their detailed preservation of the material world—offering up the price of flax, the lineage of a merchant, or the date of a decree. In the pursuit of such hard facts, the formulaic expressions of feeling that encase them are often treated as transparent—a conventional medium through which historians look to find the ‘real’ data. However, this study asks what happens when we treat these formulaic expressions not as background noise, but as structured data points—patterns that might reveal an emotional logic beneath the surface, allowing for the visualisation of a constitutive underlying architecture that isolated close reading often misses.

This project maps that architecture by asking: how are emotional registers distributed across the formal parts of Fatimid petitions? This will be explored over two posts; part one will provide context and outline the methodology used, and part two will discuss/present the outcomes of this approach.

This process of petitioning relied on the professional scribe, who acted as the interface between the chaotic reality of the street and the orderly world of the palace. Deeply versed in inshāʾ (‘chancery) style, the scribe did not merely transcribe the petitioner’s plea; he formalised it. He translated the ‘raw data’ of somatic suffering—blindness, hunger, isolation—into the affective syntax. To dismiss these expressions as ‘mere rhetoric’ is to miss the fundamental nature of medieval governance.

The patterns identified in this pilot dataset suggest that emotional language was not merely ornamental but formed an important component of the petitionary process. In the Fatimid ‘State of Letters,’ emotional expression appears to have been an important component of petitionary communication. This post visualises that system, revealing how scribes organised emotion into a patterned, rule-based logic to activate administrative redress.

Background: The Paper Trail of an Empire

The Fatimid Caliphate (909–1171 CE) maintained a highly organised administrative system—what historian Marina Rustow terms a ‘State of Letters’. Ruling a diverse empire of Muslims, Christians, and Jews, the state used the petition (qiṣṣa) not merely as a request for charity, but as a direct instrument of justice. To make these appeals actionable, scribes utilised a rigorous chancery style (inshāʾ), transforming the chaotic reality of human suffering into a standardised, bureaucratic form.

To understand the ecosystem of these documents, we must look to the Cairo Geniza. For nearly a millennium, the Ben Ezra Synagogue in Fustat (Old Cairo) served as a repository for texts containing the name of God. Into this sacred storeroom, the Jewish community also cast their secular documents—letters, accounts, and state petitions—preserving a granular cross-section of Mediterranean life from the 10th to the 13th centuries.

Recent scholarship, particularly Marina Rustow’s The Lost Archive (2020), has revolutionised our understanding of these fragments. Rustow argues that the Fatimid Caliphate (909–1171 CE) was a highly sophisticated bureaucratic state. But this governance followed a performative script. As established by the diplomatics scholar Geoffrey Khan (1993), a standard Fatimid petition follows an eight-part structure:

  1. Tarjama: The sender’s identifier.
  2. Basmala: The divine invocation.
  3. Salwala: Elaborate blessings on the Caliph.
  4. Taqbil: The obeisance clause (‘Kisses the ground…’).
  5. Narratio: The story of the grievance.
  6. Qiṣṣa: The specific request.
  7. Ray’e Clause: Deference to the ruler.
  8. Closing Blessings.

While scholars have long mapped this diplomatic structure, this project attempts to map its emotional structure. This study asks: in what ways do these eight parts serve to zone the petitioner’s emotional architecture?

Methodology: Digitally Augmented Close Reading

To visualise this ‘emotional architecture,’ a foundational dataset of nine petition fragments was digitised and analysed, establishing a proof-of-concept for the algorithmic mapping of petitionary affect. This project approached the task as a digitally augmented close reading, employing computational visual analysis to map the structural logic embedded within the manuscript.

 The Pipeline

  1. Segmentation

The corpus was systematically segmented into Khan’s eight diplomatic parts via manual annotation to ensure philological precision, rather than through automated machine classification. These transcriptions, sourced from the Princeton Geniza Project (PGP), were further normalised to stabilise orthographic variations. This process ensured that the metadata and structural analysis remained rooted in established standards while allowing the scripts to accurately aggregate emotional registers across disparate scribal hands.

  1. Annotation (The Human-in-the-Loop)

The semantic analysis was conducted through a ‘Human-in-the-Loop’ workflow to ensure that the emotional nuances of medieval Arabic were not lost to automated sentiment analysis. I manually identified and tagged 62 distinct rhetorical phrases within the corpus, mapping them to a controlled vocabulary of five emotional registers: Devotion, Humility, Neutrality, Hope, and Desperation. This manual oversight was essential to account for the highly formalised, ‘performative’ nature of petitionary language, where the emotional weight often resides in specific diplomatic formulae rather than raw word frequency.

  1. Visualisation (The Computational Synthesis)

Once the qualitative tagging was complete, the data was processed using Python libraries (Pandas, NetworkX, Matplotlib, Seaborn) to convert these individual observations into a structural map. While the coding was supported by language models for efficiency, the logic of the visualisation remains tied to my manual annotations. This hybrid approach allows for a methodological bridge: it scales the ‘close reading’ of the nine texts into a ‘distant reading’ of their structural patterns, rendering the ‘U-Shaped’ emotional trajectory visible as a systemic administrative feature rather than an isolated scribal choice.

  1. Dataset Selection and Scope

While the corpus of Fatimid documents is vast, these nine fragments were curated as a selective ‘vertical slice’ to test the feasibility of the affective mapping model. The selection was primarily guided by structural preservation; to ensure a rigorous proof-of-concept, it was necessary to prioritise manuscripts where the diplomatic transitions—from the initial protocol to the core grievance and the final blessing—remained sufficiently legible for analysis.

Though modest in scale, this pilot group was assembled to reflect a cross-section of social and somatic conditions: from the physical desperation of the disabled to the professional appeals of communal representatives. By testing the ‘U-Shaped Trajectory’ against this small but structurally complete sample, the study seeks to identify whether these emotional patterns are systemic features of the genre rather than idiosyncratic flourishes. This focused dataset is intended not as an exhaustive representation, but as a cautious and pragmatic point of entry into a much larger, more complex administrative landscape.

  1. Methodology: Operationalising Affect

To map this emotional architecture, a lexical and inductive methodology was employed. Rather than imposing modern psychological categories, five rhetorical registers—Devotion, Humility, Desperation, Hope, and Neutral—were derived directly from recurring semantic clusters within the corpus itself.

The complete dataset of 62 phrases from 9 Fatimid petitions, with diplomatic segmentation and emotional annotation, is available for reference:

Figure 1: Sample of the Petition Emotion Dataset. A preview of the annotated dataset showing Petition ID, diplomatic section, Arabic text, and emotional register. The full data is available online.

The Five Emotional Registers:

Figure 2: The five rhetorical registers are identified through structural-lexical analysis.

These are not anachronistic psychological categories but rhetorical registers: distinctive clusters of vocabulary, formulaic phrases, and structural positions that scribes deployed for specific persuasive effects. Each register was identified through iterative close reading combined with computational frequency analysis of recurring lexical patterns.  

The Logic of Annotation

A three-step structural-lexical-contextual method was applied:

1. Structural assignment. Each phrase received a preliminary register based on its position within Khan’s eight-part structure:

Structural PositionPrimary Register
Basmala / SalwalaDevotion / Reverence
Tarjama / TaqbilHumility / Submission
Ray’e / ClosingDevotion / Reverence
NarratioMixed (contextual)
QiṣṣaMixed (contextual)

Table 1: Structural Logic of Annotation. 

2. Lexical refinement. This assignment was then refined using diagnostic vocabularies. A phrase containing يسل (beseeches) or يضرع (implores) was coded as Desperation/Need even outside the request section. A tarjama missing العبد or المملوك was coded as Neutral/Descriptive rather than Humility.

3. Contextual resolution. Where structure and lexicon diverged, it was resolved through analysis of rhetorical function within the petition’s persuasive arc.

This three-pass method acknowledges that emotion in these documents is neither purely formulaic nor purely bureaucratic. It is expressive: deployed according to recognisable conventions yet adaptable to circumstance, petitioner, and scribal skill.

The outcomes of the methodology discussed here will be examined in part two.


References

Geoffrey Khan, Arabic Legal and Administrative Documents in the Cambridge Genizah Collections (Cambridge University Press, 1993).

Marina Rustow, The Lost Archive: Traces of a Caliphate in a Cairo Synagogue (Princeton University Press, 2020).

Primary Sources

To ensure the reproducibility of this pilot study, each cited document in the bibliography is hyperlinked to its corresponding entry in the Princeton Geniza Project (PGP) database. This provides direct access to the digital surrogates, diplomatic transcriptions, and foundational metadata used to build the Affective Algorithm. All documents last accessed via the PGP on February 14, 2026.

Bodl. MS heb. b 18/21 + T-S Ar.30.278 (Join). Bodleian Library, Oxford and Cambridge University Library. PGPID 1256.

ENA 3974.4. Jewish Theological Seminary Library, New York. PGPID 11702.

ENA NS 71.12. Jewish Theological Seminary Library, New York. PGPID 12664.

T-S Ar.7.38. Cambridge University Library. PGPID 18932.

T-S Ar.30.273. Cambridge University Library. PGPID 9235.

T-S Ar.39.470. Cambridge University Library. PGPID 16767.

T-S Ar.42.158. Cambridge University Library. PGPID 16261.

T-S Ar.42.177. Cambridge University Library. PGPID 18562.

T-S Misc.28.169. Cambridge University Library. PGPID 16795.

Leave a Reply