Anthology of Computers and the Humanities · Volume 6

Automated Annotation via Structural Alignment for Hierarchical Classification of Classical Fiqh Texts

Hazim Baroudi1 , Wassim Ammar2 , Farid Bouchiba2 , Shadha Karoumi2 , Christian Müller2 and Fabrice Rossi1

  • 1 CEREMADE, Université Paris Dauphine-PSL, CNRS, Paris, France
  • 2 Institut de recherche et d’histoire des textes (IRHT), CNRS, Aubervilliers, France

Permanent Link: https://doi.org/10.63744/3vPE4qhCpZkl

Published: 25 October 2026

Keywords: NLP, Optimal Transport, Text Alignment, Hierarchical Classification

Abstract

This work presents an automated pipeline for the structural organization and classification of classical Arabic legal corpora. We develop a hierarchical classification framework that segments unpunctuated legal prose into fine-grained semantic units and categorizes them according to the inherent taxonomy of Islamic jurisprudence. To address the scarcity of available segment level annotations for Islamic texts, we use the highly structured Hanafi legal compendium Mukhtasar al-Qudrī as a reference. Other texts are aligned to this manual using optimal transport. This process is used together with the SAT segmenter to annotate segments, using the structure of the reference text (chapters and sections) as hierarchical labels. This enables us to train a deep learning model which incorporates hierarchical constraints to ensure consistency across different levels of legal categorization. This approach provides a scalable solution for the large-scale analysis of historical jurisprudence.