pyrealb at the GEM ’24 Data-to-text Task: Symbolic E nglish Text Generation from RDF Triples (2024)

Abstract: We present a symbolic system, written in Python, used to participate in the English Data-to-text generation task of the GEM Shared Task at the Generation Challenges (INLG’24). The system runs quickly on a standard laptop, making it fast and predictable. It is also quite easy to adapt to a new domain.

## introduction this paper describes pyrealb, a system for tackling the data-to-text generation task of the gem shared task at the generation challenges (inlg'24) @xcite . it uses a symbolic approach to this problem, which has become almost forgotten due to the popularity of neural networks and large language models. we thought it would be interesting to compare the results between computationally intensive methods that can sometimes be difficult to control with a predictable, lightweight and fast symbolic approach. the system is conceptually simple, each rdf triple corresponds to a sentence in which the subject and the object of a triple are mapped almost verbatim as subject and object of the sentence. the predicate of the triple corresponds to a verb phrase that determines the structure of the sentence. the system orders predicates to create a meaningful story, and merges parts of sentences when they have shared subjects or predicates. the final realization is performed using pyrealb, a french-english realizer used in some data to text applications (lapalme, 2023). pyrealb derived from our submission to the webnlg challenge @xcite 2020 in which the text realization was performed through an api that sent json structures to a jsrealb 1 server that returned the final text. in this case, we perform the realization directly in python. our 1 https://github.com/rali-udem/jsrealb paper provided a critical review of the data and discussed the suitability of this competition results in a wider natural language generation setting. these remarks are still valid, given that the data for this shared task is the same or a textual replacement of entities without changing the organization of the rdf triples. provisions have been made to remove singleton sets from the evaluation in this competition, thus making sentence realization a bit more challenging. ## text generation we recall that an rdf triple is composed of three uris. in this dataset, they are replaced by english tokens, corresponding to the subject, the predicate and the object. an object can also be a constant string, a date or a number. the predicate of a triple declares a relation between the subject and the object, such as campeonato_brasileiro_série_c | country | brazil, in which campeonato_brasileiro_série_c is the subject (a brazilian soccer competition), country the predicate indicating that the subject takes place in the country indicated by the object brazil. to illustrate our nlg process, we use the set of triples shown in the first step in text generation is to determine what information to include in the text. in the context of this shared task, this is given: it consists of at most 7 triples, and only 4% of the sets are made up of seven triples. moreover, 20% of the triples are singletons that are easy to generate, but they were not submitted for human evaluation. since the predicate of a triple indicates a relationship between its subject and object, in our case, it maps to a verb that links the subject and object of the sentence realizing this triple. agremiacao sportiva arapiraquense has vica as manager, it has 17,000 members and plays in the campeonato brasileiro série c league. it plays in estádio municipal coaracy da mata fonseca located inside arapiraca. campeonato brasileiro série c is from brazil and where vila nova futebol clube were champions. ## conclusion this paper described a symbolic approach to tackling the gem 2024 shared task. the approach relies on pyrealb, an existing text realizer that takes care of most of the low-level grammatical aspects, so the pattern could be specified at a relatively high level. after a few false starts and once the overall program organization was settled, it was relatively easy for me to develop and organize the patterns. the preliminary automated scores seems quite competitive compared to those of the other demos/rdfpyrealb participants, whom we conjecture mostly used machine learning approaches. in fact, almost all systems seem to obtain quite similar results depending on the scoring method. rdfpyrealb is very fast and can easily be adapted to new domains. considering that adding one new predicate takes about one minute, developing 250 new ones would take about four hours. machine learning could be used to develop new templates, although we doubt that it would be any faster.