Deep Learning Meets Egyptology: a Hieroglyphic Transformer for Translating Ancient Egyptian (2024)

Abstract: This work explores the potential of Transformer models focusing on the translation of ancient Egyptian hieroglyphs. We present a novel Hieroglyphic Transformer model, built upon the powerful M2M-100 multilingual translation framework and trained on a dataset we customised from the Thesaurus Linguae Aegyptiae database. Our experiments demonstrate promising results, with the model achieving significant accuracy in translating hieroglyphic into both German and English. This work holds significant implications for Egyptology, potentially accelerating the translation process and unlocking new research approaches. Source code at https://github. com/mattia-decao/hiero-transformer.

text: Proceedings of the 1st Workshop on Machine Learning for Ancient Languages (ML4AL 2024), pages 71–86 August 15, 2024 ©2024 Association for Computational Linguistics
former models focusing on the translation of ancient Egyptian hieroglyphs. We present a novel Hieroglyphic Transformer model, built upon the powerful M2M-100 multilingual translation framework and trained on a dataset we customised from the Thesaurus Linguae Aegyptiae database. Our experiments demonstrate promising results, with the model achieving significant accuracy in translating hieroglyphic into both German and English. This work holds significant implications for Egyptology, potentially accelerating the translation process and unlocking new research approaches. Source code at https://github. com/mattia-decao/hiero-transformer.

heading: 1 Introduction
text: Egyptology, with its rich trove of texts and inscriptions, has recently begun to embrace the potential of computational linguistics. However, a notable scarcity of publications on the topic is evident, with existing efforts primarily focused on optical recognition of hieroglyphs rather than their translation (Sommerschield et al., 2023). Notably, the development of these resources primarily originates from computer science disciplines and highlights the need for deeper integration with Egyptology field.
We bridge this gap by proposing an Egyptologydriven automatic translation approach, merging
*Mattia De Cao made the most significant contributions to this study, including developing the study conception and its elaboration, designing the experiments, mining/analyzing the data and writing the manuscript. Nicola De Cao supported the implementation of computational models, created the paper layout, and revised the manuscript. Angelo Colonna reviewed the human evaluation process and ancient Egyptian background material. Alessandro Lenci contributed to widening the automatic evaluation phase and provided technical review.
Egyptology with Natural Language Processing (NLP) tools. Our Hieroglyphic Transformer translates ancient Egyptian using an adaptation of M2M100 multilingual model (Fan et al., 2021) to address hieroglyphic writing’s challenges. We construct a meticulously curated dataset derived from the renowned database project Thesaurus Linguae Aegyptiae (TLA; Richter and Werning, 2023),1 ensuring its compatibility with the model through rigorous data filtering, cleaning and structuring.
Experiments yield promising results, with the Hieroglyphic Transformer achieving reasonable accuracy in translating hieroglyphs into both German and English. Furthermore, we evaluate the model’s performance on texts of varying grammatical complexity and literary styles, highlighting its capacity to handle diverse linguistic structures.
This work holds significant implications for Egyptology. NLP-powered approaches like ours can potentially accelerate and improve translation accuracy and depth. Furthermore, it paves the way for applying Deep Learning models to decipher and translate other ancient languages.
The main contributions of our work can be sum-
marised as follows:
1. presenting a new dataset extracted from the
TLA database;
2. adapting a pretrained model to translate Hiero-
glyphic;
3. showing an automatic and a human evaluation
of the model’s performance.

heading: 2 Background

heading: 2.1 Machine Translation for Ancient Languages
text: The linguistic diversity of the world encompasses over 7,000 distinct languages. Of these, English, Chinese, Spanish, Japanese, and other Eu-
1https://thesaurus-linguae-aegyptiae.de
71
ropean languages represent the most extensive corpora (Summer Institute of Linguistics, 2024; UNESCO, 2024), while languages spoken primarily in Asia and Africa often lack comparable data resources (even thousands of times less). These “lowresource” languages attract research from both humanistic and engineering perspectives, with studies offering novel ideas (Aharoni et al., 2019) or exploring understudied niches (Ahia and Ogueji, 2020).
Ancient languages are also part of this wave, but most of their data remains non-machine-readable (i.e., images of objects with text on them or scans of parchment or papyri). Thus most of the recent attention from the machine learning community was directed to Optical Character Recognition (OCR). Major case of these studies include: (i) Kuzushiji, a Japanese cursive script of 8th-18th centuries (Lamb et al., 2020); (ii) Mayan hieroglyphs (Roman-Rangel et al., 2009); (iii) ancient Chinese character manuscripts (Sun et al., 2022); (iv) Sumerian cuneiform (Ahmed H. et al., 2020); and (v) Akkadian cuneiform (Gutherz et al., 2023).
While ancient Egyptian has a decent amount of data available, a substantial portion remains nonmachine-readable, primarily in physical books and articles. Even though these sources are accessible online, they necessitate significant digitization efforts for effective utilization in language processing.2
Fortunately, the Egyptian language benefits from the numerous publications digitized and translated into German and English collected in the monumental project Thesaurus Linguae Aegyptiae (TLA; Richter and Werning, 2023) which we use as the source of data in this work.

heading: 2.2 Related Work
text: Themajority of recent research in Egyptology using AI focuses primarily on OCR. Examples of such studies include those conducted by Franken and Van Gemert (2013); Hossam et al. (2018); Barucci et al. (2021); Moustafa et al. (2022); Barucci et al. (2023).
Apart from OCR, to the best of our knowledge, only a single publication addresses the task of translation. This work was undertaken by Wiesenbach and Riezler (2019), who sought to address the
2A significant portion of Egyptological articles and books available online have been digitized as images or in a format that hinders machine data extraction. Thus, the first step in making these data usable would be transcribing them into a machine-readable format.
scarcity of resources by incorporating transliteration and POS tags into the training process. This scarcity of publications highlights the need for further research in the application of AI to Egyptology.

heading: 2.3 Ancient Egyptian Language
text: The ancient Egyptian language is a member of the so-called Afro-Asiatic language family and one of the longest continuously attested, having been used from approximately 3200 BCE to 1100 CE (Allen, 2014). Its historical development is usually articulated in six phases: Archaic Egyptian, Old Egyptian, Middle Egyptian, Late Egyptian, Demotic, and Coptic.
Notably, Middle Egyptian (2100-1600 BC) retained its status as a “classical” language for the production of historical and religious texts even after its decline as a spoken language, persisting until the end of ancient Egyptian history. For this reason, we opted for Middle Egyptian as the reference language to train the models in our study (to which we added Old Egyptian as later explained in Section 3.2).
Throughout its existence, ancient Egyptian employed four primary writing systems: hieroglyphic, hieratic, demotic, and coptic. Hieroglyphic consists of pictorial signs mostly carved in stone and used in monumental contexts. Hieratic, was a simplified and cursive form of hieroglyphic, used for writing on ostraca and papyri. Demotic, a late cursive script developed from hieratic, was exclusively employed during the language phase of the same name. Coptic writing was derived from the Greek alphabet, with seven additional letters from Demotic to express sounds absent in Greek , and was solely used to write Coptic.
In this work, we used hieroglyphic (or hieratic transcribed to hieroglyphic) because demotic and coptic scripts were used to write language phases other than the ones we chose to employ, i.e., Old andMiddle Egyptian. Therefore wewill not expand on the other writing systems. For more information about the ancient Egyptian language system, we redirect the reader to Loprieno (1995).

heading: 2.4 Hieroglyphs
text: Ahieroglyph can be classified into three distinct categories: ideogram, phonogram, and determinative (Allen, 2014).
Ideograms indicate the word that they depict. In this way, for example, the hieroglyphr repre-
senting a mouth writes the word “mouth”, while the hieroglyphj representing a house’s top view is actually the word “house”.
Phonograms represent the phonetic structure (sounds) of the individual word depicted according to the rebus principle. For example the signr is used to express the phoneme r.
Determinatives are used to indicate the semantic sphere of the preceding words, and so these signs are not meant to be pronounced. For example, the hieroglyphj , used as determinative, refers to words belonging in the semantic sphere of enclosed spaces and is not read.

heading: 2.5 Gardiner Code
text: The Gardiner code, also called Gardiner’s Sign List, represents the standard system used to identify hieroglyphic signs through alphanumeric codes. It was compiled by the English egyptologist and pholologist Alan H. Gardiner as an integral part of his Egyptian grammar (Gardiner, 1957), which remains a standard reference in the Egyptian language study.
The Gardiner code consists of main categories identified by a capital letter of the English alphabet and a descriptive label (e.g., “A. Human beings, male”). Within these sections, each hieroglyph is
assigned a progressive number (e.g.,𓀀 = A1,𓀁 = A2). For subsequent additions of sign variants, later than the original Gardiner’s list itself, a lowercase letter was added after the number (e.g., in the section “N. Sky, earth, water”, we find𓈖 = N35, 𓈗 = N35a).

heading: 2.6 Transliteration
text: In Egyptology, transliteration is the process of converting hieroglyphs into alphabetical symbols to represent the consonants of ancient Egyptian. It is a convention that makes it possible to organize hieroglyphic signs into dictionaries. The transliteration can also be pronounced, but it should always be remembered that only consonants were written
(not vowels), and in many cases, the phonetic value of the signs is unknown. We can only infer the pronunciation based on the Coptic forms as well as on the spelling of Egyptian words in other ancient languages, and vice versa (Allen, 2014). Phonograms and most ideograms can be transliterated into one, two, or three consonants, depending on the number
of sounds they represent. For instance, the sign𓅓 represents one consonant m, the sign𓄟 represents ms, and the sign𓋞 represents nbw. See Table 1 for examples of hieroglyphs with their Gardiner code, transliteration, and description.

heading: 3 Dataset Construction
text: This work is based on a snapshot collected from the database that also feeds the Thesaurus Linguae Aegyptiae (TLA; Richter and Werning, 2023)3 and last updated in 2018.

heading: 3.1 Thesaurus Linguae Aegyptiae
text: The TLA project aims “to document and annotate the Ancient Egyptian language through its entire lifespan” (Richter and Werning, 2023). This objective manifests in two primary digital outcomes: the text corpus (corpus dataset) and the lemma list (vocabulary dataset).
The corpus encompasses a vast collection of hieroglyphic texts, transliterations, and translations. All entries come enriched with metadata such as production dates, script types and connections among data points. Notably, each corpusword is “lemmatized”, i.e. linked to a specific entry in the lemma list. This allows researchers to access broader information spectrum per data point, including part-of-speech (POS) tags, for each element.
Whilemost texts haveGerman translations, some include English or both, promoting cross-language accessibility and the project’s global reach.
3Project Strukturen und Transformationen des Wortschatzes der ägyptischen Sprache: Text- und Wissenskultur im Alten Ägypten (Structure and Transformation in the Vocabulary of the Egyptian Language: Texts and Knowledge in the Culture of Ancient Egypt).

heading: 3.2 Data Extraction
text: One of the major contributions of this study consists in the construction of a new dataset from the data collected by the TLA project. We chose Middle Egyptian as the reference language, as explained in section 2.3. However, limited data availability led us to include Old Egyptian (2700-2100 BC) due to its close linguistic relationship with Middle Egyptian, enriching the language representation. Our dataset includes specific elements for each data point. Unfortunately, not all elements were consistently present, preventing a complete construction. In Figure 1 we outline the structure of a data point in our dataset. Taking into account all the diverse elements, these include:
• Gardiner code: A unique identifier for each
hieroglyph.
• Transliteration: The alphabetical represen-
tation of hieroglyphs.
• Translation: Either German or English. • Lemma IDs: Numerical identifiers for lem-
mas (basic forms of words).
• Token inflection codes: Information about
the inflectional forms of the lemmas morphologically marked in the script, such as gender and number of nouns. • Datapoint ID: A unique identifier for the dat-
apoint (each one is a text4 containing several sentences). • Sentence ID: A unique identifier for a single
sentence in a text.
• Part-of-speech tags: Labels used to classify
the lexical category of lemmas (e.g., noun, verb, adjective). • Metadata: Unique IDs for data such as lan-
guage phase, and historical period.
During the mining process, preliminary cleansing was performed to eliminate inconsistencies and irregularities, including: (i) tabs, (ii) carriage returns, (iii) line separators, (iv) excessive white space, and (v) multiple hyphens within hieroglyphs.
The total number of data points extracted was 103,906. We then focused on selecting Old and Middle Egyptian data points delving into language phase metadata. In cases where this information was absent but reliably inferable, we examined his-
4From Richter and Werning (2023): “A ‘text’ [...] in the TLA is an entity marked as an independent textual unit by clearly marked text delimiters (beginning and end). An individual text may either consist of writing only, or it may be a multimodal composition of writing and illustrations.”
torical metadata to reconstruct it.5 The total number of datapoints after filtering was 61,605.

heading: 3.3 Data Cleaning
text: A crucial aspect of our work was the development of comprehensive cleansing operations. Initially, we meticulously hand-cleaned several texts, enabling the identification of recurring patterns and the formulation of generalizable cleansing procedures. This iterative process resulted in the creation of over 280 distinct cleaning operations (e.g., elimination of brackets ‘(’, ‘)’ and their contents in German translation, elimination of brackets ‘[’ and ‘]’ while maintaining the content in the transliteration, elimination of ‘!’ from the hieroglyphs). In particular, lacunae were treated differently if they were reconstructed or not. If reconstruction was present, we used it; if not, we discarded the datapoint element (e.g. transliteration) as the training process could be altered. Reconstructions were always used.
An example of a datapoint cleansing process is presented in Table 2. A comprehensive compendium of the cleansing operations, including detailed descriptions, treatment methods, and underlying motivations, is provided in the GitHub repository for our project. 6

heading: 3.4 Validation and Test sets
text: We randomly selected a validation and a test set comprising 100 distinct sources each. Some
5In Appendix A we reported datapoint counts relating to both language and historical phases.
6https://github.com/mattia-decao/ hiero-transformer
sources had multiple translations (i.e., both in English and German) thus we included both versions in the set to (i) increase its size, and (ii) avoid contamination in the training set. Eventually, the validation set had 125 parallel data points, 25 of which possessed English translation, 75 German translation, and 25 containing only transliteration and hieroglyphic. Similarly, the test set had 150 data points, comprising 50 that possessed English translation, 50 German translation, and 50 containing only transliteration and hieroglyphic.

heading: 4 Experimental Design

heading: 4.1 Data Pairing
text: Prior to feeding the data into the model, it was essential to organize the data points into sourcetarget pairs. These represent the input-output pairings employed during training (e.g. Hieroglyphs to German). We used two sources as inputs: egy, i.e. Gardiner code of ancient Egyptian hieroglyphs; and τ , i.e., transliteration. Both of them were paired with five targets as outputs: (i) de, i.e. German; (ii) en, i.e. English; (iii) τ ; (iv) lKey, i.e. lemma IDs; and (v) wordClass, i.e. part-of-speech tags. We reported in Table 3 the list of all different data pairs employed, together with the count of data points in which each pair is present.

heading: 4.2 Training
text: We did not aim to develop novel machine learning techniques or models but rather to harness the capabilities of an existing one and apply it to the Ancient Egyptian language. We then chose to use the finetune M2M-100 model (Fan et al., 2021) for its versatility and effectiveness in multilingual machine translation. M2M-100, originally designed for translating between 100 modern languages, including English and German, was a compelling choice due to its open-source availability and rela-
tive novelty. By utilizing this pre-trainedmodel, we effectively employed transfer learning, a powerful technique that leverages knowledge acquired from a related task to improve performance on a new task. For each experiment, we trained for between 6 and 20 epochs.7
We checked validation loss for model selection every 10% per epoch and employed early stopping if no improvement happened for the past 15-20 evaluations.8 We used the Adam optimizer (Kingma and Ba, 2015) with batch size 16 and a fixed learning rate 3e-5.
We experimented with different mixtures of source and target (e.g., some included/ excluded the use of transliteration or POS tags). Overall, 11 models were trained,9 and we reported a selection
7Initial experiments used 20 epochs, subsequently reduced due to: (i) no improvements after the third epoch, (ii) increased data pairs significantly extended execution time, and (iii) the 12-hour execution limit of the experimentation platform (Google Colab) rendered maintaining the same epochs impractical.
8This value was dynamically adjusted for each experiment due to variations in the amount of data-pairs.
9Due to cost constraints, we conducted most of our experiments with one NVIDIA T4 Tensor Core (16 GB), and the last model (ALL) that mixes all the data available, with one NVIDIA A100-SXM4 Tensor Core (40 GB). For ALL we
in Table 4. The comprehensive table of all experiment metrics results can be found in Tables 8 and 9 in Appendix E.
In the training phase, we gave single data (e.g., transliteration or German translation) to the model by assigning them a special language id token (used as prefix in both the source and target text) already present within the model itself. These were en for English, de for German, ar (Arab) for ancient Egyptian, th (Thai) for POS tags, lo (Lao) for transliteration and my (Burmese) for lemma IDs. Except for German, English, and ancient Egyptian10, the codes were arbitrarily selected from Fan et al. (2021) in order to avoid their duplication in the list where data quantities derived from other languages and language groups are presented (Figure 3 of the same article).
Backtranslation Due to the scarcity of data points containing English translations, we employed the M2M-100 model to translate our entire dataset from German to English and incorporated these translations into training.

heading: 4.3 Metrics
text: To assess the performance of the conducted experiments, we employed two automated evaluation metrics: SacreBLEU (Post, 2018) and RougeL (Lin, 2004).
Automatic metrics do not always correlate with human judgment, so we also employed a human evaluation. For that, we applied the model to a series of examples, 16 in total,11 exhibiting a variety
increased the batch size to 180. 10We hypothesized that using Arab for ancient Egyptian could potentially enhancemodel performance due to its similarities in sentence construction, i.e. verb-subject-object. Further research is required to corroborate this hypothesis.
11Of these, 15 were composed of one to three sentences, 1
of grammatical constructions (listed in Appendix B), subsequently comparing the model’s output against our own translations or those derived from established publications (Bresciani, 1969; Allen, 2015; Grapow, 1952; Gardiner, 1969; Vogelsang, 1913). During the comparison, we rigorously examined all the distinct data pairs generated by the model, evaluating both the quantity and quality of its correct and erroneous outputs.

heading: 5 Results

heading: 5.1 Data Cleaning
text: To assess the effectiveness of our cleaning operations, we conducted and compared two experiments: (i) DE (raw), with raw data; (ii) DE, after the cleaning. Cleaning the data increased the resulting SacreBLEU from 4.0 to 54.4 and RougeL from 18.4 to 62.8. As evident, results have demonstrated that our cleaning procedure significantly improves the model’s training performance.

heading: 5.2 Main Results
text: As evident in Table 4, for translation and transliteration the ALL model (i.e., trained with all data) exhibits the best or second-best performance. This suggests that the model successfully incorporates signals from different forms (e.g., POS tags and transliteration).
Unsurprisingly, mixing back-translation data (DE+EN v.s. DE+ENB) significantly increases performance in English (SacreBLEU 52 → 61 and RougeL 33 → 38). However, it surprisingly increases performance in German as well.
Notably, the DE+ENB model shows the highest accuracy from hieroglyphic to German and English translation. Moreover, both DE+τ and DE+τ+ENB
of eleven.
do not perform better than DE and DE+ENB in German and English. These results suggest that adding transliteration during training may have some detrimental effects on accuracy. We reported a comprehensive list of results in Tables 8 and 9 in Appendix E.

heading: 5.3 N-fold cross validation analysis
text: We did a 10-fold cross-validation to DE and ALL experiments.12 The M2M-100 model was subjected to the same conditions as the previous DE and ALL experiments, allowing for a direct comparison of their performance under different evaluation methods.
The results for the DE experiment exhibited a significant discrepancy, while the performance metrics for ALL were more consistent with the previous findings. This suggests that the validation and test datasets employed previously may have introduced a selection bias, which was mitigated by the larger and more diverse data submitted to training ALL. We reported the full results of n-fold cross validation analysis in Table 10 of Appendix E.
This finding highlights the importance of employing rigorous evaluation strategies to ensure reliable machine learning models, particularly in the context of low-resource languages like ancient Egyptian.

heading: 5.4 Human Evaluation
text: Following the training phase, the model ALL was identified as the most promising candidate due to its superior performance across all data pairs. In this phase, its effectiveness was assessed through a comprehensive trial procedure.
We divided the evaluation process into three distinct steps: (i) Grammatical Complexity, (ii) Literary Passages, and (iii) Stress Test. For every step our evaluation proceeded to analyze all the data pairs (detailed in Section 4.1).
For each Human Evaluation step, the model was submitted to two separate testing waves. In the first wave, the input was presented to the model as Gardiner code, while in the second wave, it was presented as transliteration.
We assessed the sentences based on specific criteria, including: (i) Morphological accuracy; (ii) Grammatical correctness; (iii) Verb-subject agreement in number and gender; (iv) Adequacy of terminology; (v) Semantic coherence.
12This technique was not applied to every experiments due to resource limitations.
This two-pronged approach aimed to assess the model’s performance under both input representations, i.e. hieroglyphic and transliteration. Through this trial procedure, the effectiveness of the ALL model was thoroughly evaluated, demonstrating its potential for a quite accurate and versatile writing of hieroglyphic into transliteration, and both inputs into German, English, Lemma IDs and POS tags. We reported the list of grammatical forms submitted as input in Appendix B.

heading: 5.4.1 Grammatical Complexity
text: We presented exercises of increasing grammatical complexity to the model to assess its ability to handle diverse grammatical structures. All the exercises were extracted fromGardiner’s grammar (Gardiner, 1957). An excerpt is reported in Table 5. The model exhibits no significant difficulties, but rather, it is more sensitive to variations in sentence construction due to low-resource training.

heading: 5.4.2 Literary Passages
text: Passages taken from literary works, encompassing a wide range of grammatical elements and one to three clauses in length, were fed into the model to examine its performance in natural language contexts. The works selected were the “Story of Sinuhe”, the “Tale of the Shipwrecked Sailor”, the “Admonitions of Ipuwer”, and ”The Eloquent Peasant”. We observed that the model performs slightly better than the previous phase. Additionally, we noticed higher translation accuracy with transliteration input compared to the Gardiner code.

heading: 5.4.3 Stress Test
text: We submitted a lengthy passage extracted from the “Story of Sinuhe” to thoroughly evaluate the model’s robustness, testing its ability to handle extended and complex linguistic structures. After that, we submitted the same passage divided into single units. Due to the length of the passage, it has been reported in the GitHub repository for our project. 13 We observed that the model fails with lengthy sentences that exceed three clauses but, when provided with a sentence of one or two clauses, it produces quite accurate results.

heading: 5.4.4 Human Evaluation Conclusion
text: The ALL model performed better with short and medium-length input texts comprising one to two sentences. The generated outputs were effective,
13https://github.com/mattia-decao/ hiero-transformer
Source
𓂋𓐍𓏛𓎡𓅱𓀀𓍿𓅱𓂋𓐍𓏛𓎡𓅱𓀀𓂋𓈖𓎡 D21 Aa1 Y1 V31 G43 A1 V13 G43 D21 Aa1 Y1 V31 G43 A1 D21 N35 V31
Target Prediction
Prediction
Reference
but there are occasional inconsistencies in completing the fields of transliteration, POS tags and occasionally lemma IDs. For input texts exceeding three sentences, the model struggles to produce exact predictions, particularly in terms of precision and completeness of writing.
Regarding the choice of input, despite transliteration is more accurate than Gardiner code, we recommend comparing both results to obtain a more comprehensive understanding.
We observed great accuracy in generating lemma IDs, indicating that they could be actively used to extract additional information from the TLA database.
Finally, the model exhibits no significant difficulties when submitted to an increasing grammatical complexity. Conversely, it struggles as the input length grows and the rare terms increase.

heading: 6 Conclusions
text: We publicly released our dataset and source code and designed them for easy utilization and assessment. The AI model produces suitable results for research applications and is user-friendly.
This work opens up avenues for future research, including expanding the dataset by incorporating other language phases (Late Egyptian, Demotic and Coptic), integrating additional modern languages , and conducting more comprehensive and diversified experiments.
These efforts could pave the way for enhanced
model precision and contribute significantly to the advancement of research in Egyptology and the application of NLP to the translation and study of ancient languages.

heading: A Taxonomy Analysis of Data Mining

heading: B Grammatical Inputs of Human Evaluation
text: The examples submitted to the model during the human Evaluation comprised various type of sentences. The Grammatical Complexity included: adverbial, nominal (A B), verbal (sḏm =f), negative verbal (sḏm =f), pseudo-verbal and stative. The Literary passage included: verbal (sḏm =f and sḏm.n =f), verbal negative (sḏm.n =f), adverbial, nominal (A + pw), infinitive, participle, and two longer sentences. The Stress Test included: infinitive, verbal (causative (sḏm =f), stative, subject-stative, adverbial and containing dates or epithets.

heading: C Data Entry Methods
text: The approach described below ensures that the model receives a clean and standardized representation of hieroglyphic and transliteration, minimizing potential misinterpretations that could arise from
extraneous elements and enhancing its ability to produce accurate translations.
C.1 Hieroglyphic Input
To input hieroglyphs, it is essential to employ Gardiner code. Each hieroglyph must be meticulously cleansed of any brackets, letters, or graphic symbols that extraneously adhere to it, altering its visual representation (it can be checked using Jsesh14). To divide hieroglyphs, a single space should be inserted between them, while any other extraneous character should be eliminated.
The model has been trained on Ancient and Middle Egyptian hieroglyphs and may encounter challenges with inputs from later linguistic phases and grammatical structures postdating the Second Intermediate Period.
We recommend utilizing signs list of Gardiner’s grammar (Gardiner, 1957), or preferably Allen’s (Allen, 2014), for a more accurate use of Gardiner code.
C.2 Transliteration Input
For transliteration input, it is necessary to adhere to conventions similar to the one employed by the TLA.
• Proper nouns should have the first letter capi-
talized.
• It may be beneficial, but not compulsory, to in-
corporate hyphens between individual lemmas of proper nouns or concepts (e.g., sḥtp-jb-rꜥ or wꜢḏ-wr)
• The equal sign (=) to indicate a suffixed pro-
noun must always be preceded by a space and followed directly by the pronoun, without any additional characters (e.g., zꜢ =f m pr)
• The j is utilized for the strong yod while i̯ for
the weak yod.
• A dot should be employed to distinguish the
root of verbs from a suffix other than a pronoun (e.g., n in sḏm.n =f form) and occasionally for the plural/dual.
• A comma should be employed for the feminine
ending and occasionally also for the plural/dual.
14https://jsesh.qenherkhopeshef.org
Transliterated characters can be submitted to the model both as a proper character (e.g., Ꜣ) or according to the computer-encoding system of Manuel de Codage (e.g., A for the Ꜣ; Buurman et al., 1988; Van den Berg, 1997).
To enable the insertion of both upper and lowercase letters, while preserving the encoding of MdC, we have implemented a simple mechanism that allows you to capitalize a letter by preceding it with an asterisk. In practice, a straightforward substitution operation has been created in the section where inputs are entered. For instance, since to obtain ḏ you must insert D, then to get Ḏ you have to type *D; similarly, to attain D, you must enter *d. To input the weak radical i̯ simply enter an i.

heading: D Experiments Graphs
text: 0 5000 10000 15000 20000 Training Step
2000
2100
2200
2300
2400
2500
2600
2700
To ta
l V al
id at
io n
Lo ss
(a) Model DE (raw). Best loss: step 1,800.
0 2500 5000 7500 10000 12500 15000 17500 20000 Training Step
1100
1200
1300
1400
1500
1600
To ta
l V al
id at
io n
Lo ss
(b) Model DE. Best loss: step 4,500.
0 500 1000 1500 2000 2500 Training Step
850
900
950
1000
1050
To ta
l V al
id at
io n
Lo ss
(c) Model EN. Best loss: step 700.
0 2500 5000 7500 10000 12500 15000 17500 20000 Training Step
1300
1400
1500
1600 1700 To ta l V al id at io n Lo ss
(d) Model DE (lem). Best loss: step 3,600.
0 5000 10000 15000 20000 Training Step
1800
1900
2000
2100
2200
2300
2400
To ta
l V al
id at
io n
Lo ss
(e) Model DE+EN. Best loss: step 4,000.
0 10000 20000 30000 40000 Training Step
1800
1900
2000
2100
2200
2300
2400
To ta
l V al
id at
io n
Lo ss
(f) Model DE+ENB. Best loss: step 8,500.

heading: E Taxonomy Analysis of Generated Models: SacreBLEU, RougeL and 10-fold Cross
text: Validation

heading: Future Work
text: This work opens up avenues for future research, including expanding the dataset by incorporating other language phases (Late Egyptian, Demotic and Coptic), integrating additional modern languages , and conducting more comprehensive and diversified experiments. These efforts could pave the way for enhanced
model precision and contribute significantly to the advancement of research in Egyptology and the application of NLP to the translation and study of ancient languages