Michael Elhadad

CLINT - A Hybrid Template/Word-based Text Generator

This is the home page of the CLINT project. CLINT is a hybrid text generator written in C++ under Windows. It merges two techniques for text generation:
  1. Templates
  2. Word-based generation for Noun phrases
CLINT has been developed by Rinat Gedalia and Michael Elhadad.

What is in the package

CLINT is demonstrated as a business letter composition engine, in the example setting of a Credit Card company answering to inquiries from its customers. It contains four components:
  1. A template development system
  2. A problem definition system
  3. A Noun-phrase generator
  4. The run-time generator
The template definition is used to describe a simple grammar of templates. Template expansion is a simple string operation (fill-the-holes). In addition to simple template expansion, the template definition language supports random alternation (to add variety to the text produced), conditional expansion (to embed different templates depending on the value of a parameter) and recursive template embedding (to allow a compositional description of templates). The toplevel template for a business letter might look as follows:
[Address] [Date]

Dear [Title][Name]:


(If [Tone]="Formal" 
  "Thank you,")

The problem definition module is used to associate templates with a decision tree. At runtime, the generator asks questions to the user by following the decision tree described in the problem definition module, and in the process, acquires the values of parameters - either directly from the user or from a database. Once the decision tree is traversed, a template is associated with each leaf and the template is instantiated with the value of the parameters. Within the template, all references to objects in the domain are marked as special slots within the template - and not expanded as simple strings. Instead, the information to build noun phrases is passed to the NP generator that takes into account the discourse context to decide what form of NP is most appropriate at each point. The NP generator can decide to build a pronoun, a complete noun-phrase with all modifiers, a light noun-phrase with only a subset of the modifiers or a one-anaphora. Different algorithms can be tested on the output and changed at runtime. The runtime generator interacts with the user and the database to obtain information on the specific case at hand, select an appropriate template, and fill it with the obtained data. The NP generator is then invoked on the expanded template and a complete text is produced.


CLINT runs under Microsoft Windows 3.1. It is written in C++. The package contains an example template grammar in the domain of Business Letter Composition. After running clint.exe, open the file transit to run an example.

Obtaining the package

This zip file contains two files: clint.exe and the data file transit which is an example of template grammar with a problem definition.

More material

More material will be made available on CLINT in the near future - including complete source code, user documentation and description of the algorithms used by the NP generator.

Last modified March 31st, 1996 Michael Elhadad