Visualizing Ibn Tulun’s manuscript corpus: (1) From Palladio towards Gephi

It has been a while since I presented my first visualizations of Ibn Tuluns manuscript corpus with Palladio. Palladio is an easy-to-learn tool that works in your browser and thus is independent of your operating system. You just put your data in several simple tables and upload them there. Then you create the relevant connections between the tables in the interface. Basically, all you need is one table for the entities to be connected (nodes) and one for the connections between them (edges).

Also, you can add a second table with a different sets of nodes. In my case, I wanted to know which of Ibn Tulun’s works could be found in which manuscripts. As you can find in the first post, I added a second table for those (or actually the other way around). This table has further geographical information so you can plot the data on a world map and see where most of Ibn Tulun’s manuscripts or works are held today. The two variables give different results as one manuscript can contain up to more than thirty individual works.

In the meantime, however, the data sets uploaded in the prior posts have become somewhat outdated. I have discovered new manuscripts through archival visits and by simply cleaning up my data set. I also added more consistently information about when manuscript copies were produced and on which topics Ibn Tulun wrote the most works. Since I can be impatient and want to see results for the repetitive work that is data entry, I initially used Palladio again and I like the results. And this post will only deal with Palladio, its allure and shortcomings.  Number (2) will then move to Gephi.

The first image shows the most central themes in Ibn Tulun’s corpus. Note in the lower left center the big cluster of hadith related topics, including key words such as hadith, isnad, and so on. The bigger a circle is, the more works it is related to. One issue is, however, that this does not work the other way around: The light circles for works get bigger when you apply more keywords to them. That means that the better you know a work and the more effort you spend on defining it through keywords, the more important it appears in the graph.

Ibn Tulun’s works (light) in relation to topics covered (dark).

In a second step, I looked at the temporal distribution of copies of Ibn Tulun’s works. In order to estimate the diachronic relevance of an author, this is an important step and network visualization can actually be a helpful tool in making rhythms of reception apparent. The second graph shows how works (dark) relate to moments of production (light).

Ibn Tulun’s works (dark) by year of manuscript production (light).

The biggest cluster of works (top right) were produced by 950 AH, shortly before Ibn Tulun’s death. This is an oversimplification; I chose this date for most autographs that cannot be dated otherwise. The only exemptions are works not mentioned in Ibn Tulun’s work list. I assume that they were written even closer to his death in 953 AH.

In the lower half you see proof of an evenly distributed albeit low degree of reproduction between the 16th and 19th century. Finally, the cluster in the top left refers to more concentrated copying activities in the early 20th century. They took place exclusively in Egypt and Syria. There is a visible overlap between these four years as well as with the autograph cluster. It might be interesting to run this visualization again but with decades or centuries instead of individual years. It might also be interesting to include photographic reproductions of manuscripts. It would certainly emphasize the importance of that period for our current evaluation of the author.

Continuing in this line of thought, in what were later readers interested when referring to Ibn Tulun’s works? We cannot automatically assume that reading interests remained the same always and everywhere, unless we’d buy into tropes of an “unchanging Orient”. Let’s not do that.

Instead, one way to get an idea of diachronic developments in reading practices could be to look once more at the topics covered. This time, I related them to the type of manuscript: either autograph or copy.

Topics (dark) relating to type of manuscript (light)

We can see three clear clusters of topics emerging: those that are only covered in autographs, those covered only in copies, and those covered in both. The graph also gives away something about the number of manuscripts addressing certain topics: obviously, the most important topics can be found in the shared cluster. A next step could now be to identify those copies that deal with topics not found in the autograph or shared cluster. Whereas those clusters illustrate continuations of interest (through reproduction or preservation), this cluster could also show changes. To substantiate this hypothesis, we need to look at the times and places of the production of those copies.

This approach does, however, not account for the reproduction of individual works. For instance, the keyword “biography” to be found in the shared cluster refers to a rather significant part of Ibn Tulun’s corpus—overall some fifty works, some of which rank among the largest he has written (see e.g. here). If we only look at the three largest ones, al-Ghuraf al-ʿaliyya fī tarājim mutaʾakhkhirī al-ḥanafiyyaal-Tamattuʿ bi-l-iqrān bayn tarājim al-shuyūkh wa-l-aqrān, and its Dhayl Dhakhāʾir al-qaṣr fī tarājim nubalāʾ al-ʿaṣr, they show quite divergent patterns of transmission.

The first work, which focuses on Hanafis, was copied only once between the 16th and 17th centuries and is nowadays held in Istanbul (the autograph volumes are held in Cairo and London). It is possible that this copy was deliberately made for the Istanbuli context, whereas the other two works were reproduced in a decidedly Damascene framework. The second one only survives in an excerpt from early 17th-century Damascus (now held in Berlin). The final one exists in a fragmentary autograph and three copies made between the 18th and 20th century (held in Cairo and Gotha), thereby indicating different rhythms of reception. The final work indeed might have provided then influential Damascene families such as the Shuwaykis with social capital.

But I digressed. Let’s get back to Palladio and network visualization more general. Palladio shows itself as an easy tool to play around with your data. I think the graphs above make that clear enough. Yet, it has its limitations. Miriam Posner says that more clearly in her introduction to the topic than I can. Palladio does not allow you to use color schemes for your edges and nodes; it does not show the weight of the edges either. And finally, it gives you no tools for further analysis: which nodes are central in connecting clusters to each other and which have more connections to on another than others?

In order to answer these questions, we have to use a more powerful tool, which could be either Gephi or Cytoscape. But both tools require to enter data in a different way wich reduces the bipartite network described here to a monopartite network. In other words, we have to turn either manuscripts or works from nodes to edge attributes. And that will have to remain for a future post.

Thoughts after Workshop: Textual Analysis Using Stylometry (AUB, 24-25 April)

On 24 and 25 April 2018, Najla Jarkas organised a workshop on “Textual Analysis Using Stylometry” at the american University of Beirut. The workshop was hosted by David Wrisley and given by Maciej Eder, an Associate Professor at the Institute of Polish Students at the Pedagogical University of Krakow, Poland, and and at the Institute of Polish Language at the Polish Academy of Sciences.

For those who are not familiar with the term stylometry (as was I before the workshop), it is a method of textual analysis that does not focus on the big and exceptional words but on the frequency of every-day terms in writing. By measuring frequencies and distribution, it has become a major method for everything from authorship attribution (note the case of the identity of the pseudonym Elisabeth Ferrante) and proximity to proving plagiarism.

Within the workshop, we took first steps in using the software R on a preassembled textual corpus of 19th-century English literature. We used Dr. Eder’s stylometry package for R which also can be found on his github page. You also find there two corpora to try out what it can offer you. Following these first steps I tried to apply stylometry to my own small corpus of teaching certificates getting mixed results. This might be in the nature of these texts, being epitomised by the most common three-word combinations being “Muhammad bin Muhammad” and “bin Muhammad bin”. Within the small sample, there was also little proximity to be found between the different texts.

Yet, as digital methods so often do, they make you think about your own methods and conditions of research. And R seems promising when you think of the possibilities in analysing premodern Arabic texts. As historical texts in particular were often to a large degree the product of recompilation of earlier sources, would it not be cool to find out where an author most probably copied from another one? This is basically what Sarah Savant’s Kitab Project promises to achieve.

But what would we need to enable the machine to help us with our texts? Clearly, it depends on what you work on: the period, the genre, and the fame of “your” authors all matter for how fast you can accumulate a relevant corpus. And it is generally better for you if you work with edited sources only, since chances are that you find a copy of those on shamela or another grey website. Even better, you might find them on the github page of Maxim Romanov’s project Open Arabic (current URL / new URL). This is by far the largest and best curated repository of Arabic texts you can hope for at the present moment.

Still, it suffers from what I’d like to call the “edition bias”, which distorts our perspective of Arabic literary of, more so, writerly heritage in much the same way as the better-known survival bias and the more recent “digitisation bias” do. It tends to over-represent works of the Abbasid period, for instance, over those of the Ottoman Period. This is not Maximov’s fault, I have to emphasise! It is simply the nature of modern academic tradition which, in turn, also has built upon the modern and traditional Arabic traditions in valuing and hierarchising literary works and other writings according to often implicit standards.

In other words, despite its many merits, I urge you to not to take the numbers it gives you for included works from different centuries as statistically sound representations of the ups-and-downs of actual literary production. I have before spoken about the size of Ibn Tulun’s written corpus: the surviving works alone range in the hundreds. So, what do we find on Open Arabic?

Ibn Tulun works in Open Arabic

Six works, only one of which has a considerable size! Even Ibn Abd al-Hadi (see IbnMibradHanbali), whose works were rarely copied in manuscript, has fourteen entries! One reason for the selection of works by both authors is a continuing interest in the Arab world in their religious and ethical writings. Other works, some of which have been introduced on this blog before, are currently not regarded as edition worthy (you see, there is the bias).

So, one main obstacle in applying stylometry to my own project is the lack of a sufficient corpus. As Dr. Eder explained, however, you would not need to transcribe everything in your corpus. A few passages per book might be enough to get you started. And it might be interesting to run these analyses not only when your corpus has been finalised but regularly in the process.

But I was wondering also whether we can actually use this method for cases like teaching certificates and other documentary sources. Even though Florian Sobieroj has shown in an article, that these texts never assumed a uniform format, we cannot get around the long chains of names connected into long chains of transmitters and interrupted by the likewise long titles of books. There is not much verbal action happening in those—nor in much of hadith literature.

In turn, this is connected to the question which parts of such texts were actually conceived of by their authors. Which parts of such texts could we use as the standard by which to evaluate the authorship of other passages or works? The basmalla? The tamhid? The justification of the work? The chains of transmission? The interpretation of their source material? This is a tricky question and I have no answer for it. And this comes before even problems connected to machine-readability are taken into account. These include the issue of the assimilation of the “wa” to the following word, the distinction search functions make between words with or without article, plural forms, let alone letters that become visible in writing only when the letter is present.

So, where is the silver lining of all those obstacles I keep ranting over? I would say that all of us can be the silver lining. We just need to share our own transcripts with each other and the Open Arabic (soon Open ITI) project in particular, thereby enlarging our shared corpus of machine-readable texts. These can even be partial ones like my contents list of Ibn Tulun’s biographical dictionary al-Ghuraf al-ʿaliyya. And the benefits of sharing your data go way beyond the applicability of stylometric analysis. It is perhaps the best entry point to understand better the opportunities digital humanities offer for our research and its dissemination. Or perhaps I am just idealistic in this matter…

Ibn Tulun manuscripts in Leiden

Among other libraries, Leiden University hosts several autographs by Ibn Tulun (for an introduction of the Oriental MS collections, see here). The collection is quite extraordinary among those, since every Ibn Tulun text is bound individually, even though most of them are of modest size. Their page numbers range between single and low double-digits. Judging by my experience that would make them ideal candidates for publication in majmu’as (and I address that issue in an article submitted to the Journal of Islamic Manuscripts).

Unfortunately, I have not yet been able to consult the whole collection in person. So far, I had to rely on the catalogue made by Carlo von Landberg shortly after the acquisition in the 1880s and the Handlist of P. Vorhoove. In both, the Ibn Tulun manuscripts are clustered within a range of about twenty call numbers (132-146 in Landberg, 2503-2520 in the Handlist). While this could be attributed to their common author, it is also possible that this cluster was retained from the collection of the Cairene seller Amin al-Madani and ultimately from their original state in autograph majmu’as.

Be that as it may, Leiden has uploaded one of those manuscripts, MS Or. 2512, which contains the short text Tuḥfat al-ḥabīb fīmā warada fī al-kathīb. This is, in fact, the title as it is given in Ibn Tulun’s own work list, whereas the Leiden catalogue gives a slightly different title that is written on the first recto of the manuscript: Tuḥfat al-ḥabīb bi-akhbār al-kathīb.

This is apparently owed to the author’s phrasing that this text contains “mā akhbaranā shaykhunā al-muḥaddith…” and perhaps also to titling conventions at the time when this title was added (the hand is different and more modern than the author’s). Yet, both titles refer to the same work as Ibn Tulun mentions the “warada” title on the verso of fol. 1.

Initially, I was surprised that the writing already begins on the recto of fol. 1. For Ibn Tulun this is highly unusual, especially since the text appears to be a (very well preserved) fair copy. To elaborate, it contains no other handwriting than the author’s, and that is restricted to an even and regular text block of 23 lines per page. The margins seem wider than I have seen in other, more annotated Ibn Tulun manuscripts.

Getting back to my surprise, a quick check on the verso made sure that the text begins only here. Instead, the writing on the recto, albeit also in Ibn Tulun’s hand, seems to be an audition certificate, giving part of the isnad, some of the attendants and the date of the text’s recitation: 9.11.936/15.07.1530. ّIt also indicates that all attendants received a certificate for transmission (ijāzat riwāya) from the author.

The catalogue gives that date as the date of the text’s completion but I am uncertain whether that conclusion can be so easily made. I am not even sure whether we can assume that this specific manuscript was completed before that date. The clean state of it suggests rather that it might be a fair copy of the original, which would have been in existence by 936/1530.

The text itself is a collection of reports and sayings about Moses (al-kathīb) and his shrine (maqām/ziyāra) near the village Masjid al-Qadam, south of Damascus. The most interesting thing about it – for me – is that it appears in Ibn Tulun’s biographical dictionary Dhakhāʾir al-Qaṣr fī tarājim nubalāʾ al-ʿaṣr.

At least three of the biographees included in this work heard recitations of this work. One of those heard it recited at the “Ziyārat al-Kathīb close to the village Masjid al-Qadam” on the same day as the one given in the samāʿ. This Muḥammad b. Mūsā b. ʿAbduh al-Qubaybātī al-Ḥanbalī known as Ibn Qayṣar went on to write a mulakhkhiṣ of this work, giving a rare proof to Ibn Tulun’s reception through emulation.

 

The real manuscripts of Dar al-Kutub

In December 2017, I attended a workshop on Arabic codicology at the French Archaeological Institute in Cairo (IFAO). It was taught by Elise Franssen and co-organized by Mathieu Eychenne and Abbès Zouache.

In this context, we also paid a visit to the Dar al-Kutub, the Egyptian National Library, which holds one of the largest collections of Arabic manuscripts in the world. I also visited its department for manuscript on two more days during my stay. Noah Gardiner has written an exhaustive guide to research and especially the manuscript catalogues of the Dar al-Kutub.

It was my second visit to this institution, after I had spent a week there in November 2016. Before this first visit I had heard from friends and colleagues that with such little time it would not make sense to even try to get access to the physical manuscripts, and thus I restricted my research to the microfilm section, which is situated in a different part of the city (Bab al-Khalq).

To be sure, this visit paid other dividends but it made it apparent to me several questions that could not be answered without consulting the manuscripts themselves. And research at the Nile branch where the manuscripts are kept turned out to be much more pleasant than anticipated. The staff is in general very forthcoming and the head of the section is knowledgeable in manuscripts and himself an experienced editor (muḥaqqiq).

Some things should, however, be considered prior to one’s visit. These are not always congruent with the procedure at the Bab al-Khalq branch, and actually less strict. For instance, computers are allowed. The first thing you should prepare is a list of manuscripts you want to see with call numbers, titles and author names. Secondly, bring your passport or another kind of ID. You will have to leave it at the entrance.

You will need your institution to provide you with a letter of recommendation in Arabic. Best, if it already lists the manuscripts you aim to see. If your institution is not able to do that, one alternative option is to ask at the IFAO if they provide a letter.

The other thing you will need is time. There is the issue of finding and bringing the manuscripts. You can only have one on your desk so these intervals appear repeatedly. And on the first day you might be invited for a review of your letter of recommendation as well. The best time to arrive is around 10:00 a.m. Although the section opens at 9:00, the staff often arrives later than that.

With a closing time at 2:30 p.m., you might need at least a week if you are interested in the content of a longer work. Time is also required if you prefer to get images of the manuscript. In my experience, they will usually be made within the day but not long before closing time. And if you don’t want the full manuscript, calculate an extra day to get also those pages photographed that were missed on the first try (Do not make the mistake I made!).

Finally, the images are of a good quality albeit not of a resolution as high as those you get from, let’s say, Chester Beatty Library. But then you pay a pittance compared to that library. The only downside is the watermark that all images from Dar al-Kutub carry. Unfortunately, that leads to some annotations being not as legible as in the manuscript itself.

During my admittedly short stay, the other visitors could be counted on one hand. So if you need manuscripts from the Dar al-Kutub, the time to get them is now.

Did Ibn Ṭūlūn read Ibn Iyās? A manuscript from Paris

One obvious course in establishing a scholar’s importance as well as his intellectual biography is the search for manuscript copies of his works. Whereas this step of my project is mostly finished, a recent attendance at a codicology workshop at the IFAO in Cairo did bring up this topic once more.

I am grateful to IFAO’s own Robin Seignobos who pointed me to MS Paris, BnF, Or. 3973, which contains a text on Nile tides ascribed to one Shams al-Dīn Muḥammad al-Dimashqī al-Ḥanafī (fols. 170-189). He also made me aware of David Wasserstein’s article “Tradition manuscrite, authenticité, chronologie et développement de l’oeuvre littéraire d’Ibn Iyās” (Journal Asiatique 280 [1993]: 81-114) which provides a more detailed description of the manuscript and the text.

Finally, Robin speculates that this text, “Nuzhat al-khāṭir wa-bahjat al-nāẓir fī ziyādat al-nīl wa-nuquṣānuhu wa-muntahā ziyādatihi wa-awānihi“, was authored by Ibn Ṭūlūn.  If this is the case, this would be the second Ibn Ṭūlūn text in the Bibliotheque nationale de France. The other one is a short prayer likewise included in a composite manuscript (MS ar. 1945, fols. 67b-68a) which references itself as “ṣalāt Ibn Ṭūlūn” (fol. 68a).

Yet, in both cases the question remains whether the author really was “our” Muḥammad Ibn Ṭūlūn. Both manuscripts are later copies of an original according to their colophons. It is interesting that the given author name, in MS 3973, lacks the most distinct part of Ibn Ṭūlūn’s writerly identity, whereas in MS 1945 it is the only element of appellation.

Here, however, I will rather talk about the topic of the text on the Nile to substantiate Robin’s suggestion. Ibn Ṭūlūn wrote texts on Egypt (al-Ajwiba al-jalliyya ʿan al-asʾila al-miṣriyya, Ḥawar al-ʿuyūn fī tārīkh Aḥmad Ibn Ṭūlūn, ʿAjab al-dahr fī tadhyīl min malik Maṣr) and he wrote texts on recurring natural phenomena (e.g. in his Nukat al-tārīkhiyya, nos. 19, 22 or his works on animals or plants) but there is no evidence in his work list nor his autograph manuscripts that he ever combined both.

Moreover, as far as we know he never traveled to Egypt to see the Nile with his own two eyes. (In turn, this might help explain why his name is given as it is in a compilation that is clearly Egyptian. For an Egyptian audience, he was simply a Ḥanafī and Damascene.)

I should mention that the Nuzha is vocalized throughout. While this can be attributed to the manuscript being a later copy, it might point to a very different readership that Ibn Ṭūlūn’s autographs originally had.

That being said, the Nuzhat al-khāṭir shares some characteristics with Ibn Ṭūlūn’s known writings. But in some ways it stands out amongst them: The basmallah is followed by an exceptionally short Tamḥīd: “al-ḥamdu li-llāh”. Elsewhere, this section often covers several lines of texts. Instead, it is followed here by several lines of rhymed prose.

Then, the text starts in earnest after the ubiquitous “wa-baʿd”. In general, Ibn Ṭūlūn would almost instantly follow this with the title of the work and often an indicator towards its genre (most often “taʿlīq”). This element is missing in this text, which could discredit it immediately as a false ascription or possibly the work of another Damascene Ḥanafī scholar by the name of Muḥammad. However, the following introduction sounds very much like something that Ibn Ṭūlūn could have written:

فقد وقفت على كراريس مخرومة الاوائل متعلقة باخبار المبارك الاعلام جامعها و يمكن الوقوف على اسمه من ديباجة تاريخ له و سماه بدايع الزهور في وقايع الدهور وجدتها محتوية على لطائف و حوادث و غرائب و تواريخ في زيادة النيل و نقصانه
fa-qad waqaftu ʿalā karārīs makhrūma al-awāʾil mutaʿlliqa bi-akhbār al-mubārak lā aʿlam jāmiʿahā wa-yumkin al-wuqūf ʿalā ismihi min dībājat tārīkh lahu samāhu “Badāʾiʿ al-zuhūr fī waqāʾiʿ al-duhūr” wajadtuhā muḥtawiyyatan ʿalā laṭāʾif wa-ḥawādith wa-gharāʾib wa-tawārīkh fī ziyādat al-Nīl wa-nuqaṣṣānihi
I have come upon some incomplete quires attached to “Akhbār al-Mubārak”.*  I do not know whether the work is complete. It is possible to gather the ism (the author’s name or the work’s title?) from the poem on history (or date?). He called it “Badāʾiʿ al-zuhūr fī waqāʾiʿ al-duhūr”. I found it comprises subtleties, events, oddities, and dates of the Nile’s high and low tides. 
* I am not sure whether this is a title; the name Mubārak could relate to one of several traditionaries (e.g. ID: 14138, 3960, 14173, 14212, 14292, 14410, 14457, or 14081 in the onomasticon arabicum).

The name of the excerpted work will be well-known to most people familiar with the later Mamluk period. It is none other than the great chronicle of Abū al-Barakāt Muḥammad Ibn Iyās al-Jarkasī al-Ḥanafī (1448-1524), which is perhaps the most important Egyptian source on the Ottoman conquests.

According to Brinner’s article in the Encyclopaedia of Islam 2, his oeuvre remained relatively unimportant in his own time, which is supported by the state in which it was found by the author of the present treatise. If this indeed was the case, the work’s reception seems more probable in the first decades after his death than much later.

As far as I know, no connection between him and his Damascene counterpart Ibn Ṭūlūn has so far been known. Yet, Ibn Ṭūlūn would have been the person to acknowledge the value of an obscure fragment he found in the back of a manuscript.

The way the text is introduced further points to Ibn Ṭūlūn as the author: Instead of an author or abstract text, the author refers to a distinct manuscript, apparently a majmūʿa containing at least two texts. What follows, is in form and content quite similar to many of Ibn Ṭūlūn’s works, namely commented excerpts of another author’s text, which he extracted and compiled around a specific topic.

The text is structured by source and thereby to a certain extent also by theme.  It begins with legends or sayings about the Nile and its springs that is followed by a description of its geography (one of the sources there is al-Masʿūdī). Then the text addresses the measurement of the nile floods (starting fol. 176b). A strict annalistic order begins only on fol. 181b and seems to be taken from a work by Ibn al-Jawzī. From there to the end, nile floods from 208 through 922 AH are described.

Unfortunately, I must admit that I do not know Ibn Iyās’ Badāʾiʿ well enough to say how much of this treatment of the Nile is taken from his work. Yet, to me it seems that such an argument would not be found in a chronicle of a basically political-social nature.

However, the structure is reminiscent of Ibn Ṭūlūn’s bio-topographical work on a cemetery in Damascus, Ghāyat al-bayān fī tarjamat al-shaykh Arslān. The biography as such is followed by a description of the cemetery and concluded with several biographies and events in which it played a role. Therefore, I would say that it is probable that this work on the Nile be added to Ibn Ṭūlūn’s established corpus.

That leaves the question why this text does not carry the characteristic description as a taʿlīq. One tentative answer could be that it was not written in a scholarly or educational context. That might also explain why it is not mentioned in Ibn Ṭūlūn’s work list.