<<

A Probabilistic Model of Ancient Egyptian Writing

Mark-Jan Nederhof and Fahrurrozi Rahman School of Computer Science University of St Andrews North Haugh, St Andrews, KY16 9SX, UK

Abstract Most are written as Latin characters, some with di- acritical marks, plus aleph Z and ayin c. An equal This article investigates a probabilistic sign is commonly used to precede suffix pronouns; model to describe how signs form thus sdm means “to hear” and sdm=f “he hears”. in Ancient Egyptian writing. This applies ¯ ¯ A dot can be used to separate other morphemes; to both hieroglyphic and hieratic texts. for example, in sdm.tw=f, “he is heard”, the mor- The model uses an intermediate layer of ¯ pheme .tw indicates passive. sign functions. Experiments are concerned with finding the most likely sequence of The Ancient Egyptian writing system itself is a sign functions that relates a given se- mixture of phonetic and semantic elements. The quence of signs and a given sequence of most important are phonograms, , and . determinatives. A phonogram is a sign that repre- sents a sequence of one, two or three letters, with- 1 Introduction out any semantic association. A repre- Ancient Egyptian writing, used in Pharaonic sents one particular , or more generally the Egypt, existed in the form of hieroglyphs, often lemma of a word or a group of etymologically re- carved in stone or painted on walls, and some- lated words. A determinative is commonly written times written on papyrus (Allen, 2000). Hiero- at the end of a word, following phonograms, to glyphs depict people, animals, plants and vari- clarify the meaning of a word; in their most ob- ous kinds of objects and geographical features. A vious use, determinatives disambiguate between cursive form of Ancient Egyptian writing, called homophones, or more precisely, different words hieratic, was predominantly written on papyrus. consisting of the same consonants. In addition, Most hieratic symbols can be seen as simplified there are typographical signs, for example, three hieroglyphs, to such an extent that it is difficult strokes that indicate the plural form of a noun (also for the modern untrained eye to tell what is de- used for collective nouns). More classes of signs picted. Because hieratic handwriting varied con- can be distinguished, such as the phonetic deter- siderably over time, with notable differences be- minatives, which tend to be placed near the end tween regions and scribes, the creation of com- of a word, next to normal determinatives, but their puter fonts for hieratic is problematic, and con- function is phonetic rather than semantic, i.e. they sequently scholars commonly resort to publishing repeat letters already written by phonograms. hieratic texts in a normalized hieroglyphic font. What makes automatic analysis of Ancient Since Version 5.2, Unicode contains a selection Egyptian writing so challenging is that there was of 1071 hieroglyphs. Henceforth we will use the no fixed way of writing a word, so that table- term sign to refer to a hieroglyph or a hieratic sym- lookup is largely ineffective. Even within a sin- bol. gle text, the same word can often be found written The Ancient is in the fam- in three or more different ways. Moreover, one ily of Afro-Asiatic languages, which includes the sign can often be used in different functions, e.g. Semitic languages (Loprieno, 1995). As in scripts as phonogram or as determinative. Some signs of several Semitic languages (e.g. Hebrew, Arabic, can be used as different phonograms with differ- Phoenician), only consonants are written. Modern ent sound values. Together with the absence of scholars use between 24 and 25 letters to translit- word boundary markers, this makes it even hard to erate Egyptian texts in terms of these consonants. segment a text into words. Generalizing statements can be made about relied on simple Unix applications such as ‘grep’ writings of words. Typically, either a word starts and ‘sed’. The same problem was addressed with a number of phonograms, covering all the let- by Rosmorduc (2008), using manually produced ters of the stem, possibly some covered more than rewrite rules. Further work along these lines by once, followed by one or more determinatives, or a Barthelemy´ and Rosmorduc (2011) uses two ap- word starts with a logogram, possibly followed by proaches, namely cascades of binary transducers one or more phonograms especially for endings, and intersections of multitape transducers, with possibly followed by one or more determinatives. the objective to compare the sizes of the resulting More phonograms can follow the determinatives automata. for certain suffixes. This coarse description is in- A more modest task is to automatically align adequate however to model the wide spectrum of given hieroglyphic text and transliteration, as writings of words, nor would it be sufficient to dis- considered by Nederhof (2008), who used an ambiguate between alternative analyses of one se- automaton-based approach with configurations, quence of signs. similar to that in Section 4, except that manually These factors motivate the search for an ac- determined penalties were used instead of proba- curate and robust model that can be trained on bilities. data, and that becomes more accurate as more Relating hieroglyphic texts and their Egypto- data becomes available. Ideally, the model should logical transliteration is an instance of relating be amenable to unsupervised training. Whereas two alternative orthographic representations of the linguistic models should generally avoid unwar- same language. The problem of mechanizing this ranted preconceptions, we see it as inevitable that task is known as machine transliteration. For ex- our model has some knowledge about the writing ample, Knight and Graehl (1998) consider trans- system already built in, for two reasons. First, lation of names and technical terms between En- little training material is currently available, and glish and katakana, and Malik et al. (2008) con- second, the number of signs is quite large, so sider transliteration between Hindi and Urdu. An- that the little training material is spread out over other very related problem is conversion between many parameters. The a priori knowledge in our and phonemes, considered for example model consists of a sign list that enumerates possi- by Galescu and Allen (2002). ble functions of signs and a formalization of how Typical approaches to solve these tasks involve these functions produce words. This knowledge finite-state transducers. This can be justified by sufficiently reduces the search space, so that prob- the local dependencies between input and output, abilistic parameters can be relatively easily esti- that is, ultimately the transliteration can be broken mated. down into mappings from at most n to at most m In our framework, a sign function is formally symbols, for some small n and m. For Ancient identified by the combination of (a) the one or Egyptian however, it is unclear what those bounds more signs of its writing, (b) its class, which could on n and m would be. In this sense, Ancient Egyp- be ‘phonogram’, ‘logogram’, ‘determinative’, etc., tian may pose a challenge to the Regularity hy- (c) zero, one or two values, depending on the class. pothesis from Sproat (2000). For this reason we One example is the phonogram function for sign do not exclusively rely on finite-state methods in this paper. with sound value r. There is a logogram func- tion for the same sign, with as value the lemma rZ, 2 Sign list “mouth”. A typographical function for the three stokes may have a semantic value ‘plural’ and a Essential to the application of our model is an an- phonetic value that is the masculine plural ending notated sign list. We have created such a list in the -w. form of a collection of XML files.1 Apart from The problem we will address in the experiments being machine-readable, these files can also be is guessing the sign functions given the signs and converted to human-readable web pages. Among the letters. This is related to the problem of au- other things, the files gather knowledge about tomatically obtaining transliteration from hiero- the various functions of the 1071 signs from the glyphic text. As far as we are aware, the earli- 1http://mjn.host.cs.st-andrews.ac.uk/ est work to attempt this was Tsukamoto (1997). It egyptian/unicode/ Unicode repertoire, gathered from a number of transliterations. For example, the information that sources, the foremost of which is Gardiner (1957). the word nmtt, “step”, denoted by the logogram The annotated sign list is necessarily imperfect , is feminine can be used to infer that uses of and incomplete, which is due to inadequacies of the logogram in plural writings should be matched the Unicode set itself (Rosmorduc, 2002/3; Polis to nmtwt, “steps”, with the feminine plural end- and Rosmorduc, 2013), as well as to the nature ing -wt in place of the feminine singular ending of Ancient Egyptian writing, which gave scribes -t. Similarly, the logogram , for hnj, “to row”, considerable freedom to use existing signs in new ¯ is accompanied by information that its stem is hn, ways and to invent new signs where existing signs ¯ so we can identify the use in the writing of hn=f, seemed inadequate. We have furthermore ignored ¯ the origins of signs, and distinguish fewer nuances “he rows”, without the weak consonant j, which of sign use than e.g. Schenkel (1971). disappears in most inflections. Our functions are divided into logograms, deter- 3 Corpus minatives, phonograms, phonetic determinatives and typographical signs. The typographical signs There is currently only one comprehensive corpus include for example the three strokes that indicate of Late Egyptian, which is still under development plurality or collectivity. Another example is the (Polis et al., 2013). Corpora of Middle Egyptian, single stroke, which can function as ‘semogram the object of our study, are scarce however. More- marker’, that is, it indicates that a neighboring sign over, we are not aware of any available corpora of has a semantic function (as logogram or determi- hieroglyphic texts in which each sign is annotated native) rather than a function as phonogram. Other with its function. One attempt in that direction examples of typographical signs include the nu- was reported by Hannig (1995, p. XXXV), with merals. the objective to determine the ratios of frequen- We further distinguish between determinatives cies of four main classes of signs, using the first that are used with a class of semantically related 40 lines of the text of Sinuhe. words, and determinatives that are specific to one It follows that in order to train and test our model, we had to create our own annotated cor- word. For example, the “tree” determinative pus.2 As yet, it is of modest size, including just is used with various nouns related to trees, plants two classical texts, known as The Shipwrecked and wood, whereas the determinative depicting a Sailor (P. Leningrad 1115) and Papyrus Westcar mooring post is only used to write the word mnjt, (P. Berlin 3033). For the convenience of annota- “mooring post”. Where a determinative is specific tion of the text with sign functions, the text was to one word, the same sign can often be used as linearized, that is, information about horizontal logogram as well, that is, the sign can be used to or vertical arrangement of signs was discarded. write a word without accompanying phonograms. Whereas the positioning of signs relative to one For example, can as logogram stand on its another can be meaningful, our current models do own for hr, “to fall”, but it is determinative in not make use of this; if necessary in the future, the ˘ exact sign positions can be extracted from another , hr, where it is preceded by two phono- ˘ tier of annotation. grams for h and r, respectively. ˘ We normalized the text by replacing graphical A few combinations of signs have a single func- variants, such as and , by a canonical rep- tion as a group. For example, is a phono- resentative, using machine-readable tables that are gram nn, whereas an isolated can only be a part of our sign list. We also replaced compos- ite signs by smallest graphemic units. For exam- phonogram nhbt. The combination of signs ple, we replaced a single sign consisting of three ˘ is a determinative for a “group of people”. strokes (typographical sign for plurality or collec- The sign list contains (very rudimentary) infor- tivity) by three signs of one stroke each. Motiva- mation about the morphological structure of words tions for this include convenience and uniformity: written by logograms, in particular the stem and 2As part of the St Andrews corpus, of which data the gender (of nouns). The motivation is that this and code can be retrieved from http://mjn.host.cs. is necessary in order to match sign occurrences to st-andrews.ac.uk/egyptian/texts/ in typeset hieroglyphic texts one may prefer to use tional wisdom, but on several occasions we had three separate strokes and fine-tune the distance to resort to informed guesses, making additions to between them to obtain a suitable appearance. the annotation manual to ensure consistency. Disregarding damaged parts of the manuscripts, Some more examples of annotations are given the segmented texts of The Shipwrecked Sailor in Figure 1. In (b) we see use of the three strokes and Papyrus Westcar comprise 1004 and 2669 to indicate plural, with masculine plural ending words, respectively. These were annotated with -w; the singular noun is dbc, “finger”. In (c), a lo- ¯ functions, using a customized, graphical tool. In gogram consisting of two signs represents the stem this tool one can select known functions for signs, of the verb mZZ, “to see”. A phonogram writes the as present in the XML files mentioned in Sec- second letter of the stem once more. Of the mor- tion 2, but the tool also gives the option to create pheme .tw, which indicates passive, only the t is new functions that are not covered by the sign list. represented by a sign. Illustrated in (d) is that one Per word, we have the sequence of signs of the letter may be represented by several phonograms. hieroglyphic writing, the sequence of letters of the In particular, consecutive phonograms may over- transliteration, and a sequence of functions. Each lap one another in the letters they cover. function in this sequence is linked to one or more In our annotation, each sign is connected to ex- signs, and in the case of e.g. a phonogram or lo- actly one function. We have imposed this con- gogram, a function is also linked to one or more straint to simplify our model, which is discussed letters. Different kinds of functions were already in the next section. In the case of repeated signs discussed in Section 2. In addition to these, there that indicate dual or plural, only second and pos- is the artificial ‘spurious’ function, which is used sibly third occurrences are connected to the ‘mult’ when a sign has no obvious purpose. There is also function, as in Figure 1a, whereas the first occcur- the ‘mult’ function, which is linked to repeated rence is connected to a ‘log’ or ‘det’ function (and (’multiple’) occurrences of signs, to denote duals on rare occasions a ‘phon’ function) as appropri- or plurals. (Ancient Egyptian had a dual form for ate. nouns, next to the plural form; e.g. the dual noun rdwj, with masculine dual ending -wj, means “pair 4 Model of legs”; see Figure 1a.) The examples in the previous section show that An important document in this process was an a sequence of functions can be the intermediary annotation manual that helped to disambiguate between a sequence of hieroglyphic signs and a contentious cases, of which there were many. For sequence of letters of the transliteration. We as- example, we have characterized a phonogram ear- sume that each function is associated with one sign lier as a sign used to represent sound value, rather or several signs occurring consecutively, which than a semantic relation to a certain concept. How- means that the sequence of signs is formed sim- ever, in many cases it is not immediately obvious ply by concatenating the signs gathered one by one whether two words that share letters are seman- from the sequence of functions. In terms of au- tically (etymologically) related. One example is tomata, one can think of functions as appending the sign , which is primarily used as logogram signs at the end of a tape, or in other words, the for ntr, “god”. It is also used in the writing of tape head moves strictly left-to-right. ¯ the word sntr, “incense”, and one may naively in- The relation between the sequence of functions ¯ terpret it as phonogram there. Although the ex- and the transliteration is more involved however. act etymology and even the correct transliteration In fact, the sequences of functions as we have of this word are uncertain, it is highly likely that presented them provide insufficient information to the sign is not merely chosen for its sound value, fully specify the sequence of letters. In the exam- but for its semantic relationship to ntr, “god”, per- ple of Figure 1c, the letters coming from the re- ¯ haps derived from ntr with the causative prefix s-, spective functions would string together to mZZtf ¯ or perhaps in combination with the verb sn, “to rather than mZ.tw=f. In order to complement the smell”, as suggested by de Vartavan (2010). Hence information contained in a sequence of functions the sign must certainly be analyzed as logogram so as to fully specify the transliteration, we have rather than phonogram in both ntr and sntr. added two new types of functions. The first we ¯ ¯ We have as far as possible relied on conven- call epsilon-phonograms. Such a function acts a: “my (two) legs” written again, or rather, scanned, as letters on the tape cannot be changed after they have been writ- ten. By applying a jump with a positive value, the tape head may also move forward, across let- phon phon det mult(2) log ters already written, but not across unwritten tape squares at the right end of the tape. A further constraint is that jumps may only r d w j = j be applied immediately preceding a function that (re)writes one or more letters. This is to exclude b: “your fingers” spurious ambiguity. For example, without this constraint, we could at will apply a jump preced- ing a determinative or following a determinative; the constraint excludes the former. Similarly, an epsilon-phonogram may not be immediately fol- log typ(plur) phon lowed by a jump. With such constraints, an annotation from our corpus can be extended in exactly one way with d b c w = k ¯ epsilon-phonograms and jumps to account for the c: “he is seen” relation between signs and letters. For exam- ple, the sequence of functions from Figure 1c is extended to have a jump one position backward following the logogram. Further, three epsilon- phonograms for ‘.’, ‘w’ and ‘=’, are inserted be- log phon phon phon tween the existing phonograms. In the example of Figure 1d, several jumps with values -1 and -2 are needed. m Z . t w = f To make the preceding more precise, we intro- duce the concept of configuration, which gathers d: “water” three kinds of information, viz. (a) the letters al- ready written on the tape, (b) the current position of the tape head, and (c) a collection of Boolean flags. Initially, the tape is empty, the tape head is phon phon phon phon phon det(liquid) at the beginning of the tape, and all flags are false. One of the flags indicates whether the preceding function was a jump, another indicates whether n w y the preceding function was an epsilon-phonogram. These two flags are needed to exclude spurious ambiguity, as explained earlier. One more flag will Figure 1: Annotations in the corpus, all from the be discussed later. Shipwrecked Sailor. In a given configuration, only a subset of func- tions is applicable. For example, if the tape con- as a phonogram in the sense that letters are gen- tains n and the input position is 0, then a phono- erated, but it does not correspond to any hiero- gram with sound value nw is applicable, resulting glyphic signs (in other words, it corresponds to the in tape content nw with the input position 2. How- empty, or epsilon string of signs). ever, in the same configuration, with tape content The second newly added type of function we n and input position 0, a phonogram with sound call a jump. Here we conceive of the translitera- value t is not applicable, as letters on the tape may tion as a tape that is being written left-to-right, but not be changed. with the possibility that the tape head moves back- In general, every function has a precondition, ward, by applying a jump with a negative value. that is, a set of constraints that determines whether Thereafter, some letters already written may be it is applicable in a certain configuration, and a Phonogram with sound value γ. a: “beautiful (women)” Pre γ is prefix of β or β is prefix of γ. Post If β was prefix of γ and βδ = γ, then δ is added at end of tape. Input position incremented by |γ|. phon phon phon phon det typ(plur) ‘jump’ and ‘epsphon’ flags set to false. Logogram for word γ. Pre i = 0 or (stem after causative prefix) n f r w t i = 1 and α = s. β is prefix of γ. b: “its fields” Post For δ such that βδ = γ, δ is added at end of tape. Input position incremented by |γ|. ‘jump’ and ‘epsphon’ flags set to false. log phon det typ(plur) phon Determinative not specific to any word. Pre ‘jump’ and ‘epsphon’ flags are false. Post Tape and input position unchanged. s h w t = f ˘ Phonetic determinative with sound value γ. Pre γ is substring of α. Figure 2: Two annotations from Papyrus Westcar, Post Tape and input position unchanged. showing the complications of the feminine plural. Jump with value j. Pre ‘jump’ and ‘epsphon’ flags are false. conditions and postconditions. Firstly, the three 0 ≤ i + j ≤ |αβ|. strokes may be purely semantic, in the writing of a Post Input position becomes i + j. collective noun in singular form, where they do not ‘jump’ flag set to true. represent any letters. If the plural strokes do sig- nify plurality in the grammatical sense, they cor- Table 1: Preconditions and postconditions of the respond to the -w ending of masculine plural, or most important functions. We assume the tape to the -wt ending of feminine plural. The same content is αβ and the input position is i = |α|, i.e. holds for the ‘mult’ functions as they occurs in the the length of α. In other words, the tape content corpus; they must be replaced by several different following the input position is β. functions if we consider them at the granularity of preconditions and postconditions. In our corpus we have linked functions marking postcondition, which specifies how its application plural only to the w from the ending, whether it is changes the configuration. The most important the -w ending of masculine plural or the w that is functions are characterized in this manner in Ta- the first letter of the -wt ending of feminine plural. ble 1. This is because the t of the feminine ending would Note that epsilon-phonograms together with the normally be accounted for already by another sign, ‘spurious’ functions guarantee that the model is which could be a phonogram or logogram, as illus- robust against mistakes (either by the modern en- trated in Figure 2a and 2b. coder or by the ancient scribe) and against gaps The same two examples also illustrate the chal- in our knowledge of the writing system. That is, lenge that feminine plural poses to a left-to-right given a sequence of signs and a sequence of let- automaton model. When the feminine t is written ters, we can always find at least one sequence of to the tape, the sign corresponding to the w in front functions that connects the two together. of the t is not seen until many steps later. One pos- Our model has specialized functions in place of sible solution is to use lookahead, but this appears the generic typographical functions as they occur difficult to extend with probabilities. Instead, we in the corpus. For example, the three strokes, for have introduced an additional flag. This is set to ‘plurality or collectivity’, in the model correspond true when a substring wt is seen in the input, to- to several different functions with different pre- gether with a phonogram for t or a logogram for a feminine noun. This flag indicates that an occur- ing the class of function fi, we have: rence of a plural marker (the three strokes or re- i−1 i−1 peated occurrences of determinatives) is required P (fi|fi−N+1) ≈ P (ci|ci−N+1) ∗ P (fi|ci) later for completing the analysis, by recognizing the end of the word, or for continuing the analysis Estimation of both expressions in the right- into the next morpheme within the same word, e.g. side is again by relative frequency estimation, in a suffix pronoun =f as in Figure 2b. combination with smoothing. A peculiar phenomenon in Egyptian writing is It should be noted that not all sequences of func- honorific transposition, which means that a sign tions correspond to valid writings. Concretely, in or word is written first, even though its linguistic the configuration reached after applying functions i−1 position is further to the end of a word or phrase. f1 , the preconditions of function fi may not This applies in particular to gods and kings. For hold. As a result, some portion of the probabil- example, The Shipwrecked Sailor has dwZ.n=f ity mass is lost in invalid sequences of functions. n=j ntr, “he thanked the god for me”, with the We see no straightforward way to avoid this, as the ¯ sign for ntr, “god”, written before the signs for model discussed in Section 4, which allows jumps ¯ dwZ.n=f n=j. Where there is honorific transpo- of the tape head, cannot be captured in terms of sition in the corpus spanning more than one word, finite-state machinery. all these words are put in the same segment. Our model presently does not capture honorific trans- 6 Results position however, which means accuracy is poor for the (few) cases in the corpus. In our experiments, the training corpus was Pa- pyrus Westcar and the test corpus was The Ship- 5 Probabilities wrecked Sailor. We have considered but rejected the possibility of taking two disjoint parts of both After having captured the relation between se- texts together as training and test corpora, for ex- quences of signs and sequences of letters solely in ample taking all odd words from both texts for terms of sequences of functions, the next step is to training and all even words for testing. The argu- estimate their probabilities. An obvious candidate ment against this is that many words occur repeat- is a simple N-gram model: edly in the same text, and therefore there would be a disproportionate number of words that occur in P (f n) = Y P (f | f i−1) ≈ Y P (f | f i−1 ) 1 i 1 i i−N+1 both training and test material, potentially leading i i to skewed results. Here f1, . . . , fn is a sequence of functions, end- Our objective is now to guess the correct se- j ing in an artificial end-of-word function, and fi quence of functions, given the sequence of signs is short for fi, . . . , fj. In our experiments, esti- and the sequence of letters of a word. We deter- i−1 mation of P (fi | fi−N+1) is by relative frequency mined recall, precision, and F-measure, averaged estimation. over all words in the test corpus. This was done About 4000 functions are compiled out of the after removing jumps and epsilon-phonograms, so entries of the sign list. Added to this are dynami- that we could take the annotations from the corpus cally created functions, such as numbers, epsilon- as standard. We have also ignored how func- phonograms and jumps. Because little training tions are linked to letters; the main motivation for material is available, this means a considerable this was to be able to define a suitable baseline, as portion of these functions is never observed, and described next. smoothing techniques become essential. We use Among all sequences of functions that corre- Katz’s back-off (Katz, 1987) in combination with spond to a given sequence of signs, the baseline Simple Good-Turing (Gale and Sampson, 1995). model yields the one that maximizes the product Functions are naturally divided into a small of the (unigram) probabilities of those functions. number of classes, such as the class of all phono- Note that a function can correspond to one, two grams and the class of all logograms. Using these or more signs, so that all relevant partitions of the classes as states, we obtain a second type of model given sequence of signs need to be considered. in terms of (higher-order) HMMs (Rabiner, 1989; As this ignores the letters altogether, the baseline Vidal et al., 2005). For fixed N, and with ci denot- is independent of the model of Section 4, avoid- ing the intricacies of preconditions and postcondi- R P F1 tions. baseline 86.0 86.0 86.0 For a concrete example, consider Figure 1b as N-gram gold standard. The ‘relevant’ items are (1) the N = 1 90.6 90.6 90.6 N = 2 94.4 94.4 94.4 logogram function of for the lemma dbc, “fin- ¯ N = 3 94.4 94.4 94.4 ger”, tied to the first sign, (2) the typographical HMM function of the three strokes, with meaning ‘plu- N = 1 91.4 91.4 91.4 ral’ and realised as letter w, tied to the next three N = 2 91.8 91.8 91.8 signs, and (3) the phonogram function of with N = 3 92.0 92.0 92.0 sound value k, tied to the last sign. Recall and interpolation of N-gram and HMM precision are 100% if ‘retrieved’ are exactly these N = 1 90.5 90.5 90.5 three items. N = 2 94.8 94.8 94.8 We implemented the N-gram models and N = 3 95.0 94.9 94.9 HMMs from Section 5. An acyclic finite automa- ton is first created, with states representing con- Table 2: Experimental results: recall, precision, figurations together with the last N − 1 functions F-measure. or classes. Transitions are labelled by functions, and have weights that are negative log probabili- exact identities of the preceding functions than on ties determined by the chosen probabilistic model. their classes. The best results are obtained with Most of the functions directly come from the sign linear interpolation of the N-gram model and the list. Other functions are dynamically constructed, HMM, weighted 9:1, for N = 3. on the basis of the input signs, as for example ty- pographical functions representing numbers. An- 7 Conclusions and outlook other example is the ‘mult’ function, which is gen- erated if a pattern of one or more signs occurs two Our contributions include the design of an an- or more times. Final states correspond to config- notated corpus of sign use, allowing quantitative urations that have input pointers at the ends of the studies of the writing system, and serving to doc- sequence of signs and the sequence of letters, and ument rare uses of signs. The second main contri- all Boolean flags set to false. bution is a probabilistic model of how signs fol- The shortest path from the initial state to a final low one another to form words. The model is state is extracted using the shortest-path algorithm amenable to supervised training. Unsupervised of Dijkstra (1959). The labels on this path then training will be the subject of future investigation. give us the list of functions on the basis of which Next to automatic transliteration and alignment, we compute recall and precision. our model was designed to improve the accuracy Results are given in Table 2. It is unsurpris- of a tool that automatically turns scanned pages ing that the models with N = 1 improve over of Sethe (1927) into the encoding of Nederhof the baseline. Although the baseline is also defined (2002), using OCR and image parsing. We found in terms of unigram probabilities, it ignores con- that a bottleneck is that some common signs, such sistency of the sequence of functions relative to as (phonogram for Z) and (phonogram the letters. The first-order HMM performs better for tjw), are indistinguishable in Sethe’s handwrit- than the unigram model. This can be attributed ing. It remains to be investigated whether our to smoothing. For example, the unigram model probabilistic model would on average assign a will assign the same low probability to a spurious higher probability to the correct sign in context. function unseen in the training material as to an unseen phonogram, although phonograms overall Acknowledgments are far more likely. The first-order HMM however suitably models the low probability of the class of This work evolved out of intense discussions of the spurious functions. first author with Serge Rosmorduc and Franc¸ois For N greater than 1, the HMMs perform less Barthelemy,´ in the summer of 2012. The anony- well than the N-gram models. This suggests that mous referee reports are gratefully acknowledged. the probabilities of functions depend more on the References Proceedings of the meeting of the Computer Work- ing Group of the International Association of Egyp- J.P. Allen. 2000. Middle Egyptian: An Introduction tologists, pages 71–92. Gorgias Press, July. to the Language and Culture of Hieroglyphs. Cam- bridge University Press. S. Polis and S. Rosmorduc. 2013. Reviser´ le codage de l’egyptien´ ancien. Vers un repertoire´ partage´ F. Barthelemy´ and S. Rosmorduc. 2011. Intersec- des signes hieroglyphiques.´ Document Numerique´ , tion of multitape transducers vs. cascade of binary 16(3):45–67. transducers: the example of transliteration. In Proceedings of the 9th Inter- S. Polis, A.-C. Honnay, and J. Winand. 2013. Build- national Workshop on Finite State Methods and ing an annotated corpus of Late Egyptian. In S. Polis Natural Language Processing, pages 74–82, Blois, and J. Winand, editors, Texts, Languages & Informa- France, July. tion Technology in Egyptology, pages 25–44. Presses Universitaires de Liege.` C.T. de Vartavan. 2010. Snt[r]/snt[r] means ‘[di- vine/godly] scent’. Advances in Egyptology¯ , 1:5– L.R. Rabiner. 1989. A tutorial on hidden Markov mod- 17. els and selected applications in speech recognition. Proceedings of the IEEE, 77(2):257–286, February. E.W. Dijkstra. 1959. A note on two problems in connexion with graphs. Numerische Mathematik, S. Rosmorduc. 2002/3. Codage informatique des 1:269–271. langues anciennes. Document Numerique´ , 6:211– 224. W.A. Gale and G. Sampson. 1995. Good-Turing fre- quency estimation without tears. Journal of Quanti- S. Rosmorduc. 2008. Automated transliteration of tative Linguistics, 2(3):217–237. Egyptian hieroglyphs. In N. Strudwick, editor, In- formation Technology and Egyptology in 2008, Pro- L. Galescu and J.F. Allen. 2002. Pronuncia- ceedings of the meeting of the Computer Working tion of proper names with a joint n-gram model Group of the International Association of Egyptolo- for bi-directional -to- conversion. gists, pages 167–183. Gorgias Press, July. In Proceedings of the Seventh International Con- ference on Spoken Language Processing (ICSLP- W. Schenkel. 1971. Zur Struktur der Hieroglyphen- 2002), pages 109–112, Denver, CO, USA. schrift. Mitteilungen des deutschen archaologischen¨ Instituts, Abteilung Kairo, 27:85–98. A. Gardiner. 1957. Egyptian Grammar. Griffith Insti- tute, Ashmolean Museum, Oxford. K. Sethe. 1927. Urkunden der 18. Dynastie, Volume I. Hinrichs, Leipzig. R. Hannig. 1995. Grosses Handworterbuch¨ Agyptisch-¨ Deutsch: die Sprache der Pharaonen (2800-950 R. Sproat. 2000. A Computational Theory of Writing v.Chr.). Verlag Philipp von Zabern, Mainz. Systems. Cambridge University Press, Cambridge.

S.M. Katz. 1987. Estimation of probabilities from A. Tsukamoto. 1997. Automated transcription of sparse data for the language model component of Egyptian hieroglyphic texts: via transliteration us- a speech recognizer. IEEE Transactions on Acous- ing computer. Journal of the Faculty of Culture and tics, Speech, and Signal Processing, 35(3):400–401, Education, 2(1):1–40. Saga-University. March. E. Vidal, F. Thollard, C. de la Higuera, F. Casacu- K. Knight and J. Graehl. 1998. Machine translitera- berta, and R.C. Carrasco. 2005. Probabilistic tion. Computational Linguistics, 24(4):599–612. finite-state machines — part II. IEEE Transac- tions on Pattern Analysis and Machine Intelligence, A. Loprieno. 1995. Ancient Egyptian: a linguistic in- 27(7):1026–1039, July. troduction. Cambridge University Press.

M.G.A. Malik, C. Boitet, and P. Bhattacharyya. 2008. Hindi Urdu machine transliteration using finite-state transducers. In The 22nd International Conference on Computational Linguistics, volume 1, pages 537– 544, Manchester, UK, August.

M.-J. Nederhof. 2002. A revised encoding scheme for hieroglyphic. In Proceedings of the 14th Table Ronde Informatique et Egyptologie´ , July. On CD- ROM.

M.-J. Nederhof. 2008. Automatic alignment of hiero- glyphs and transliteration. In N. Strudwick, editor, Information Technology and Egyptology in 2008,