Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

The Evolution of Islamic Law1 and Text Recommendation

This is a "Natural Language Processing" project that aims to look at how the four main madhāhib2 have both individually and collectively changed over time — from their inception by the "founders" themselves up until the current-day scholars who still produce works of Fiqh (Islamic Law).

This project will use machine learning and the law books of the four schools (found on in their respective sections).

Problem Statement

I hope to be able to answer the following questions:

  1. Which words and phrases are the most specific to each school? (i.e., do Ḥanafī3 works often cite “qiyās”4 far more than Ḥanbalī5 works do?)
  2. How do those school-specific words and phrases change from century to century? (i.e., do the earlier works predominantly quote Qurʾān6 and Aḥādīth7, while later works simply reference back to the opinions of previous scholars?)
  3. Can I provide valuable book recommendations that would leave the reader satisfied with the suggested texts?
  4. [To be addressed in future iterations] Can these keywords and phrases be used to accurately predict with which madhhab an author affiliates? (i.e., do the ḥadīth commentaries of Mullā ʿAlī al-Qārī [rḥA] and Imām al-Nawawī [rḥA] clearly mark them as “Ḥanafī” and “Shāfiʿī”8 respectively?)
  5. [To be addressed in future iterations] Can I provide a summary of the texts in a manner that is both inclusive and exclusive, but still staying true to the original intent of the author?


  1. The years and centuries used in this project refer to the Islamic calender, i.e., the Hijrī Lunar calender. For a quick conversion, it will be 578 years behind the current Gregorian calender.
  2. I understand that limiting myself to only those books found within Shamela is not the best representation of the schools as a whole, but this is where there are data available for such a project.
  3. I also understand that there are many books which have commentaries (i.e., for al-Marghinānī’s al-Hidāyah, there are at least 3 massive commentaries which include the entire text of al-Hidāyah: al-Bināyah, al-ʿInāyah, and Fatḥ al-Qadīr) which might skew the results. In the process, I will search for the optimal statistical and computational method in which to address this issue.

Project Timeline



1. Fiqh is the term used for implemented Islamic Law.

2. Plural of madhhab. Refers to one of the 4 legal schools of Islamic Law.

3. One of the four schools. The first to be codified and well documented (which occurred in the late 2nd century).

4. Legal Analogy

5. One of the four schools.

6. Muslim's religious book, believed to be the words of God.

7. References to the statements and actions of Prophet Muḥammad ﷺ (d. 633 CE).

8. One of the four schools.


The Evolution of Fiqh and Madhhab Prediction







No releases published


No packages published