{"title":"JSrealB: A Bilingual Text Realizer for Web Programming","authors":"Paul Molins, G. Lapalme","doi":"10.18653/v1/W15-4719","DOIUrl":null,"url":null,"abstract":"JSrealB is an English and French text realizer written in JavaScript to ease its integration in web applications. The realization engine is mainly rule-based. Table driven rules are defined for inflection and algorithmic propagation rules, for agreements. It allows its user to build a variety of French and English expressions and sentences from a single specification to produce dynamic output depending on the content of a web page. Natural language generation can automate a significant part of textual production, only requiring a human to supply some important aspects and thus saving considerable time for producing consistent grammatically correct output. In recent years, tools such as SimpleNLG (Gatt and Reiter, 2009) facilitated text realization by a programmer provided they program their application in Java. This system was then extended with SimpleNLG-EnFr (Vaudry and Lapalme, 2013), a English-French version of SimpleNLG. Another approach to text realization is JSreal (Daoust and Lapalme, 2014), a French Web realizer written in JavaScript. This paper describes an attempt at combining the ideas of SimpleNLGEnFr and JSreal to produce a bilingual realizer for French and English from a single specification. JSrealB generates well-formed expressions and sentences. It can be used standalone for linguistic demonstrations or be integrated into complex text generation projects. But like JSreal, it is aimed at web developers, from taking care of morphology, declension and conjugation to creating well-formed texts. A web programmer who wishes to use JSrealB to produce flexible English and/or French textual or HTML output only needs to add two lines in the page: one for importing program and one for calling JSrealB loader to load the resources (i.e. lexicon and rules). The principles underlying JSrealB are similar to those of SimpleNLG: programming language instructions create data structures corresponding to the constituents of the sentence to be produced. Once the data structure (a tree) is built in memory, it is traversed to produce the list of tokens of the sentence. This data structure is built by function calls whose names are the same as the symbols usually used for classical syntax trees: for example, N to create a noun structure, NP for a Noun Phrase, V for a Verb, D for a determiner, S for a Sentence and so on. Features added to the structures using the dot notation can modify the values according to what is intended. JSrealBsyntactic representation is patterned after classical constituent grammar notations. For example, S(NP(D(\"a\"),N(\"woman\")).n(\"p\"), VP(\"eat\").t(\"ps\")) is the JSrealB specification for The women ate. Plural is indicated with feature n(\"p\") where n indicates number and p plural. The verb is conjugated to past tense indicated by the feature tense t and value ps. Agreement between NP and VP is performed automatically. French and English are languages whose structures are similar. Both languages use the same alphabet, they are both fusional languages sharing a similar conjugation system and their word order follows the same basic Subject-VerbObject paradigm (Shoebottom, 1996). But structural differences do exist: e.g. the position of adjectives differ and rules for gender and number agreement differ for nouns and pronoun between these languages. These differences must be taken into account at many levels. First, syntactic differences and agreements (i.e. features propagation), must be handled at the phrase or sentence level by algo-","PeriodicalId":307841,"journal":{"name":"European Workshop on Natural Language Generation","volume":"39 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2015-09-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"22","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"European Workshop on Natural Language Generation","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.18653/v1/W15-4719","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 22
Abstract
JSrealB is an English and French text realizer written in JavaScript to ease its integration in web applications. The realization engine is mainly rule-based. Table driven rules are defined for inflection and algorithmic propagation rules, for agreements. It allows its user to build a variety of French and English expressions and sentences from a single specification to produce dynamic output depending on the content of a web page. Natural language generation can automate a significant part of textual production, only requiring a human to supply some important aspects and thus saving considerable time for producing consistent grammatically correct output. In recent years, tools such as SimpleNLG (Gatt and Reiter, 2009) facilitated text realization by a programmer provided they program their application in Java. This system was then extended with SimpleNLG-EnFr (Vaudry and Lapalme, 2013), a English-French version of SimpleNLG. Another approach to text realization is JSreal (Daoust and Lapalme, 2014), a French Web realizer written in JavaScript. This paper describes an attempt at combining the ideas of SimpleNLGEnFr and JSreal to produce a bilingual realizer for French and English from a single specification. JSrealB generates well-formed expressions and sentences. It can be used standalone for linguistic demonstrations or be integrated into complex text generation projects. But like JSreal, it is aimed at web developers, from taking care of morphology, declension and conjugation to creating well-formed texts. A web programmer who wishes to use JSrealB to produce flexible English and/or French textual or HTML output only needs to add two lines in the page: one for importing program and one for calling JSrealB loader to load the resources (i.e. lexicon and rules). The principles underlying JSrealB are similar to those of SimpleNLG: programming language instructions create data structures corresponding to the constituents of the sentence to be produced. Once the data structure (a tree) is built in memory, it is traversed to produce the list of tokens of the sentence. This data structure is built by function calls whose names are the same as the symbols usually used for classical syntax trees: for example, N to create a noun structure, NP for a Noun Phrase, V for a Verb, D for a determiner, S for a Sentence and so on. Features added to the structures using the dot notation can modify the values according to what is intended. JSrealBsyntactic representation is patterned after classical constituent grammar notations. For example, S(NP(D("a"),N("woman")).n("p"), VP("eat").t("ps")) is the JSrealB specification for The women ate. Plural is indicated with feature n("p") where n indicates number and p plural. The verb is conjugated to past tense indicated by the feature tense t and value ps. Agreement between NP and VP is performed automatically. French and English are languages whose structures are similar. Both languages use the same alphabet, they are both fusional languages sharing a similar conjugation system and their word order follows the same basic Subject-VerbObject paradigm (Shoebottom, 1996). But structural differences do exist: e.g. the position of adjectives differ and rules for gender and number agreement differ for nouns and pronoun between these languages. These differences must be taken into account at many levels. First, syntactic differences and agreements (i.e. features propagation), must be handled at the phrase or sentence level by algo-