Skip to main content

Research Repository

Advanced Search

A case-based approach to data-to-text generation. [Software]

Upadhyay, Ashish; Massie, Stewart; Singh, Ritwik Kumar; Gupta, Garima; Ojha, Muneendra


Ritwik Kumar Singh

Garima Gupta

Muneendra Ojha


Traditional Data-to-Text Generation (D2T) systems utilise carefully crafted domain specific rules and templates to generate high quality accurate texts. More recent approaches use neural systems to learn domain rules from the training data to produce very fluent and diverse texts. However, there is a trade-off with rule-based systems producing accurate text but that may lack variation, while learning-based systems produce more diverse texts but often with poorer accuracy. This code has been used to help propose a case-based approach for D2T, which mitigates the impact of this trade-off by dynamically selecting templates from the training corpora. In our approach we develop a novel case-alignment based, feature weighing method that is used to build an effective similarity measure. Extensive experimentation is performed on a sports domain dataset. Through Extractive Evaluation metrics, we demonstrate the benefit of the CBR system over a rule-based baseline and a neural benchmark. The file accompanying this OpenAIR record contains a link to where the code is held on GitHub. The GitHub repository also includes information on how to use the code.


UPADHYAY, A., MASSIE, S., SINGH, R.K., GUPTA, G. and OJHA, M. 2021. A case-based approach to data-to-text generation. [Software]. Hosted on GitHub [online]. Available from:

Digital Artefact Type Software
Deposit Date Nov 2, 2021
Publicly Available Date Nov 4, 2021
Keywords Case-based reasoning (CBR); Natural language generation (NLG); Natural language processing; Data-to-text; Textual case-based reasoning (Textual CBR); Feature weighting
Public URL
Publisher URL
Related Public URLs


Related Outputs

You might also like

Downloadable Citations