{ "paper_id": "2020", "header": { "generated_with": "S2ORC 1.0.0", "date_generated": "2023-01-19T07:28:59.508073Z" }, "title": "Arabic NLG Language Functions", "authors": [ { "first": "Wael", "middle": [], "last": "Abed", "suffix": "", "affiliation": { "laboratory": "", "institution": "University of Aberdeen", "location": { "postCode": "AB24 3UE", "settlement": "Aberdeen", "country": "UK" } }, "email": "" }, { "first": "Ehud", "middle": [], "last": "Reiter", "suffix": "", "affiliation": { "laboratory": "", "institution": "University of Aberdeen", "location": { "postCode": "AB24 3UE", "settlement": "Aberdeen", "country": "UK" } }, "email": "ereiter@csd.abdn.ac.uk" } ], "year": "", "venue": null, "identifiers": {}, "abstract": "The Arabic language has very limited supports from NLG researchers. In this paper, we explain the challenges of the core grammar, provide a lexical resource, and implement the first language functions for the Arabic language. We did a human evaluation to evaluate our functions in generating sentences from the NADA Corpus.", "pdf_parse": { "paper_id": "2020", "_pdf_hash": "", "abstract": [ { "text": "The Arabic language has very limited supports from NLG researchers. In this paper, we explain the challenges of the core grammar, provide a lexical resource, and implement the first language functions for the Arabic language. We did a human evaluation to evaluate our functions in generating sentences from the NADA Corpus.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Abstract", "sec_num": null } ], "body_text": [ { "text": "The Arabic Language is a member of the Semitic language family, the fifth most spoken language in the world. Around 330 million people speak this language as their mother tongue language distributed in 25 countries. It is mainly classified into two types; Classical and Modern Standard Arabic (MSA) (Al-Radaideh, 2020) , in addition to regional variances (dialects). As far as we know, there are not any pipeline NLG systems or libraries that support an Arabic surface realiser at the time of writing this paper. Two factors might be the reasons: Arabic Language complexity and limited resources. An example that reflects the second cause is that even the Google n-gram viewer does not support the Arabic language (Alsmadi and Zarour, 2018) . Therefore, in this paper, we are presenting six simple morphological MSA natural language functions (inflectNoun, buildNP, inflectVerb, inflectAdjective, pronouns and numToWords). These functions can be considered as a good start to build an Arabic surface realiser, which can be used in a pipeline NLG system as they can be used to correctly generate and inflect different parts of speech including the generation of a noun phrase.", "cite_spans": [ { "start": 299, "end": 318, "text": "(Al-Radaideh, 2020)", "ref_id": "BIBREF5" }, { "start": 714, "end": 740, "text": "(Alsmadi and Zarour, 2018)", "ref_id": "BIBREF7" } ], "ref_spans": [], "eq_spans": [], "section": "Introduction", "sec_num": "1" }, { "text": "We implemented these functions from scratch using a rule-based approach. Furthermore, a lexicon containing around 9000 lemmata were collected. An open-source versions of lexicon and code with a web interface are provided and available online on GitHub. 1 .", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Introduction", "sec_num": "1" }, { "text": "As there is no NLG system done for Arabic, we investigated similar approaches that targets the language challenges. Green and DeNero (2012) presented a method to cover words agreements to generate correct words inflections in a translating task using a class-based agreement model. While, Khoufi et al. (2016) dealt with un-vocalisation and agglutination in Arabic. They built a statistical model to extract grammatical rules from a treebank corpus to use these rules for parsing.", "cite_spans": [ { "start": 116, "end": 139, "text": "Green and DeNero (2012)", "ref_id": null }, { "start": 282, "end": 309, "text": "While, Khoufi et al. (2016)", "ref_id": null } ], "ref_spans": [], "eq_spans": [], "section": "Related Works", "sec_num": "2" }, { "text": "Furthermore, another member of the Semitic group, which is the Hebrew language, also lacks NLG resources. One attempt to Generate a noun compounds in Hebrew goes back to 1998 (Netzer and Elhadad, 1998) , they used a rule-based approach and listed the difficulties between English and Hebrew in terms of the syntactic, semantic and lexical constraints for generating a Noun Compounds, including a special feature of Hebrew called \"Smixut\".", "cite_spans": [ { "start": 175, "end": 201, "text": "(Netzer and Elhadad, 1998)", "ref_id": null } ], "ref_spans": [], "eq_spans": [], "section": "Related Works", "sec_num": "2" }, { "text": "For other languages, researchers used different realisers' technologies such as handcrafted grammars rule-based (Gatt and Reiter, 2009) , statistical approaches (Gardent and Perez-Beltrachini, 2017) and human-generated template-based (Gatt and Krahmer, 2018) . However, SimpleNLG is still considered the most popular method since it was presented by Gatt and Reiter (2009) , It is a rulebased realiser that uses three main steps syntactic, morphological and orthographic realisations to produce a correctly inflected and high-quality output. It was adapted to many languages includ-ing (in chronological order) French (Vaudry and Lapalme, 2013), Italian (Mazzei et al., 2016) , Spanish (Ramos-Soto et al., 2017) , Galician (Cascallar-Fuentes et al., 2018) , Dutch (de Jong and Theune, 2018), Mandarin (Chen et al., 2018) and German (Braun et al., 2019) .", "cite_spans": [ { "start": 112, "end": 135, "text": "(Gatt and Reiter, 2009)", "ref_id": null }, { "start": 161, "end": 198, "text": "(Gardent and Perez-Beltrachini, 2017)", "ref_id": "BIBREF12" }, { "start": 234, "end": 258, "text": "(Gatt and Krahmer, 2018)", "ref_id": null }, { "start": 350, "end": 372, "text": "Gatt and Reiter (2009)", "ref_id": null }, { "start": 646, "end": 675, "text": "Italian (Mazzei et al., 2016)", "ref_id": null }, { "start": 678, "end": 711, "text": "Spanish (Ramos-Soto et al., 2017)", "ref_id": null }, { "start": 723, "end": 755, "text": "(Cascallar-Fuentes et al., 2018)", "ref_id": "BIBREF9" }, { "start": 801, "end": 820, "text": "(Chen et al., 2018)", "ref_id": "BIBREF10" }, { "start": 832, "end": 852, "text": "(Braun et al., 2019)", "ref_id": "BIBREF8" } ], "ref_spans": [], "eq_spans": [], "section": "Related Works", "sec_num": "2" }, { "text": "Another popular approach is to provide grammars' functions to be used in a template-based NLG system. Such as RosaeNLG 2 ,which is an open-source, template-based, NLG library that gives simpler functions than SimpleNLG and had been used for English, French, German, Italian and Spanish languages. Similar approaches with fewer options can be found in Core-NLG 3 and xSpin 4 .", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Related Works", "sec_num": "2" }, { "text": "Our approach is more similar to RosaeNLG than to SimpleNLG. As we will provide language functions and a noun phrase function to give correct grammatical inflections and agreements. Due to the huge morphological difference between the Semitic and non-Semitic languages, we could not adopt SimpleNLG nor RosaeNLG. Therefore, we found it convenient as a start to building our functions from scratch following the same approach of RosaeNLG.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Related Works", "sec_num": "2" }, { "text": "The Arabic language consists of 28 alphabet letters, written from right to left and there is no letters capitalisation. It has a very rich morphology measured in the number of different forms for its nouns, verbs and particles (Al-Radaideh, 2020) .", "cite_spans": [ { "start": 227, "end": 246, "text": "(Al-Radaideh, 2020)", "ref_id": "BIBREF5" } ], "ref_spans": [], "eq_spans": [], "section": "Arabic language challenges", "sec_num": "3" }, { "text": "Arabic nouns can be inflected depending on the sentence gender, number, and grammatical case (nominative, genitive, and accusative).", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Nouns", "sec_num": "3.1" }, { "text": "Arabic assigns gender for living and non-living things (ex: \"car\" ( ) treated as feminine, while \"Goal\" ( ) is a masculine noun) (Shamsan and Attayib, 2015). Moreover, unlike many languages, Arabic has a dual form in addition to singular and plural form. This form is used to express a noun that refers to two entities (things or people), and can be generated by adding one of these suffixes (\" \"-aan, \" \"-ayn, \" \"-taan, \" \"-tayn) to the singular form). The type of suffix used depends Add prefix \"ah\" ( ) and infix (w) ( ) Note: in the examples above there are other changes in the small vowels marks that did not mention because it will not be covered here Regarding the plural form, there are two different types: sound plural and broken plural. The first one can be inflected using similar steps to the steps used in dual form, with a different set of suffixes (\" \"uun, \" \"-iin, \" \"-aat). Some cases can only be identified by the \"h . arak\u00e3t\" ( ) short vowel marks of the last consonant letter. The short vowel marks will be neglected here, as for MSA according to many studies, adding these \"Short Vowels Do Not Contribute to the Quality of Reading\" (Abu-Rabia, 2019).", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Nouns", "sec_num": "3.1" }, { "text": "While the Broken plural has different inflections. This type has more than 30 patterns to use with internal and external manipulation of the sounds and vowels letters in the word and there are no firm rules (Dawdy-Hesterberg and Pierrehumbert, 2014). Table 1 illustrates all these states for dual, sound plural and broken plural.", "cite_spans": [], "ref_spans": [ { "start": 251, "end": 258, "text": "Table 1", "ref_id": "TABREF1" } ], "eq_spans": [], "section": "Nouns", "sec_num": "3.1" }, { "text": "The challenges of the Arabic numerals are their relation with the noun's gender, case, definiteness, word order and counts. In addition, they do not follow the rules in some cases (Al-Bataineh and Branigan, 2020) . These facts classify Arabic numerals as a complex problem compared to its relevance in the English language. Arabic numerals (ordinal and cardinal) can be classified mainly into three groups (Al-Bataineh and Branigan, 2020) Simplex numerals (1-10): according to (Al Easa, 1997) this group has two subgroups: singular numerals (1 and 2) and added numerals (3-10). Singular numerals agree with the counted noun in all aspects. However, this is the only group in the Arabic numerals that comes after the noun in the word order. For the second subgroup, the numeral gender will take the opposite form of the noun gender (see table 2).", "cite_spans": [ { "start": 180, "end": 212, "text": "(Al-Bataineh and Branigan, 2020)", "ref_id": "BIBREF3" }, { "start": 406, "end": 438, "text": "(Al-Bataineh and Branigan, 2020)", "ref_id": "BIBREF3" }, { "start": 477, "end": 492, "text": "(Al Easa, 1997)", "ref_id": null } ], "ref_spans": [], "eq_spans": [], "section": "Numerals", "sec_num": "3.2" }, { "text": "Compound numerals (11-19): It has two major differences. The first one is that each numeral consists of two words, one for each digit (units and ten). For example, to say \"twelve\" in Arabic it will be \"itn\u00e3 'asara\" ( ) which means \"two\" \"ten\". The second is the gender agreement. For \"eleven\" and \"twelve\", both parts of the numerals agree with the noun (Al Easa, 1997) . While the rest from \"thirteen\" to \"nineteen\", the first part takes the inverse gender of the noun and the second part agrees (Al-Bataineh and Branigan, 2020) .", "cite_spans": [ { "start": 354, "end": 369, "text": "(Al Easa, 1997)", "ref_id": null }, { "start": 497, "end": 529, "text": "(Al-Bataineh and Branigan, 2020)", "ref_id": "BIBREF3" } ], "ref_spans": [], "eq_spans": [], "section": "Numerals", "sec_num": "3.2" }, { "text": "Complex or doubled numerals (20-): One word is used for each digit and they connected by the conjunction \"and\" (\" \" pronounced \"wa\"). The first digit (units) will follow the \"Simplex numerals\" rules (except for the word order). While the \"tens\" have one form which is the masculine plural form. The third digit \"hundred\" (\" \" or \" \" pronounced as \"mi'a\") considered as a feminine noun. The rest (fourth, fifth . . . etc.) digits treated as masculine nouns and use their plural form with numerals greater than two.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Numerals", "sec_num": "3.2" }, { "text": "For ordinal numbers, the rules are mostly similar. However, there are a few differences. Such as ordinal numbers always agree with the noun gender, and nouns come before the numerals (Abdel-Malek et al., 1983) .", "cite_spans": [ { "start": 183, "end": 209, "text": "(Abdel-Malek et al., 1983)", "ref_id": "BIBREF0" } ], "ref_spans": [], "eq_spans": [], "section": "Numerals", "sec_num": "3.2" }, { "text": "In MSA, Adjectives commonly used after the nouns, although they can be used before as well. They agree with the noun in gender, case, definiteness and number (Shamsan and Attayib, 2015) (Idrissi et al., 2019) . If the adjective is used to describe an un-human plural noun, then the adjective will take the singular feminine form (Shamsan and Attayib, 2015). However, with time this exception started to disappear and full agreement in the nounadjective sentence is used (Idrissi et al., 2019) . Ex:", "cite_spans": [ { "start": 186, "end": 208, "text": "(Idrissi et al., 2019)", "ref_id": null }, { "start": 470, "end": 492, "text": "(Idrissi et al., 2019)", "ref_id": null } ], "ref_spans": [], "eq_spans": [], "section": "Adjectives", "sec_num": "3.3" }, { "text": "-the-men (M-pluraldefinite-nominative) the-wise (M-plural-definitenominative)-The wise men", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Adjectives", "sec_num": "3.3" }, { "text": "Arabic verbs participate in a large percentage of the sentence due to their morphological richness. There are 19 forms for verb inflections, and for each form, the verb agrees with the subject in terms of number, person and gender. Moreover, it can be inflected using four moods, two voices and three tenses (Shaalan et al., 2015).", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Verbs", "sec_num": "3.4" }, { "text": "Arabic pronouns can be categorised to Explicit and Implicit forms. The latter will not be discussed here as it only occurs in spoken Arabic. On the other hand, there are 3 branches can be derived from the Explicit form: attached, detached and reflexive (Igaab and Tarrad, 2019). Which can be used to create personal, demonstrative and relative pronouns (Ryding, 2005) .", "cite_spans": [ { "start": 353, "end": 367, "text": "(Ryding, 2005)", "ref_id": null } ], "ref_spans": [], "eq_spans": [], "section": "Pronouns", "sec_num": "3.5" }, { "text": "The attached (or dependent) pronouns are used as a suffix added to the verbs ( ex: object pronouns), nouns (ex: possessive pronouns) and prepositions. In terms of the detached (independent) pronouns, they are used as a standalone word and inflected in more than one position in the sentence. Reflexive pronouns in Arabic is similar to that in English, the word \"self\" (\" \", nafs) is used with the attached pronouns to form the reflexive pronouns. Such as ( ) \"nafsahu\" (himself). All pronouns agree to what they refer to in person, gender and number.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Pronouns", "sec_num": "3.5" }, { "text": "In this section, we describe the Arabic lexicon, list the Arabic language functions proposed and what they cover from the challenges listed in section 3. Table 3 : examples show the personal pronouns (attached and detached).", "cite_spans": [], "ref_spans": [ { "start": 154, "end": 161, "text": "Table 3", "ref_id": null } ], "eq_spans": [], "section": "Design and implementation of the Arabic language functions", "sec_num": "4" }, { "text": "The lexicon was extracted from Wiktionary 5 . Usually, Wiktionary dump files are parsed to extract information (such as in (Braun et al., 2019) . However, the Arabic dump file is not well formatted. Therefore, a customised web scrap script generated to get all available nouns, verbs and adjectives from the English Wiktionary page. Overall, our lexicon covers around 9000 lemmata (~4000 nouns,~3000 verbs and~2000 adjectives).", "cite_spans": [ { "start": 123, "end": 143, "text": "(Braun et al., 2019)", "ref_id": "BIBREF8" } ], "ref_spans": [], "eq_spans": [], "section": "Arabic Lexicon", "sec_num": "4.1" }, { "text": "To cover most of the challenges listed before, six main functions were designed (inflectNoun, buildNP, inflectVerb, inflectAdjective, pronouns and numToWords). Clauses and Pronouns types other than personal pronouns were not covered. The collected lexicon and collections of rules were used to implement these functions based on the information in section 3.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Arabic language functions", "sec_num": "4.2" }, { "text": "inflectNoun function: It gives the inflected form of the noun in the correct grammatical form. Taking into considerations all aspects number, gender and case. This is done by passing these values based on the sentence, then applying the rules to the targeted noun. The lexicon provides over 4000 nouns inflections, however, if the noun is not found it will be then inflected using an implemented collection of rules. Moreover, the dual and plural forms can be explicitly specified in the function call to get the desired result. (For all functions' definitions and parameters see the Appendices) inflectAdjective function: Same as the noun it can return the right inflected form of the adjective based on the number, gender and case provided using the lexicon and rule-based method. Furthermore, it covers the case of a non-human noun and provides both full and deflected agreement.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Arabic language functions", "sec_num": "4.2" }, { "text": "numToWords function: It generates the respective words for a given number in two types \"Cardinal\" and \"Ordinal\". Such as 12 will spelt out as ( ) twelve, if the \"Cardinal\" type is used. The generated text follows all the rules of the Arabic numerals mentioned in subsection 3.2.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Arabic language functions", "sec_num": "4.2" }, { "text": "buildNP (build Noun Phrase) function: It simply generated from the combining of the previous three functions. It will generate a noun phrase with numerals and a list of adjectives inflected correctly. It covers case, gender and number for nouns, numerals and adjectives in addition to the relationship and agreements between them.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Arabic language functions", "sec_num": "4.2" }, { "text": "inflectVerb function: It returns the inflected form of the verb after applying all the factors that can affect the verb form (number, gender, person, voice, mood and tense). The inflection first searched in the lexicon, if it is not provided then the verb will be inflected using a set of conditions, assuming that the verb belongs to the first form rules. This assumption was made because it is one of the most common forms (Shaalan et al., 2015) and it takes a lot of time and effort to implements all forms for sound and weak verbs.", "cite_spans": [ { "start": 425, "end": 447, "text": "(Shaalan et al., 2015)", "ref_id": null } ], "ref_spans": [], "eq_spans": [], "section": "Arabic language functions", "sec_num": "4.2" }, { "text": "Pronouns function: This covers the personal pronouns. It can produce a correctly inflected pronouns for both attached and detached and for four types (subject, object, reflexive and possessive).", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Arabic language functions", "sec_num": "4.2" }, { "text": "These functions are the first Arabic NLG functions and there are no other similar Arabic approaches to compare with. We evaluated our approach using the same two methods used in (Braun et al., 2019) . The robustness and correctness of the implementation of the Arabic language functions were measured by examining 250 test units consist of different parts of speech (nouns, adjectives, verbs, numerals and pronouns). The results from the functions were all correct, whether it was inflected using a collections of rules or by using the lexical resource.", "cite_spans": [ { "start": 178, "end": 198, "text": "(Braun et al., 2019)", "ref_id": "BIBREF8" } ], "ref_spans": [], "eq_spans": [], "section": "Evaluation", "sec_num": "5" }, { "text": "To measure how much these functions can cover from the Arabic language, NADA corpus is used (Alalyani and Marie-Sainte, 2018). The corpus categorised the data into ten categories. An average of 10 sentences extracted from each of the 10 categories provided in NADA and tried to generate them with our language functions. This was successful in 85% of cases.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Evaluation", "sec_num": "5" }, { "text": "Most of the sentences that the system failed to reproduce were because of the use of other pronouns types or wrong verb inflections when a verb is used in the sentence that is not a form (I) type and not in the lexicon. Such as this sentence \" \" (Karejo Silva scored the game's only goal in the second minute), the verb \" \" (scored) is a singular, past, not form (I) and does not exist in Wiktionary. Another failed sentence is \" \" (The match ended with the victory of Sunderland, who halted Liverpool's balance of 15 points), the word \" \" (who) is a relative pronoun which can take different inflections. Therefore, this sentence considered as failed to reproduce, because relative pronouns are not yet covered by our functions.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Evaluation", "sec_num": "5" }, { "text": "As mentioned before, as far as we know this is the first NLG system for Arabic. Therefore, we could not compare it with others. However, for a similar approach with different system architecture and German language, Braun et al. 2019achieved 84%, which means our results are acceptable. In terms of scalability, these functions can be adapted easily to use in Classical Arabic and all Arabic dialects (more than 20 dialects) Abdul-Mageed et al. (2018).", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Evaluation", "sec_num": "5" }, { "text": "We plan to enhance the performance of the system by covering other verbs forms, clauses and other types of pronouns (demonstrative and relative pronouns). Furthermore, we intend to increase the number of lemmata covered by the lexicon to get better accuracy, especially with weak verbs and broken plural cases. After that, we can create an Arabic version of simplenlg.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Future Work", "sec_num": "6" }, { "text": "This work was carried out during the studying duration of the first author for an MSc of AI degree at the University of Aberdeen, which was fully funded by Chevening Scholarships, the UK government's global scholarship programme, funded by the Foreign and Commonwealth Office (FCO) and partner organisations. We also thank Jette Viethen and other people at Arria NLG for their suggestions and help. (default \"1\" for male). It accepts these values for male (1,m,male) and (0,f,female) for female.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Acknowledgments", "sec_num": "7" }, { "text": "Number (optional) (default \"3\" for the third person). The grammatical person of the verb. Either 1, 2 or 3 to indicate first, second and third person respectively. Voice", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Person", "sec_num": null }, { "text": "String (optional) (default \"active\"). It accepts only two values \"active\" and \"passive\" for the verb voice.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Person", "sec_num": null }, { "text": "String (optional) (default \"past\"). It accepts five values (\"past\", \"none_past\", \"subjunctive\", \"jussive\" or \"imperative\"). However, if the value \"passive\" provided in the \"Voice\" parameter or 2nd person is selected then the value \"imperative\" is not acceptable. The input noun. Ideally, the noun in its singular nominative form should be provided, however, if the word did not match any singular nominative form in the DB, then, all other forms will be checked. If the word did not match again, this time the noun will be inflected manually using the known rules of the noun inflections number Number or String (Optional) (default \"plural\" )The grammatical number of the verb. Either singular, dual, plural or a number (not: dual or number 2 cannot be used with the 1st person) Gender Number (optional) (default \"singular\") The grammatical number of the noun. Either singular, dual, plural or a number. Gender Number or string (optional) (default \"1\" for a male if the value, not in the DB). It accepts these values for male (1,m,male) and (0,f,female) for female Case String (optional)", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Mood_tense", "sec_num": null }, { "text": "The default value (nominative). This parameter accepts only these three values \"nominative\", \"accusative\" or \"genitive\". It represents the case of the noun to be inflected base on it.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Mood_tense", "sec_num": null }, { "text": "String (optional)", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Dual", "sec_num": null }, { "text": "If this value provided, then it overrides the existing \"dual\" value of the noun saved in the database. If not and there is no value in the database for the given noun then it will be treated according to the dual rules explained earlier.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Dual", "sec_num": null }, { "text": "String (optional)", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Plural", "sec_num": null }, { "text": "If this value provided, then it overrides the existing \"Plural\" value of the noun saved in the database. If not and there is no value in the database for the given noun then it will be treated according to the Sound plural rules explained earlier. A list of adjectives that can be used to describe the noun given in the noun parameter. The full agreement between adjectives and the noun will be used, unless, the value of the \"is_person\" parameter is set to True and the value \"DA\" or False is given in the \"agreement\" parameter.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Plural", "sec_num": null }, { "text": "Number or String (Optional) (default \"singular\") The grammatical number of the noun. Either singular, dual, plural or a number.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Number", "sec_num": null }, { "text": "Number or string (optional) (default \"1\" for male). It accepts these values for male (1,m,male) and (0,f,female) for female. This value will be used in case of the adjective is not found in the database only.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Gender", "sec_num": null }, { "text": "String (optional)", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Case", "sec_num": null }, { "text": "The default value (nominative). This parameter accepts only these three values \"nominative\", \"accusative\" or \"genitive\". It represents the case of the adjective to be inflected base on it Is_person Boolean (optional) (default \"True\"). It indicates whether the modifier(s) refers to a person (human) noun or not. Agreement Boolean (optional) (default \"1\", meaning Full agreement). This parameter now accepts these values (1, \"fa\", \"full\", \"full agreement\") for full agreement with the noun, and (0, \"da\", \"deflected\", \"deflected agreement\") for deflected agreement with the noun in case if the noun has the value \"un-human\" in the database. Table 6 : ar_inflectAdjective parameters", "cite_spans": [], "ref_spans": [ { "start": 640, "end": 647, "text": "Table 6", "ref_id": null } ], "eq_spans": [], "section": "Case", "sec_num": null }, { "text": "Change the numbers to their respective words in two types \"Cardinal\" and \"Ordinal\". For example: 12 => ( ) twelve, if the \"Cardinal\" type is used. The number to be spelt out.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "ar_numToWords", "sec_num": "1.4" }, { "text": "The default value (nominative). This parameter accepts only these three values \"nominative\", \"accusative\" or \"genitive\". It represents the case that the number should be inflected base on it.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Case String (optional)", "sec_num": null }, { "text": "Gender Number or string (optional) (default \"1\" for male). It accepts these values for male (1,m,male) and (0,f,female) for female.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Case String (optional)", "sec_num": null }, { "text": "String (optional)", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Type", "sec_num": null }, { "text": "Default (cardinal), it can take only two values: \"cardinal\" or \"ordinal\".", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Type", "sec_num": null }, { "text": "Number or String (optional) (default \"wordsOnly\"). If count is less than or equal to this value it will be spelt out; otherwise, it will be formatted as digits. For example, if you enter the integer 5, then numbers up to and including 5 will be words, and numbers greater than 5 will be digits. \"wordsOnly\", all numbers should be spelt out. \"digitsOnly\", no numbers should be spelt out.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Number Format", "sec_num": null }, { "text": "String (optional) (default \" \"). The word used to express a value of 0. Either \" \", \" \", or another word or phrase of your choice, e.g. \" \". (default \"singular\") The grammatical number of the pronoun. Either singular, dual, plural or a number (not: dual or number 2 cannot be used with the 1st person, therefore, in this case, the pronoun of the plural first person will be used) Gender Number or string (optional) (default \"1\" for male). It accepts accepts these values for male (1,m,male) and (0,f,female) for female. If this value provided, then it overrides the existing \"Plural\" value of the noun saved in the database. If not and there is no value in the database for the given noun then it will be treated according to the Sound plural rules explained earlier.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Zero Format", "sec_num": null }, { "text": "Is person Boolean (optional) (default \"True\") indicate if the word provided in the \"word\" parameter refers to a human or not. Because, for nonhuman plurals in the Arabic language, the singular feminine pronoun in its third-person form is used (Mandatory) Either \"dual\", \"plural\" or a number. If a number is provided, it will be output as a modifier to the input noun and the noun is correctly inflected. If singular, dual or plural is used, the noun is inflected correctly based on the noun gender and the \"case\" parameter value.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Zero Format", "sec_num": null }, { "text": "The input noun. Ideally, the noun in its singular nominative form should be provided, however, if the word did not match any singular nominative form in the DB, then, all other forms will be checked. If the word did not match again, this time the noun will be inflected manually using the known rules of the noun inflections.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "String (Mandatory)", "sec_num": null }, { "text": "String (optional)", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Case", "sec_num": null }, { "text": "The default value (nominative). This parameter accepts only these three values \"nominative\", \"accusative\" or \"genitive\". It represents the case of the noun to be inflected base on it. Gender Number or string (optional) (default \"1\" for male). It accepts these values for male (1,m,male) and (0,f,female) for female. If this value provided, then it overrides the existing gender of the noun saved in the database. If not and there is no value in the database for the given noun then it will be treated as \"male\" noun.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Case", "sec_num": null }, { "text": "String (optional)", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Dual", "sec_num": null }, { "text": "If this value provided, then it overrides the existing \"dual\" value of the noun saved in the database. If not and there is no value in the database for the given noun then it will be treated according to the dual rules explained earlier.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Dual", "sec_num": null }, { "text": "String (optional)", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Plural", "sec_num": null }, { "text": "If this value provided, then it overrides the existing \"Plural\" value of the noun saved in the database. If not and there is no value in the database for the given noun then it will be treated according to the Sound plural rules explained earlier.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Plural", "sec_num": null }, { "text": "Number or String (optional) (default \"wordsOnly\"). If count is less than or equal to this value it will be spelt out; otherwise, it will be formatted as digits. For example, if you enter the integer 5, then numbers up to and including 5 will be words, and numbers greater than 5 will be digits. \"wordsOnly\", all numbers should be spelt out. \"digitsOnly\", no numbers should be spelt out Zero Format", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Number Format", "sec_num": null }, { "text": "String (optional) (default \" \"). The word used to express a value of 0. Either \" \", \" \", or another word or phrase of your choice, e.g. \"", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Number Format", "sec_num": null }, { "text": "\".", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Number Format", "sec_num": null }, { "text": "A list of adjectives that can be used to describe the noun given in the noun parameter. The full agreement between adjectives and the noun will be used, unless, the noun available in the database and has the value \"un-human\" and the value \"DA\" is given in the \"agreement\" parameter. Agreement Boolean (optional) (default \"1\", meaning Full agreement). This parameter now accepts these values (1, \"fa\", \"full\", \"full agreement\") for full agreement with the noun, and (0, \"da\", \"deflected\", \"deflected agreement\") for deflected agreement with the noun in case if the noun has the value \"un-human\" in the database. ", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Modifiers List of Strings (Optional)", "sec_num": null }, { "text": "https://github.com/WaelMohammedAbed/ Natural-Language-Generation-for-the-Arabic-Language", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "", "sec_num": null }, { "text": "https://rosaenlg.org/rosaenlg/1.16.4/ about/compare.html 3 https://github.com/societe-generale/ core-nlg 4 https://xspin.it/plus", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "", "sec_num": null }, { "text": "https://en.wiktionary.org/wiki/ Category:Arabic_lemmas", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "", "sec_num": null } ], "back_matter": [], "bib_entries": { "BIBREF0": { "ref_id": "b0", "title": "Lessons 31-45; Appendices", "authors": [ { "first": "W", "middle": [ "M" ], "last": "Zn Abdel-Malek", "suffix": "" }, { "first": "G", "middle": [ "N" ], "last": "Erwin", "suffix": "" }, { "first": "", "middle": [], "last": "Saad", "suffix": "" } ], "year": 1983, "venue": "", "volume": "2", "issue": "", "pages": "", "other_ids": {}, "num": null, "urls": [], "raw_text": "ZN Abdel-Malek, WM Erwin, and GN Saad. 1983. Elementary Modern Standard Arabic: Volume 2, Lessons 31-45; Appendices, volume 2. Cambridge University Press.", "links": null }, "BIBREF1": { "ref_id": "b1", "title": "You tweet what you speak: A city-level dataset of arabic dialects", "authors": [ { "first": "Muhammad", "middle": [], "last": "Abdul-Mageed", "suffix": "" }, { "first": "Hassan", "middle": [], "last": "Alhuzali", "suffix": "" }, { "first": "Mohamed", "middle": [], "last": "Elaraby", "suffix": "" } ], "year": 2018, "venue": "Proceedings of the Eleventh International Conference on Language Resources and Evaluation", "volume": "", "issue": "", "pages": "", "other_ids": {}, "num": null, "urls": [], "raw_text": "Muhammad Abdul-Mageed, Hassan Alhuzali, and Mo- hamed Elaraby. 2018. You tweet what you speak: A city-level dataset of arabic dialects. In Proceedings of the Eleventh International Conference on Lan- guage Resources and Evaluation (LREC 2018).", "links": null }, "BIBREF2": { "ref_id": "b2", "title": "The role of short vowels in reading arabic: A critical literature review", "authors": [ { "first": "Salim", "middle": [], "last": "Abu-Rabia", "suffix": "" } ], "year": 2019, "venue": "Journal of psycholinguistic research", "volume": "48", "issue": "4", "pages": "785--795", "other_ids": {}, "num": null, "urls": [], "raw_text": "Salim Abu-Rabia. 2019. The role of short vowels in reading arabic: A critical literature review. Journal of psycholinguistic research, 48(4):785-795.", "links": null }, "BIBREF3": { "ref_id": "b3", "title": "The syntax of (complex)", "authors": [ { "first": "Hussein", "middle": [], "last": "Al", "suffix": "" }, { "first": "-", "middle": [], "last": "Bataineh", "suffix": "" }, { "first": "Phil", "middle": [], "last": "Branigan", "suffix": "" } ], "year": 2020, "venue": "", "volume": "", "issue": "", "pages": "", "other_ids": {}, "num": null, "urls": [], "raw_text": "Hussein Al-Bataineh and Phil Brani- gan. 2020. The syntax of (complex)", "links": null }, "BIBREF4": { "ref_id": "b4", "title": "Noun quantification in english and modern standard arabic: a descriptive morphological comparison", "authors": [], "year": 1997, "venue": "", "volume": "", "issue": "", "pages": "", "other_ids": { "DOI": [ "10.31219/osf.io/6pesa" ] }, "num": null, "urls": [], "raw_text": "https://doi.org/10.31219/osf.io/6pesa. Noor Sultan Al Easa. 1997. Noun quantifica- tion in english and modern standard ara- bic: a descriptive morphological comparison. Http://hdl.handle.net/10576/8069.", "links": null }, "BIBREF5": { "ref_id": "b5", "title": "Applications of mining arabic text: A review", "authors": [ { "first": "Qasem", "middle": [], "last": "Al-Radaideh", "suffix": "" } ], "year": 2020, "venue": "Recent Trends in Computational Intelligence. IntechOpen", "volume": "", "issue": "", "pages": "", "other_ids": {}, "num": null, "urls": [], "raw_text": "Qasem Al-Radaideh. 2020. Applications of mining ara- bic text: A review. In Recent Trends in Computa- tional Intelligence. IntechOpen.", "links": null }, "BIBREF6": { "ref_id": "b6", "title": "Nada: New arabic dataset for text classification", "authors": [ { "first": "Nada", "middle": [], "last": "Alalyani", "suffix": "" }, { "first": "Souad Larabi Marie-Sainte", "middle": [], "last": "", "suffix": "" } ], "year": 2018, "venue": "International Journal of Advanced Computer Science and Applications", "volume": "9", "issue": "9", "pages": "", "other_ids": {}, "num": null, "urls": [], "raw_text": "Nada Alalyani and Souad Larabi Marie-Sainte. 2018. Nada: New arabic dataset for text classification. In- ternational Journal of Advanced Computer Science and Applications, 9(9).", "links": null }, "BIBREF7": { "ref_id": "b7", "title": "Google ngram viewer does not include arabic corpus! towards n-gram viewer for arabic corpus", "authors": [ { "first": "Izzat", "middle": [], "last": "Alsmadi", "suffix": "" }, { "first": "Mohammad", "middle": [], "last": "Zarour", "suffix": "" } ], "year": 2018, "venue": "Int. Arab J. Inf. Technol", "volume": "15", "issue": "5", "pages": "785--794", "other_ids": {}, "num": null, "urls": [], "raw_text": "Izzat Alsmadi and Mohammad Zarour. 2018. Google n- gram viewer does not include arabic corpus! towards n-gram viewer for arabic corpus. Int. Arab J. Inf. Technol., 15(5):785-794.", "links": null }, "BIBREF8": { "ref_id": "b8", "title": "Simplenlg-de: Adapting simplenlg 4 to german", "authors": [ { "first": "Daniel", "middle": [], "last": "Braun", "suffix": "" }, { "first": "Kira", "middle": [], "last": "Klimt", "suffix": "" }, { "first": "Daniela", "middle": [], "last": "Schneider", "suffix": "" }, { "first": "Florian", "middle": [], "last": "Matthes", "suffix": "" } ], "year": 2019, "venue": "Proceedings of the 12th International Conference on Natural Language Generation", "volume": "", "issue": "", "pages": "415--420", "other_ids": {}, "num": null, "urls": [], "raw_text": "Daniel Braun, Kira Klimt, Daniela Schneider, and Flo- rian Matthes. 2019. Simplenlg-de: Adapting sim- plenlg 4 to german. In Proceedings of the 12th Inter- national Conference on Natural Language Genera- tion, pages 415-420.", "links": null }, "BIBREF9": { "ref_id": "b9", "title": "Adapting simplenlg to galician language", "authors": [ { "first": "Andrea", "middle": [], "last": "Cascallar-Fuentes", "suffix": "" }, { "first": "Alejandro", "middle": [], "last": "Ramos-Soto", "suffix": "" }, { "first": "Alberto", "middle": [ "Bugar\u00edn" ], "last": "Diz", "suffix": "" } ], "year": 2018, "venue": "Proceedings of the 11th International Conference on Natural Language Generation", "volume": "", "issue": "", "pages": "67--72", "other_ids": {}, "num": null, "urls": [], "raw_text": "Andrea Cascallar-Fuentes, Alejandro Ramos-Soto, and Alberto Bugar\u00edn Diz. 2018. Adapting simplenlg to galician language. In Proceedings of the 11th Inter- national Conference on Natural Language Genera- tion, pages 67-72.", "links": null }, "BIBREF10": { "ref_id": "b10", "title": "Simplenlg-zh: a linguistic realisation engine for mandarin", "authors": [ { "first": "Guanyi", "middle": [], "last": "Chen", "suffix": "" }, { "first": "Kees", "middle": [], "last": "Van Deemter", "suffix": "" }, { "first": "Chenghua", "middle": [], "last": "Lin", "suffix": "" } ], "year": 2018, "venue": "Proceedings of the 11th International Conference on Natural Language Generation", "volume": "", "issue": "", "pages": "57--66", "other_ids": {}, "num": null, "urls": [], "raw_text": "Guanyi Chen, Kees Van Deemter, and Chenghua Lin. 2018. Simplenlg-zh: a linguistic realisation engine for mandarin. In Proceedings of the 11th Interna- tional Conference on Natural Language Generation, pages 57-66.", "links": null }, "BIBREF11": { "ref_id": "b11", "title": "Learnability and generalisation of arabic broken plural nouns. Language, cognition and neuroscience", "authors": [ { "first": "Lisa", "middle": [], "last": "Garnand Dawdy-Hesterberg", "suffix": "" }, { "first": "Janet", "middle": [ "Breckenridge" ], "last": "Pierrehumbert", "suffix": "" } ], "year": 2014, "venue": "", "volume": "29", "issue": "", "pages": "1268--1282", "other_ids": {}, "num": null, "urls": [], "raw_text": "Lisa Garnand Dawdy-Hesterberg and Janet Brecken- ridge Pierrehumbert. 2014. Learnability and gener- alisation of arabic broken plural nouns. Language, cognition and neuroscience, 29(10):1268-1282.", "links": null }, "BIBREF12": { "ref_id": "b12", "title": "A statistical, grammar-based approach to microplanning", "authors": [ { "first": "Claire", "middle": [], "last": "Gardent", "suffix": "" }, { "first": "Laura", "middle": [], "last": "Perez-Beltrachini", "suffix": "" } ], "year": 2017, "venue": "Computational Linguistics", "volume": "43", "issue": "1", "pages": "1--30", "other_ids": {}, "num": null, "urls": [], "raw_text": "Claire Gardent and Laura Perez-Beltrachini. 2017. A statistical, grammar-based approach to microplan- ning. Computational Linguistics, 43(1):1-30.", "links": null } }, "ref_entries": { "TABREF1": { "type_str": "table", "content": "
: examples show the Arabic noun's forms
with different case and gender
on the case and the gender of the noun.
", "html": null, "text": "", "num": null }, "TABREF3": { "type_str": "table", "content": "
: examples show the numerals inflection
1997).
", "html": null, "text": "", "num": null }, "TABREF5": { "type_str": "table", "content": "
A Appendix 1 -Definitions and
parameters of the Arabic language
functions
Albert Gatt and Ehud Reiter. 2009. Simplenlg: A re-1.1 ar_inflectVerb
alisation engine for practical applications. In Pro-ceedings of the 12th European Workshop on Natural Language Generation (ENLG 2009), pages 90-93.Returns the inflected form of the input verb taking into consideration five aspects (number, gender, person, voice and mood/tense).
Spence Green and John DeNero. 2012. A class-based
agreement model for generating accurately inflected translations. In Proceedings of the 50th AnnualParameter WordType stringdescription (Mandatory) The input verb. Ideally, the verb root should be provided, however, if the word did not
Meeting of the Association for Computational Lin-guistics (Volume 1: Long Papers), pages 146-155.match any root in the DB, then, all other forms will be checked. If the word did not match again, this time the verb will be inflected manually using the
known rules of the verb inflections
Ali Idrissi, Eiman Mustafawi, Tariq Khwaileh, and R Muralikrishnan. 2019. A neurophysiologicalnumberNumber or String (Op-(default \"plural\" )The grammatical number of the verb. Either singular, dual, plural or a number (not:
study of noun-adjective agreement in arabic: TheGendertional) Numberdual or number 2 cannot be used with the 1st person)
impact of animacy and diglossia on the dynamics of language processing. bioRxiv, page 729855.or (optional) string
Zainab Kadim Igaab and Intisar Raham Tarrad. 2019.
Pronouns in english and arabic: a contrastive study.
Engl. Lang. Lit. Stud, 9(1).
Ruud de Jong and Mari\u00ebt Theune. 2018. Going dutch:
Creating simplenlg-nl. In Proceedings of the 11th
International Conference on Natural Language Gen-
eration, pages 73-78.
Nabil Khoufi, Chafik Aloulou, and Lamia Hadrich Bel-
guith. 2016. Parsing arabic using induced probabilis-
tic context free grammar. International Journal of
Speech Technology, 19(2):313-323.
Alessandro Mazzei, Cristina Battaglino, and Cristina
Bosco. 2016. Simplenlg-it: adapting simplenlg to
italian. In Proceedings of the 9th international natu-
ral language generation conference, pages 184-192.
Yael Netzer and Michael Elhadad. 1998. Generation of
noun compounds in hebrew: Can syntactic knowl-
edge be fully encapsulated? In Natural Language
Generation.
Alejandro Ramos-Soto, Julio Janeiro-Gallardo, and Al-
berto Bugar\u00edn Diz. 2017. Adapting simplenlg to
spanish. In Proceedings of the 10th international
conference on natural language generation, pages
144-148.
Karin C Ryding. 2005. A reference grammar of mod-
ern standard Arabic. Cambridge university press.
Khaled Shaalan, Marwa Magdy, and Aly Fahmy. 2015.
Analysis and feedback of erroneous arabic verbs.
Natural Language Engineering, 21(2):271.
Muayad Abdul-Halim Ahmad Shamsan and Abdul-
majeed Attayib. 2015. Inflectional morphology in
arabic and english: a contrastive study. Interna-
tional Journal of English Linguistics, 5(2):139.
", "html": null, "text": "Albert Gatt and Emiel Krahmer. 2018. Survey of the state of the art in natural language generation: Core tasks, applications and evaluation. Journal of Artificial Intelligence Research, 61:65-170.", "num": null }, "TABREF6": { "type_str": "table", "content": "
: ar_inflectVerb parameters
1.2 ar_inflectNoun
Returns the inflected form of the input noun taking
into consideration 3 aspects (number, gender and
case).
ParameterTypedescription
Wordstring
(Manda-
tory)
", "html": null, "text": "", "num": null }, "TABREF7": { "type_str": "table", "content": "
: ar_inflectNoun parameters
1.3 ar_inflectAdjective
Returns the inflected form of the input adjective
taking into consideration 3 aspects (number, gender
and case).
", "html": null, "text": "", "num": null }, "TABREF9": { "type_str": "table", "content": "
: ar_numToWords parameters
1.5 ar_pronouns
Returns the pronoun (e.g. you, his, her, them, etc.)
for a given input gender or name. The optional pa-
rameters allow you to specify your desired pronoun
type.
", "html": null, "text": "", "num": null }, "TABREF11": { "type_str": "table", "content": "
: ar_pronouns parameters
", "html": null, "text": "", "num": null }, "TABREF12": { "type_str": "table", "content": "", "html": null, "text": "", "num": null } } } }