Automatic R omanization of A rabic Bibliographic Records (2021)

Abstract: International library standards require cataloguers to tediously input Romanization of their catalogue records for the benefit of library users without specific language expertise. In this paper, we present the first reported results on the task of automatic Romanization of undiacritized Arabic bibliographic entries. This complex task requires the modeling of Arabic phonology, morphology, and even semantics. We collected a 2.5M word corpus of parallel Arabic and Romanized bibliographic entries, and benchmarked a number of models that vary in terms of complexity and resource dependence. Our best system reaches 89.3% exact word Romanization on a blind test set. We make our data and code publicly available.

## introduction library catalogues comprise a large number of bibliographic records consisting of entries that provide specific descriptions of library holdings. records for arabic and other non-roman-script language materials ideally include romanized entries to help researchers without language expertise, e.g., figure 1 . there are many romanization standards such as the iso standards used by french and other european libraries, and the ala-lc (american library association and library of congress) system (library of congress, 2017) widely adopted by north american and uk affiliated libraries. these romanizations are applied manually by librarians across the world -a tedious error-prone task. in this paper, we present, to our knowledge, the first reported results on automatic romanization of undiacritized arabic bibliographic entries. this is a non-trivial task as it requires modeling of arabic phonology, morphology and even semantics. we collect and clean a 2.5m word corpus of parallel arabic and romanized bibliographic entries, and evaluate a number of models that vary in terms description tag romanized entry arabic entry author 100a* taymūr, ah ̣mad, ‫اﺣﻤﺪ،‬ ‫ﺗﯿﻤﻮر،‬ details 100d 1871-1930, ، 100e author. ‫ﻣﺆﻟﻒ‬ title details 245a* qabr al-imām al-suyūṭī wa-taḥqīq mawḍiʻihi / ‫وﺗﺤﻘﯿﻖ‬ ‫اﻟﺴﯿﻮطﻲ‬ ‫اﻹﻣﺎم‬ ‫ﻗﺒﺮ‬ ‫ﻣﻮﺿﻌﮫ‬ 245c* bi-qalam al-faqīr ilayhi ta'ālá aḥmad taymūr. ‫ﺗﯿﻤﻮر‬ ‫أﺣﻤﺪ‬ ‫ﺗﻌﺎﻟﻰ‬ ‫إﻟﯿﮫ‬ ‫اﻟﻔﻘﯿﺮ‬ ‫ﺑﻘﻠﻢ‬ place of 264a* al-qāhirah : ‫اﻟﻘﺎھﺮة‬ production 264b* al-maṭbaʻah al-salafīyah wa-maktabatuhā, ‫وﻣﻜﺘﺒﺘﮭﺎ،‬ ‫اﻟﺴﻠﻔﯿﺔ‬ ‫اﻟﻤﻄﺒﻌﺔ‬ 264c 1346 [h.], [1927? m.] ‫م‬ ‫؟‬ ، ‫ھـ‬ physical description 300a 24 pages, 1 unnumbered leaf of plates : ‫ﻏﯿﺮ‬ ‫ﻟﻮﺣﺎت‬ ‫ورﻗﺔ‬ ‫ﺻﻔﺤﺔ،‬ ‫ﻣﺮﻗﻤﺔ‬ 300b illustrations, maps ‫؛‬ ‫ﺧﺮاﺋﻂ‬ ‫ﻣﺼﻮرات،‬ 300c ‫ﺳﻢ‬ subjectname 600a* suyūt ̣ı̄, ‫اﻟﺴﯿﻮطﻲ،‬ 600d 1445-1505. subject -650a tombs ‫اﻟﻘﺒﻮر‬ topic 650z egypt ‫ﻣﺼﺮ‬ 650z cairo. ‫اﻟﻘﺎھﺮة‬ figure 1: a bibliographic record for taymūr (1927?) in romanized and original arabic forms. of complexity and resource dependence. our best system reaches 89.3% exact word romanization on a blind test set. we make our data and code publicly available for researchers in arabic nlp. 1 2 related work arabic language challenges arabic poses a number of challenges for nlp in general, and the task of romanization in particular. arabic is morphologically rich, uses a number of clitics, and is written using an abjad script with optional diacritics, all leading to a high degree of ambiguity. the arabic script does not include features such as capitalization which is helpful for nlp in a range of roman script languages. there are a number of enabling technologies for arabic that can help, e.g., madamira (pasha et al., 2014), farasa (abde-split bib records entries words train 85,952 (80%) 479,726 ∼2m dev 10,744 (10%) 59,964 ∼250k test 10,743 (10%) 59,752 ∼250k total 107,439 599,442 ∼2.5m machine transliteration transliteration refers to the mapping of text from one script to another. romanization is specifically transliteration into the roman script @xcite . there are many ways to transliterate and romanize, varying in terms of detail, consistency, and usefulness. commonly used name transliterations @xcite and so-called arabizi transliteration @xcite tend to be lossy and inconsistent while strict orthographic transliterations such as buckwalter's @xcite tend to be exact but not easily readable. the ala-lc transliteration is a relatively easy to read standard that requires a lot of details on phonology, morphology and semantics. there has been a sizable amount of work on mapping arabizi to arabic script using a range of techniques from rules to neural models chalabi and gerges (2012); darwish (2014); al-badrashiny et al. (2014); guellil et al. (2017); younes et al. (2018); shazal et al. (2020). in this paper we make use of a number of insights and techniques from work on arabizi-to-arabic script transliteration, but apply them in the opposite direction to map from arabic script to a complex, detailed and strict romanization. we compare rule-based and corpus-based techniques including a seq2seq model based on the publicly available code base of shazal et al. (2020). extraction from these collections, we extracted 107,493 records that are specifically tagged with the arabic language code (marc 008 "ara"). filtering within the extracted records we filter out some of the entries using two strategies. first, we used a list of 33 safe tags (determined using their definitions and with empirical sampling check) to eliminate all entries that include a mix of translations, control information, and dates. the star-marked tags in figure 1 are all included, while the rest are filtered out. second, we eliminated all entries with mismatched numbers of tokens. this check was done after a cleaning step that corrected for common errors and inconsistencies in many entries such as punctuation misalignment and incorrect separation of the conjunction wa+ foot_1 'and' clitic. as a result of this filtering, a small number of additional records are eliminated since all their entries were eliminated. the total number of retained records is 107,439. the full details on extraction and filtering are provided as part of the project's public github repo (see footnote 1). data splits finally, we split the remaining collection of records into train, dev, and test sets. details on the number of records, entries, and words they contain is presented in ## task definition and challenges as discussed above, there are numerous ways to "transliterate" from one script to another. in this section we focus on the romanization of undiacritized arabic bibliographic entries into the ala-lc standard. our intention is to highlight the important challenges of this task in order to justify the design choices we make in our approaches. for a detailed reference of the ala-lc arabic romanization standard, see @xcite . phonological challenges while romanizing arabic consonants is simple, the main challenge is in identifying unwritten phonological phenomena, e.g., short vowels, under-specified long vowels, consonantal gemination, and nunnation, all of which require modeling arabic diacritization. morphosyntactic challenges beyond basic diacritization modeling, the task requires some morphosyntactic modeling: examples include (a) proclitics such as the definite article, prepositions and conjunctions are marked with a hyphen, (b) case endings are dropped, except before pronominal enclitics, (c) the silent alif, appearing in some masculine plural verbal endings, is ignored, and (d) the ta-marbuta ending can be written as h or t depending on the morphosyntactic state of the noun. for more information on arabic morphology, see @xcite . semantic challenges proper nouns need to be marked with capitalization on their first non-clitic alphabetic letter. since arabic script does not have "capitalizations", this effectively requires namedentity recognition. the romanization of the word alqahrh 'cairo' as al-qāhirah in figure 1 illustrates elements from all challenge types. ## romanization models we compare multiple romanization models built using four basic techniques with different expectation about training data availability, contextual modeling, and system complexity. the models are listed in chartrans technique our baseline technique is an extremely simple character transliteration approach utilizing regular expressions and exception lists. this technique is built based on the ala-lc guidelines, and is inspired by the work of @xcite ; it comprises 104 regex, 13 exceptions, and one capitalization rule (for entry-initial words). this technique accepts diacritized, undiacritized or partially diacritized input. model rules simple uses chartrans only. ## experimental results the mle simple with 2m words cuts the error from rules morph by 51% (exact) and 44% (ci). notably rules morph outperforms mle simple with 31k words in exact match, and mle simple with 250k words in ci match. the mle morph model improves over mle simple by ∼1% absolute in all metrics (5% and 10% error reduction in exact and ci, respectively). the seq2seq model outperforms the mle morph model by 2.5% absolute (16% error reduction) in exact match, but under-performs in ci match. the seq2seq performance is comparatively much poorer with less data. with 31k words, mle simple's performance is 10 times better than seq2seq; and their performance only becomes comparable with 250k words. we observe that ∼2% of the seq2seq output words are missing, contributing negatively to the system's results. of the three models that address this issue through alignment and combination, seq2seq+rules morph, seq2seq+mle simple, and seq2seq+mle morph, the last two using the mle technique are the best performers overall in exact match. it's noteworthy that in cpi match, mle morph's performance is almost equivalent to the best systems' performance. error type counts source prediction target gold romanization 34 ibrāhīm ibrāhim 52 al-ashqar ashqar nadawāt nadwāt alignment 8 ah ˙mad bū h ˙asan. bū h ˙asan, ah ˙mad. source 5 al-t ˙ab' al-t ˙ab'ah translation 5 shi'r. poems. system romanization 36 al-rayf al-rīf 48 h ˙adath h ˙addatha khassārah, khasārah. hallucination 10 tas ˙al-idārīyah. al-idārīyah. valid variant 2 al-sūfyātī al-sūfiyātī the cpi metric values are consistently higher than ci by ∼1.3% absolute for all models. blind test results presented in the right hand side of ## error analysis we classified a sample of 100 word errors (ignoring capitalization and punctuation) from the dev set of our best performing model (seq2seq+mle morph). our classification results are presented in ## conclusions and future work we presented a new task for arabic nlp, namely the romanization of arabic bibliographic records. our extracted corpus and benchmark data splits, as well as our code base will be publicly available. in the future, we plan to create an online romanization interface to assist librarians. as more data is created efficiently, better models can be created. we also plan to exploit the latent annotations in bibliographic records for improving arabic nlp tools, e.g. using vowelization for automatic diacritization and possible morphological disambiguation @xcite , marked clitics for tokenization, and roman-script capitalization for arabic named entity recognition.