Who Speaks for ? Can NLP Solve and Age-old Question? Emad Mohamed

Introduction

● There is no official authority in Islam: there is no equivalent to the Vatican

● There are different schools of thought, mostly of scholarly nature

● The sources of knowledge in Islam are the Qurʾān, and the Prophetic Tradition (and sometimes how the companions of the Prophet behaved)

● There is more disagreement than agreement on the meanings of the Qurʾān and the Tradition.

Introduction: Sunni Legal Schools of Thought ● : Rationalist

● Shafi’i

: Literalist

Introduction: Theological Schools of Thought ● Mu’tazila: Human reasoning is the sole tool for understanding revelation.

:

● Asha’ari:

● Hanbali/Literalist: Revelation must be accepted as is. Metaphorical interpretation should be minimized

Introduction: Fatwa

● When a non-scholar has a question, they approach a scholar.

● The scholar issues a fatwa: a non-binding response to the question.

● Fatwas are usually collected and (some are) treated as precedents

● Like everything nowadays, fatwas have gone digital.

Who speaks for Islam? Who explains to Muslims whether human rights are a legitimate concept “in Islam,” whether there is such a thing as “Islamic values” and what they consist of, and whether violence can ever be justified from a religious point of view? Who do Muslims turn to when they look for guidance? To what extent do individual scholars and preachers exert religious authority, and how can it be assessed? What is the role of the -based Azhar and , the Shi'i seminaries in Najaf and Qum or the great Islamic colleges in South Asia for Muslims in their respective countries and beyond, including the Muslim diaspora in the west? (Gudrun Krämer and Sabine Schmidtke, 2014: 12)

Methods

● Find the top fatwa websites ● Rank them ● Find references in these websites ● Analyze the references

Find the top fatwa websites (easy)

● Compiled a list of the Fatwa websites

● Used Alexa.com and SimilarWeb.com to rank these websites by the number of visitors

● Top Websites – Islamweb.net : 20 million visitors a day – IslamQA: 8.5 million visitors a day – ….. – Dar Al-Iftaa (Al-Azhar, ): 150k visitors a day

IslamWeb.net

● Owned by

● “We do not belong to any specific school of thought. We respect all, but we choose what we believe is the most correct answer”

● 165 k fatwas covering (almost) everything: prayer, politics, , living in Canada, sex positions.

● Employs 50 - 100 researchers to reply to questioners’ concerns (personal contact with a former employee).

● Staff identity heavily guarded (sees itself as a “legal person”)

IslamQA.info

● Saudi-owned (Not sure of official affiliation)

● 24 k fatwas with very good coverage.

● 15 languages (and a wonderful parallel corpus)

● Founded and run by Al- Munajjid

Find references in these websites (1) ● It is customary for Muslim scholars to support their opinions with evidence: citation from the Qurʾān and the tradition

● Since this evidence is often ambiguous, and can be interpreted in multiple ways, scholars quote or re-phrase the prominent scholars, the authorities in the field

● Since what counts as authority is usually subjective, if we know the names, we may be able to infer the school orientation.

Find references in these websites (2) ● Named Entity Recognition to find scholar names

● Match the name against a list of scholars by school.

NER: Corpus

● No available module capable of the task. I have to annotate and train my own (Not a good idea)

● IslamWeb has solved the problem for me. See next slide.

Names are in red BUT,

● Problem 1: RED is more of a visual thing. Looks like the mufti has to pick the color from a html color picker. This results in various degrees of RED. Luckily, RED is designated specifically for people’s names and the answer intro, which can easily be discarded.

● Solution: searched for for all color tags used, picked red ones.

Names are in red BUT,

● Problem 2: Text selection is at times not very accurate. Some non-name material may be selected.

– .. and bill gates claimed that – .. and bill gates claimed that – .. and bill gates claimed that

● Solution: some preliminary pre-processing. Not properly handled yet, but the effect is not that bad.

Names are in red BUT,

● Problem 3: Conjoined names are one element: bythomas sonof nathan andwilliam andjacob

● Solution: Regular expressions do a good job here. Several rounds of trial and error.

Now we have a corpus

● 165469 documents most of them with IOB annotation (B-PERSON, I-PERSON, O)

● Randomly picked 5 % for development, 10% for testing and 85% for training.

● Another Test set: a small (actually tiny) corpus, hand-annotated, from IslamQA.info

Training and Testing

● CRFSuite (Naoaki Okazak, 2007, http://www.chokkan.org/software/crfsuite/).

● The word, 4-letter prefix, 4-letter suffix, w-1, w-2, previous word bigram, w+1, following bigram

● More features (and a gazetteer) are still to be implemented.

Results on the Test Set

P R F

O 0.9998 0.9998 0.9998 B-PERSON 0.9951 0.9893 0.9922 I-PERSON 0.9814 0.9903 0.9858 Macro-average 0.994077 0.901096 0.936762 Accuracy 0.9994

Results on IslamQA

● I have only so far annotated 10 documents from IslamQA

● The results are more or less the same as on the gold corpus (sometimes better), which is a good indicator

Now What?

The Scholar Module

● The aim is to build a citation network for scholars of Islam.

● 25000+ scholars so far

● Extracted from various sources (various Islamic sources, Wikipedia, and through our NER system

Muhammad bin Salih Al-Uthaymin (Various Sources)

● Born: 1929

● Died: 2001

● LivedIn:

● School: Hanbali

● Field: theology, law, exegesis

● Teachers: Ibn Taymiya, Muhammad ibn Abd Al-Wahhab, Al-Si’di

● Students: Salim Al-Tawil, Utham Al-Khamis, Muhammad Al- Munajjid, Salman Al-Ouda

● Authored: Book1, Book2, Book3

Book1

● Title: Impermissible Utterances

● Author: Ibn Uthaimin

● Editor: Fahad bin Nasser

● Category: Theology, Principles of Faith, Law

● Year: 2010

The Pipeline in Action

● Extract scholar names from the fatwas (We find e.g. Al-Uthaimin and Ibn Baz)

● Check the names in the scholar network to identify their affiliations and their references

● Check the Book Module to see which book is cited.

Sample Output: Fatwa # IQA14534

Author School Book Book Category Ibn Hajar Shafi’i Commentary Prophetic Al-’Asqalani on Sahih Al- Traditions Bukhari Ibn Qudama Hanbali Al-Mughni Law

Results: IslamQA Citations

Scholar Freq % Cum% Scholar Freq % Cum%

Al-Albani 2929 11.1982 11.2 Al-Dhahabi 563 2.1525 65.61

Ibm Uthaymin 2587 9.8907 21.09 Al-Tabarani 436 1.6669 67.28

Ibn Taymiyah 2377 9.0878 30.18 Al-Buhuti 431 1.6478 68.92

Saudi Fatwa 2021 7.7267 37.9 Ibn hanbal 349 1.3343 70.26

Al-Asqalani 1794 6.8588 44.76 Al-Mirdawi 285 1.0896 71.35

Ibn Qudama 1311 5.0122 49.77 Al-Si’ddi 274 1.0476 72.4

Ibn Al-Qayyim 1041 3.98 53.75 Al-Shawakani 238 0.9099 73.31

Ibn Baz 1025 3.9188 57.67 Ibn Abi Shayba 235 0.8985 74.2

Al-Nawawi 798 3.0509 60.72 Al-Tabari 233 0.8908 75.1

Ibn Kathir 715 2.7336 63.46 AlQurtubi 226 0.864 75.96

Results: IslamWeb Citations

Scholar Freq % Cum% Scholar Freq % Cum%

Muslim 21392 8.3556 8.4 Ibn Uyhaymin 4582 1.7897 46

Al-Bukhari 14986 5.8535 14.2 Ibn Al-Qayyim 4351 1.6995 48

Ibn Hanbal 14036 5.4824 19.7 Al-Asqalani 3281 1.2815 49

Al-Albani 12391 4.8399 24.5 Al-Hakim 3138 1.2257 50

Al-Tirmithi 11092 4.3325 28.7 Ibn Kathir 3046 1.1898 51

Al-Nawawi 8740 3.4138 32.3 Malik 2951 1.1526 52

Ibn Qudama 8644 3.3763 35.7 Khalil 2797 1.0925 53.5

Abu Dawood 8445 3.2986 39 Al-Nasaii 2794 1.0913 54.6

Ibn Taymiya 8176 3.1935 42 Al-Bayhaqi 2380 0.9296 55.5

Ibn Maja 4995 1.951 44 Al-Qurtubi 2346 0.9163 56.47

Results

● In both IslamWeb and IslamQA, the references are predominantly Hanbali (literalist)

● Other schools of Islamic theology are wrong, innovators, and (sometimes) unbelievers (Collocation Analysis)

● Scholars of other schools of Islamic law are cited only for their collections of tradition, not for their opinions (which are usually wrong)

● Al-Azhar’s teachings are innovations and should be avoided by pious Muslims

Problems

● Partial Matching and Evaluation (most partial matching is useful for the purpose)

● Various forms of the name (Ibn Taymiya, ibn Taymiyah, etc.)

Examples

The Canadian Fatwas

Is it permissible to apply for residency in Canada? (IslamWeb:3497) Only in unavoidable necessities can a Muslim immigrate to the Land of Unbelief. Muslim preachers can go there to spread Islam as long as they are safe from the corruption common there.

Is it permissible to use Google AdSense (IslamWeb:80472)

No. Google AdSense shows ads for music and songs, and it shows improperly dressed women.

Democracy

3 questions on IslamQA and 42 on IslamWeb. The answer is that democracy is against Islam and is a form of polytheism.

Jihad

The idea that Jihad is only for defense is ridiculous. The muftis support their argument with a fatwa by Sheikh Ibn Baz in which he concludes that the rule on Jihad differs according to how powerful Muslims are. When weak, they defend themselves, but when Muslims “have enough power, might, and weaponry that allows them to fight all unbelievers, they (must) declare unrelenting war against all”

Future Work: Network Analysis

● Network Analysis shows that in matters of theology Ibn Taymiya is the most important reference, and in matters of law, Ibn Qudama is the key person. Both are Hanbali.

● Network Analysis is still partial, we need more work done, but the scholar affiliations are almost complete

● We are now better prepared to answer the initial questions