TEI-encoding of classical Arabic grammatical sources

The project

The major grammatical treatises of classical Arabic, widely investigated by scholars, are unfortunately accessible online mostly in form of digitized or scanned copies of modern printed editions, but standards-compliant digital collections, and semantic as well as linguistic annotations of their contents are not available.  For this reason, I have started working on a project aiming at the creation of a digital collection of TEI-encoded classical Arabic texts, marking the relevant information, such as the linguistic terminology, the grammatical sources employed by grammarians, and the references.

For the masterclass, my objective was to design a general schema I could apply to a number of texts, and to test it on the first of my sources, the Kitāb Sībawayhi (8th cent.)

Provisional TEI-schema (before the masterclass)

Before the masterclass, I had been working on a provisional TEI schema for my texts, designed as in this example:

<!–General book structure: –>
         <pb ed=”Harun” n=”I:12″/>
         <div n=”I:1″ type=”chapter_bab”>
            <head>هذا بابعلم الكلم من العربية</head><lb/>
<!–Specific information: –>
            <p>[…]
               <ref type=”grammar” ana=”accusative”>النصب</ref>
               […]
               <ref type=”source” ana=”Quran” n=”II:275″>فمن جاءهموعظة من ربه</ref>
               […]</p>
         </div>

The first tags refer to the basic elements of the book, namely the page numbers as per the edition, the number of the chapter (n=“#Volume:#Chapter), and the title of the chapter (<head>[…]</head>).

The second section refers to the elements to highlight in the text: grammatical terms and external sources. Both had been encoded using the tag <ref>, then providing additional information in the attributes within. So, the attribute @typeserved to distinguish between grammar and sources, while the attribute @ana provided either the translation of the grammatical term or the name of the source. In this last case, the additional attribute @n served to provide the number of the sūra and the verses quoted.

What happened in the workshop

– The tags

The very first day, with the help of the instructors and of Laurent Romary in particular, I completely redesigned the schema, eventually opting for more fitting tags. I kept unchanged the general tags (those for chapters, page numbers, and titles), and used <term> and <seg> for grammatical terms and external sources respectively:

<term type=”grammar” corresp=”entries.xml#naSb”>النصب</term>

<seg corresp=”bibl.xml#Q_II_275″>فمن جاءهموعظة من ربه</seg>

Both tags now contain a @corresp attribute, that points to external files by means of a given @xml:id.

In the case of the grammatical terms, the corresponding file “entries.xml” is structured as a dictionary:            

<div>
          <entry xml:id=”naSb”>
               <!–              <gramGrp><pos/></gramGrp>–>
               <form><orth>نصب</orth>
               </form>
               <sense>accusative</sense>
            </entry>

[…]

<div>

Whereas the file “bibl.xml” contains a list of references:  

<listBibl>
            <head>Reference from the Quran</head>

<bibl xml:id=”Q_II_275″><title>Quran</title><citedRange unit=”sura:verse”>
              II:275</citedRange></bibl>

[…]</listBibl>

– The TEI Header

Another valuable addition to my work was the TEI header, whose importance I had never really considered but that represents a fundamental element when it comes to providing information on the setting and development of the project. I have then been working on its drafting during the masterclass, taking notes on how to represent the info I’d want to add:

<TEIxmlns=”http://www.tei-c.org/ns/1.0″>
            <teiHeader>
                        <fileDesc>
                                    <titleStmt>
                                               <title>title of the project(/current document)</title>
                                               <funder>source of funding for the project</funder>
                                               <author>author of the project</author>
                                               <!–<respStmt>
                                                           <resp>Responsible for the project</resp>
                                                           <name></name>
                                                           <!-\-Here goes the info on the person who works on it (the field is not necessary if the resp coincides with the author)-\->
                                               </respStmt>–>
                                    </titleStmt>
                                    <publicationStmt>
                                               <!–                                         <p>Publication information of the source</p>–>
                                               <distributor>body under which you publish the project</distributor>
                                               <authority>(release authority) the name of person or agency for making a work available, other than a publisher or distributor</authority>
                                    </publicationStmt>
                                    <sourceDesc>
                                               <p>Information about the source (i.e. bibliographical reference if it’s a book)</p>
                                    </sourceDesc>
                        </fileDesc>
                        <encodingDesc>
                                    <!–      <appInfo>
                                               <!-\-<applicationident=”TEI_fromDOC”version=”…”></application>-\->
                                               Info on the software used for conversion of texts (doc to TEI, forinstance)</appInfo>–>
                                    <tagsDecl>
                                               <namespace name=”http://www.tei-c.org/ns/1.0″>
                                                           <tagUsage gi=”NameOfTheTag”>declaration of how tags have been used throughout the project (=specific purposes the tag has been used for)</tagUsage>
                                               </namespace>
                                    </tagsDecl>
                        </encodingDesc>
                        <profileDesc>
                                    <langUsage>
                                               <language ident=”en” rendition=”rtl/ltr”>language</language>
                                               <!–description of the languages appearing in the project–>
                                    </langUsage>
                        </profileDesc>
                        <revisionDesc>
                                    <change>=version, meaning the big stages/phases of the project</change>
                        </revisionDesc>
            </teiHeader>

Next steps

So far, I have encoded the Kitāb Sībawayhi only partially, so the next immediate step is to complete the task and apply the same TEI-schema to the other textual resources I want to include in my project.

Also, I will have to get a little more familiar with XSLT, on which I started working during the masterclass to have a visual representation of the work I was doing, but without having a clear idea on what exactly I want to produce as a final output.

Besides that, there is still some work to do in dealing with what other information would be important to encode in each text and improving the lexicon.

Special thanks

To all #LexMC18 team, both instructors and participants, and especially to Laurent and Toma!