Reports from the SHARIAsource Lab: Experiments in Collecting and Counting Islamic Legal Canons

The SHARIAsource Courts & Canons (CnC) Annotation Suite leverages data science tools to explore questions in Islamic law and society historically through mapping the controversies and values reflected in courts (from taʾrīkh, ṭabaqāt) and legal canons (qawāʿid fiqhiyya). We experiment with ways in which the data science tools we are developing at SHARIAsource can aid in that research.

By Abtsam Saleh

How does textualism and interpretation in Islamic law operate over time and place? How did Muslim jurists use interpretive principles in historical contexts to resolve novel legal questions? Can AI and other data science tools help us reveal connections between social and legal history through monitoring judicial and juristic activities in interpretation? These are some of the questions that have guided our SHARIAsource Lab at Harvard this academic year. Led by Faculty Director Professor Intisar Rabb, the Lab brings together scholars, practitioners, data scientists, software engineers, and students to develop and experiment with our developing collection of data science tools and apps, designed to prepare data, conduct research, and perform AI-powered text analysis on materials related to Islamic law.[1] One of those tools is the SHARIAsource CnC Annotation Suite—a set of tools that allow researchers to identify, label, and otherwise annotate interpretive principles used frequently in Islamic law, drawn from a larger corpus of fourteenth and fifteenth century canons collections, Islamic law treatises, and other recent sources. The interpretive principles at issue? Islamic legal canons (qawāʿid fiqhiyya)—principles of interpretation that jurists and judges use in Islamic law in ways that parallel the canons of construction so prominent in American textualism in questions of legislation and statutory interpretation.

In the SHARIAsource Lab, the primary task this year has been parsing Islamic law sources—including collections of legal canons—to identify, count, and assess the types of legal issues that these legal canons cover. Our broader aim is to explore how we can effectively trace these Islamic legal canons as memes across various works of history and law.[2] To get a sense of how and why using data science tools to trace Islamic legal canons and memes is significant, Professor Intisar Rabb’s essay on “Islamic Legal Canons as Memes” outlines the ways in which this approach can illuminate aspects of Islamic law to reveal insights about its scope, operation, and prospects that individual scholars cannot see through reading individual texts alone.[3]

But precisely what are these canons, and where do they fit in the larger history and operation of Islamic law? The legal canons, she writes, are

interpretive principles that represent varied conceptions of Islamic law and its values, as they developed over time and space. Scholars of Islamic law – both medieval and modern – have typically defined these legal canons narrowly, as text-based principles used to apply general Islamic laws to particular cases. Having emerged at the start of Islam’s history in the seventh century, Islamic legal canons have played a major role in the construction of Islamic law and society ever since. The canons come from both the classical enumeration of four foundational sources (Qurʾān, Sunna, consensus, and legal reasoning) and from juristic and judicial practices addressing local disputes, responding to political authority and encapsulating social-cultural norms. Throughout Islam’s history, judges and jurists have used legal canons not only to restate Islamic law, but to construct it. In the process, they deposited into the corpus of canons their ideas of valid interpretive and procedural principles, social-moral values, and the scope of their own power vis-à-vis other institutional actors.[4]

In the SHARIAsource Lab, we developed a “SHARIAsource-Analytics” platform in which our Courts and Canons (CnC) Annotation Suite of tools is being built out to aid students and scholars in the lab with identifying, tagging, and counting Islamic legal canons from the corpus of texts that Muslim jurists and judges left in their wake of written opinions and treatises. Luckily, a set of medieval and modern scholars have published whole collections of canons that gather in varied treatises the legal canons that judges and jurists cited in their early treatises, fatwās, and court cases. These “canons collections” are not comprehensive, and they may divide along lines of Islamic law’s multiple schools of interpretation or by region. Yet, collecting and combining the canons collections will allow us to gain a comprehensive view of the canons in use in Islamic law historically and today. Accordingly, our first order of business in the Lab is to identify and build a combined list of Islamic legal canons from various medieval and modern sources of “canons collections”—ranging from the modern collection, Muḥammad Ṣidqī Būrnū’s Mawsūʻat al-qawāʻid al-fiqhiyya (Beirut, 2015), to the medieval collection, Aḥmad al-Wansharīsī’s Īḍāḥ al‐masālik ilā qawāʿid al‐Imām Mālik (Rabat, 1980), and more. So far, we have parsed and ingested a preliminary list of over 4,400 canons into the CnC Annotation Suite. Then, we let the fun begin with organizing, labeling, and analyzing these canons!

One of the text-analytics tools we developed to parse through our SHARIAsource Lab collection of canons is the CnC Variants Matcher. This tool allows Lab members to identify and pair (or otherwise disambiguate) Islamic legal canons that one scholar or another has said are related variants in some way. But these scholars are sometimes over-inclusive or under-inclusive. Our CnC Variants Matcher tool presents “canons clusters” that group variants according to the way they are based in or presented in the canons collections. We found that, despite canons collections presenting clusters of canons variants, the canons often diverge in meaning from those groupings. Oftentimes, the canons are radically different from one another. They apply to different subject matters, canons groupings don’t include all of the relevant canons as variants, or canons include more variants than apply to a particular subject at hand. With the CnC Variants Matcher, we are able to use pre-grouped canons clusters as a jumping off point to match variants, or a “form or version of a canon that differs in wording but not meaning from another canon” in ways that scholars can verify as a baseline. Using a drag-and-drop interface, this tool allows members to assign canons to groups and set them as variants of one another or else disambiguate false-matches from one another.

In this example, we have a cluster of five canons on allegations as evidence that have been grouped together in source, which is Burnū’s Mawsūʻat al-qawāʻid al-fiqhiyya (Beirut, 2015). Burnū groups the first canon lā ḥujja maʿa al-iḥtimāl al-nāshiʾ ʿan dalīl, translated as “no proof [is required] with plausibility that is introduced without evidence,” with the second canon yuʿtabar al-tuhma fī al-aḥkām fa-kull man faʿala fiʿlan wa-tamkinat al-tuhma fī fiʿlih ḥakama bi-fasād fiʿlih, translated as “allegations are admissible in rulings, so everyone who performs an act where an allegation about that action is plausible, the act is ruled defective.” Based on these researcher-informed translations, we can determine that these two canons are not variants despite being grouped together in source, as they differ in both wording and meaning. The other three canons, al-tuhma takhaṣṣus al-amr al-muṭlaq, translated as “allegations bring specificity to general matters,” al-tuhma dalīl taqyīd al-muṭlaq, translated as “allegations are a form of evidence (dalīl) that brings specificity to general matters,” and al-takhṣīṣ bi’l-tuhma, translated as “specificity for general matters is made by allegations,” are also grouped together in source by Burnū. Unlike the first two canons, we can determine that these canons are variants of one another because although the wording varies, the meaning does not. Since the first two canons do not have any variants, we set them as independent canons using the drag-and-drop interface. We then set the remaining three canons as variants by placing them in the same box.

In the end, this matching and unmatching process enables us to create training data for a text analytics tool that can automatically recognize and group variants with an increasingly high degree of alignment with a researcher’s intuitions in a way that allows us to understand the map of canons as memes and how they spread over time and space, with all their variants, in Islamic legal history.


[1] These tools, in development, include web applications that we refer to as SHARIAsource-Analytics, SHARIAsource-Metadata, and SEARCHstrata, all of which feed into our annotation tools for Islamic legal canons: the CnC Annotation Suite.

[2] Intisar Rabb, “Islamic Legal Canons as Memes,” Islamic Law Blog, February 28, 2021,

[3] Ibid.

[4] Intisar A. Rabb, “Islamic Legal Canons As Memes,” Journal of Islamic Law 2, no.1 (2021): 266.

Leave a Reply