This is going to be an interesting and in some ways even fascinating set of blogposts. I have thoroughly enjoyed researching it and playing around with the latest and greates Neo4j tools while doing so, but I must say that it's also one of the first blogposts that I can remember where I am a bit uneasy about the content. Why? Because it's about, or at least in some ways touches, religion.
First let's start with some background here. Some things that you should know about me:
- I was born and raised in Belgium, which is - or at least was - a predominantly Catholic Christian country. There's churches and chapels on every corner of the street here.
- My parents were/are far from religious, never took me to church, but did give me many of the Catholic Christian values - and these were engrained in me even more clearly because of my 13 ears in Jesuit schools in Antwerp and Turnhout.
- as an adult, I became increasingly distantiated from all religious beliefs. In my twenties and thirties I was still a "cultural Christian", I guess, as exemplified by the fact that we got married in church, and baptised all of our 3 children. In my late thirties and forties, ie. now, I becaome convinced that not much good can come of religion - in general. I read Richard Dawkins, Christopher Hitchens, Sam Harris, and similar authors that have a very sceptic, atheist view on religion. And I like it that way, for me, personally.
- that personal choice does not mean that I have something against people that still have a faith. I am totally fine with anyone believing what they want to believe - as longs as they don't hurt others or impose on others during the process.
But, and here's the sensitive bit: this blogpost will be about Islam - and Moslim holy books and texts very specifically. There's no reason for me choosing to write about this specific religion - other than the fact that it came across my path and I thought some of the material was absolutely fascinating.
What does Islam have to do with Graphs?
Well, that's interesting, for sure.
Let me start of by saying that I am by no means a specialist in these matters. I am just a runaway graphgeek that got sucked into another graph rabbithole. And, just in the same way that this has happened dozens of times before, it turned out to be a fantastic case for using graphs for the analysis of religious texts. Specifically, the analysis of hadiths.
Some background on Muslim religious texts
Now, I don't know about you, but if you have read my personal background above, you will probably have guessed that I am no religious scholar. So I had to read up on some of this stuff - Wikipedia to the rescue, of course. Here's some of the background that I learned in the rabbithole:
In Islam, there are a number of different holy books, similar to the different "New Testaments" and the different books in the "Old Testament" in Christianity, I suppose. One of these books is one that we all know: the Quran, which Muslims hold to be the word of God revealed to Muhammad. Muslims believe that the Quran was orally revealed by God to the final prophet, Muhammad, through the archangel Gabriel, incrementally over a period of some 23 years, beginning in the month of Ramadan, when Muhammad was 40; and concluding in 632, the year of his death.
But as I mentioned - there are other texts as well, supplementing the Quran with explanations for some of the Quranic narratives and rulings that also provide the basis for Islamic law in most denominations of Islam. This is what we call the hadiths. And this is important: if you read what a Hadith is on Wikipedia you will learn that it is the
...record of the words, actions, and the silent approval of the Islamic prophet Muhammad as transmitted through chains of narrators.
Interesting - I can kind of feel a graph appearing here already:
What makes this however even more interesting, is the realisation of how important these hadiths have become in different muslim traditions. Some people consider these narrations to be nothing less than the backbone of Islam. Here are some of the interesting things that I have found, and that have made me conclude that this stuff is absolutely fascinating:
- while the number of verses pertaining to law in the Quran is relatively few, hadith give direction on everything from details of religious obligations, to the correct forms of salutations and the importance of benevolence to slaves.
- the "great bulk" of the rules of Sharia (Islamic law) are derived from hadith, rather than the Quran.
- Because some hadith include questionable and even contradictory statements, the authentication of hadith became a major field of study in Islam. Individual hadith are classified by Muslim clerics and jurists into categories such as
- In its classic form a hadith has two parts—the chain of narrators who have transmitted the report (the
isnad), and the main text of the report (the
- hadiths are not the same as a
sunnah: Whereas the 'Hadith' is an oral communication that is allegedly derived from the Prophet or his teachings, the 'Sunna' (quite literally: mode of life, behaviour or example) signifies the prevailing customs of a particular community or people. ... A 'Sunna' is a practice which has been passed on by a community from generation to generation en masse, whereas the hadith are reports collected by later compilers often centuries removed from the source. ... A practice which is contained within the Hadith may well be regarded as Sunna, but it is not necessary that a Sunna would have a supporting hadith sanctioning it.
- Sunni and Shia hadith collections differ because scholars from the two traditions have different opinions as to the reliability of the narrators and transmitters.
- Narrators who took the side of Abu Bakr and Umar rather than Ali, in the disputes over leadership that followed the death of Muhammad, are seen as unreliable by the Shia;
- Narrations sourced to Ali and the family of Muhammad, and to their supporters, are preferred. Sunni scholars put trust in narrators such as Aisha, whom Shia reject. Differences in hadith collections have contributed to differences in worship practices and shari'a law and have hardened the dividing line between the two traditions.
So this is impactful sh!t right? And the fact that these narrations have this intricate patterns that really resemble a game of chinese whispers makes it very intriguing to me: someone tells a story to someone, he or she tells it to someone else, who then tells it to someone else, etc. etc. - who knows how it will come out on the other side. We all know what the dangers of that kind of passthrough messaging are. right?
So I started digging around a bit.
Research into Narrator Networks
Turns out that there are a lot of people looking at these narrator networks already - and I really don't think I will be uncovering anything new in this article. Just a quick couple of searches on Google Scholar yielded enough reading material to last you for days:
- Narrative social structure: anatomy of the Hadith transmission network, 610 - 1505
- Social network analysis of Hadith narrators
- Classification of hadith into positive suggestion, negative suggestion, and information
- THE NETWORK OF HADITH STUDIES IN INDONESIA IN THE 17TH - 19TH CENTURY
- Graph-based text representation for Malay translated hadith text
After doing all that, I had a vague idea that it would be super cool to get these narrator-networks into Neo4j. The Sciencedirect article had already showed me that it should be possible to do so, and to run some graph algos - if I could find some datasets. So a few moments later... I found
- a Hadith Narrators Datasethttps://www.kaggle.com/datasets/fahd09/hadith-narrators?resource=download), which seems to have been inspired by another Hadith-related project
- an actual Hadith Dataset with the texts (and in many cases, their English translations) that we scraped from this website and this one. This is cool because you can actually go and check stuff (using the id's) there are any time.
So: let's take a look at this data, and see how we can have some interesting fun with it in Neo4j in the next few articles.
Looking forward already!
PS: as always all the code/queries are available on github!PPS: you can find all the parts in this blogpost on the following links