Automatically Generating I si Z ulu Words From I ndo- A rabic Numerals (2024)

Abstract: Artificial conversational agents are deployed to assist humans in a variety of tasks. Some of these tasks require the capability to communicate numbers as part of their internal and abstract representations of meaning, such as for banking and scheduling appointments. They currently cannot do so for isiZulu because there are no algorithms to do so due to a lack of speech and text data and the transformation is complex and it may include dependence on the type of noun that is counted. We solved this by extracting and iteratively improving on the rules for speaking and writing numerals as words and creating two algorithms to automate the transformation. Evaluation of the algorithms by two isiZulu grammarians showed that six out of seven number categories were 90-100% correct. The same software was used with an additional set of rules to create a large monolingual text corpus, made up of 771 643 sentences, to enable future data-driven approaches.

## introduction artificial conversational agents are frequently deployed to interact with humans and execute simple tasks on their behalf. for such agents to be useful for people who speak south african languages, various natural language processing (nlp) tools need to be built. for instance, if an isizulu speaker is negotiating with a digital assistant to book a restaurant table, it may present a feasible option as follows: it is, however, not only a case of agreeing prefixes. consider the verbalisation of the number 2, -bili: it renders as abantu ababili for 'two people' and izinja ezimbili for 'two dogs', among many forms. ababili is formed by appending the subject concord abato the stem -bili. ezimbili, however, was subjected to phonological conditioning rules when combining the subject concord ezinwithbili hence the word has an -m-. the form depends on the noun class of the noun it quantifies over, which is indicated with the underlined prefixes. this, in turn, is due to the noun class system emblematic of the niger-congo b (ncb) languages foot_0 @xcite ; abantu is in noun class 2 whereas izinja is in noun class 10. isizulu has 17 noun classes. the formation of such words requires understanding of the numerical categories, the patterns for each category, and the resolution of the appropriate prefix for the various categories. afterward, rules for combining a variety of morphemes need to be applied to obtain the final word. in this paper, we propose the first solution to this problem of generating words from indo-arabic numerals for 'standard' isizulu. we collected, analysed, tested, and formalised the text generation rules and designed and implemented two new algorithms that convert numerals to words. the algorithms cover cardinal, ordinal, and set-of-items numerals, and numerical adverbs, which generate noun phrases such as, e.g., ama-apula ayisishiyagalolunye 'nine apples' (with -shiyagalolunye 'nine'), ama-apula wesishiyagalolunye 'ninth apple', amaapula omasishiyagalolunye 'all nine apples', and ngithenge ama-apula kasishiyagalolunye 'i bought apples nine times', respectively. to demonstrate utility of the algorithms, we developed a sentence generation system for isizulu, focusing on handling various numerical types and generated a corpus of 771,643 grammatically correct sentences. this is the first publicly accessible isizulu dataset of its size that is not based on the bible, government documents, or technical manuals. it contains ten times more sentences than the clean nchlt monolingual isizulu dataset @xcite ) that is widely used. these algorithms were developed and implemented using two iterations; for each iteration, we used grammar literature to identify the linguistic categories of numbers, determined the patterns for forming words in each category, and used our linguistic knowledge. our final evaluation is expertfocused, relying on two isizulu grammarians, working collaboratively, to ascertain the accuracy of the algorithms' output. it showed that five of the seven number categories had 100% valid output, one 90%, and one had 30% correctness due to a change in concord. the remainder of the paper is structured as follows: section 2 introduces key linguistic properties of isizulu to demonstrate why generating text from numerals is not trivial and it also discusses existing natural language generation (nlg) work with a special emphasis on isizulu. section 3 presents our novel algorithms and the procedure followed for their development. section 4 presents the expertdriven evaluation and results, section 5 discusses the results and demonstrates the utility of the algorithms via generating a large corpus that can be used in creating data-driven models, and section 6 concludes. ## natural language generation and isizulu nlg research focuses on generating natural language text from a variety of different inputs (e.g., @xcite ). with respect to ncb languages, a few nlg systems and algorithms have been developed, notably grammar rules to generate texts in a specific subject domain @xcite or for a specific task, such as verbalisers for maths equations, ontologies, or language learning exercises @xcite @xcite @xcite . to the best of our knowledge, there are no existing algorithms, let alone implementations, that can be used to programmatically convert numerals to isizulu words. there only exists a grammar fragment to verbalise numbers in the range 1-99 in the weatherfact grammar @xcite . relevant text-to-speech work include marais et al.'s (2020) grammar that has the type small-number to verbalise numbers in isizulu. there is insufficient documentation of the grammar, but the dataset used to create it shows that its capability is likely limited to numbers between 1-10 (marais, 2021b). @xcite work has greater coverage for isizulu, but they only generate ordinal numbers that agree with nouns from noun class 3, the coverage is limited to numbers up to 100 based on our analysis of the documentation, and there is insufficient detail of the number generation process other than regular expressions with modulo arithmetic. this lack of capability is partly due to the complexity of the language, and of the number system specifically. isizulu is a ncb language, most of which possess a highly agglutinating morphology, i.e., words are formed through combining multiple morphemes. all nouns belong to a noun class, which is used to make a part-of-speech in agreement with a noun. the number of noun classes in a ncb language varies depending on the language and the chosen noun classification system. for instance, grout's (1893) classification system has eight noun classes, whereas the most used classification system, originally due to meinhof (katamba, 2014), has 17 noun classes for isizulu. to obtain agreement in isizulu sentences, the class of the noun that is qualified by the number is first identified, its concord(s) (i.e., special morphemes for marking agreement) are identified, and then used together with other morphemes to form the final string for the qualifying number. this process may require phonological conditioning rules to ensure that one obtains a valid word; e.g., aforementioned ezimbili 'two', because isizulu disallows the voiced alveolar nasal n to be followed by the voiced bilabial implosive b and so noun class 8's n of the ezin concord is changed to m. thus, there is still a need for a comprehensive algorithm that can verbalise numbers, both when they agree with a noun or on their own. especially since there are no existing parallel datasets that can be used to train a number-to-text model foot_1 . ## verbalising numbers the algorithms were created by codifying rules from grammar literature over two iterations. all the linguistic knowledge was extracted from @xcite @xcite and supplemented with the first author's knowledge as a researcher who works with isizulu. due to space limitations, we discuss key aspects in the remainder of this section; the complete set of rules are available as supplementary material in the appendix. ## evaluation of the algorithms the aim of the experiment is to evaluate the accuracy of the algorithms we developed. the entire process of algorithm developed up to good quality output took two iterations, illustrated in figure 2 , but due to space limitations, we only report on the evaluation of the second, and final, iteration. 6 it is also with human judgements, since there is no corpus to check the numbers against. to maximise the likelihood of being able to determine why generated texts are grammatically incorrect, if the need were to arise, we chose to rely on two isizulu grammarians to collaboratively evaluate the texts instead of only using isizulu speakers. we describe the methods and results in this section and discuss them in section 5. ## discussion the 'old-fashioned' laborious approach of consulting documentation and encoding it has been shown to work well for the isizulu numbers, considering the results of the final evaluation. the overall process was hampered by a lack of recent and relevant books describing the language's grammar, which required combining material from comprehensive dated books, recent language learning books, our isizulu expertise, and iterations with intermediate testing. the multiple iterations in algorithm development were mainly due to incorporating changes throughout time regarding orthography and noun classification and subsequent refactoring of components, specifically regarding phonological conditioning rules. even though the grammar books used are dated, they were still valuable sources of linguistic information to understand the main mechanism of generating words from numbers. specific issues that surfaced during development were: ## conclusion based on collected rules for speaking and writing numerals, algorithms for automating this transformation were designed and evaluated. the categories of numerals covered by the algorithms include ordinals, cardinals, collections, and numerical adverbs and they include markers for agreement with noun classes where applicable. the evaluation of the final algorithms, after extending coverage and phonological conditioning, by two isizulu grammarians showed that 6 of the 7 categories of numerals have 90%-100% valid output. by combining extant open sourced rules with the ones developed in this work, we created a corpus of 771,643 sentences with a total of 7,533,595 tokens (1,086 unique) to facilitate data-driven nlp approaches. future work includes extending the range of the covered numbers beyond 0-9,999 and using the algorithms to build a tool that can generate isizulu text from mathematics equations and determine their impact on learning with a larger number of people to assess the algorithms' quality and utility. in addition, we will also investigate the use of neural models as adaptable methods for verbalisation. mukiibi, salomon kabongo, foutse yuehgoh, mmasibidi setaka, lolwethu ndolela, nkiruka odu, rooweither mabuya, shamsuddeen hassan muhammad, salomey osei, sokhar samb, tadesse kebede guge, and pontus stenetorp. 2024. irokobench: a new benchmark for african languages in the age of large language models. preprint, arxiv:2406.03368. joan byamugisha. 2019. ontology verbalization in agglutinating bantu languages: a study of runyankore and its generalizability. ph.d. thesis, department of computer science, university of cape town, south africa. joan byamugisha, c. maria keet, and brian derenzi. 2016a. tense and aspect in runyankore using a context-free grammar. in proceedings of the ninth international natural language generation conference, september 5-8, 2016, edinburgh, uk, pages 84-88. association for computational linguistics. joan byamugisha, c. maria keet, and langa khumalo. 2016b. pluralising nouns in isizulu and related languages. in computational linguistics and intelligent text processing -17th international conference, cicling 2016, konya, turkey, april 3-9, 2016, revised selected papers, part i, volume 9623 of lecture notes in computer science, pages 271-283. springer. paddington chiguvare and christopher w cleghorn. 2021. improving transformer model translation for low resource south african languages using bert. in 2021 ieee symposium series on computational intelligence (ssci), pages 1-8. gilles-maurice de schryver. 2015. oxford bilingual school dictionary: isizulu and english / isichazamazwi sesikole esinezilimi ezimbili: isizulu nesingisi, esishicilelwe abakwa-oxford. second edition. oxford university press southern africa. roald eiselen and martin j. puttkammer. 2014. developing text resources for ten south african languages. in proceedings of the ninth international conference on language resources and evaluation, lrec 2014, reykjavik, iceland, may 26-31, 2014, pages 3698-3703. european language resources association (elra). nikhil gilbert and c. maria keet. 2018. automating question generation and marking of language learning exercises for isizulu. in controlled natural language -proceedings of the sixth international workshop, cnl 2018, maynooth, co. kildare, ireland, august 27-28, 2018, volume 304 of frontiers in artificial intelligence and applications, pages 31-40. ios press. d. gkatzia, o. lemon, and v. rieser. 2016. natural language generation enhances human decision-making with uncertain information. in proceedings of association for computational linguistics 2016, vol 2: short papers, pages 264-268. association for computational linguistics. l. grout. 1893. the isizulu: a revised edition of a grammar of the zulu language. k. paul, trench, trübner. robert k. herbert and richard bailey. 2002. the bantu languages: sociohistorical perspectives, page 50-78. cambridge university press. f. katamba. 2014. bantu nominal morphology. in derek nurse and gérard philippson, editors, the bantu languages, chapter 7, pages 103-120. routledge. c. m. keet and l. khumalo. 2017a. grammar rules for the isizulu complex verb. southern african journal of language and linguistics, 35(2):183-200. c. m. keet and l. khumalo. 2017b. toward a knowledge-to-text controlled natural language of isizulu. language resources and evaluation, 51(1):131-157. c. m. keet, m. xakaza, and l. khumalo. 2017. verbalising owl ontologies in isizulu with python. in the semantic web: extended semantic web conference 2017 satellite events -extended semantic web conference 2017 satellite events, portorož, slovenia, may 28 -june 1, 2017, revised selected papers, volume 10577 of lecture notes in computer science, pages 59-64. springer. z. mahlaza. 2018. grammars for generating isixhosa and isizulu weather bulletin verbs. msc. thesis, department of computer science, university of cape town, south africa. z. mahlaza and c. m. keet. 2020. owlsiz: an isizulu cnl for structured knowledge validation. in proceedings of the 3rd international workshop on natural language generation from the semantic web (webnlg+), pages 15-25, dublin, ireland (virtual). acl. l. marais. 2021a. approximating a zulu gf concrete syntax with a neural network for natural language understanding. in proceedings of the seventh international controlled natural language workshop, pages 29-38, amsterdam, netherlands. association for computational linguistics. laurette marais. 2021b. mburisano covid-19 multilingual corpus. data retrieved from south african centre for digital language resources, https:// hdl.handle.net/20.500.12185/536 . laurette marais, johannes a. louw, jaco badenhorst, karen calteaux, ilana wilken, nina van niekerk, and glenn stein. 2020. awezamed: a multilingual, multimodal speech-to-speech translation application for maternal health care. in ieee 23rd international conference on information fusion, fusion 2020, rustenburg, south africa, july 6-9, 2020, pages 1-8. ieee.