Knowledge Representation and KPML

For teaching or grammar development work with KPML, it is not necessary to worry about knowledge representation and the information on this page. If you are using a standalone generator image then none of the information here is relevant because the necessary knowledge representation facilities have already been compiled into the image.

However, for practical natural language generation work it is usually necessary to consider carefully how the the informational content of any texts or sentences to be generated is going to be represented. This is typically done when using KPML by employing an external Knowledge Representation system.

KPML comes ready to interact with some established knowledge representation (KR) systems and more are being added. To use any new KR system it is generally sufficient to provide definitions for a small set of KR-KPML interface functions. This is then the only change that is necessary.

KPML needs to know something about the KR system used because generation is usually done with semantic specifications that rely on a particular semantic organization called the Upper Model. This linguistically motivated organization of information provides a "consistent conceptualization" of information that is sufficient for generating appropriate grammatical forms. The Upper Model needs to be installed whenver KPML is being used for semantic generation from the standard Sentence Plan Language (SPL) that it uses as input. This means that whenever another KR system is used, it is also necessary to obtain, or make, a copy of the Upper Model within that KR system. With current efforts to ensure the reusability of ontologies such as the Upper Model, it is to be expected that this 'copying' will become ever easier; at the moment we are explicitly addressing some of the re-use issues in two linked research projects.

KPML, and its forerunner Penman, have been used in the past with a number of KR systems and so we know that it is generally straightforward to work with a new one. Those KR systems are mostly drawn from the KL-one family of knowledge representations and include (loosely chronologically):

The KPML release files include by default a setup file for interfacing with the Loom KR system. This will work for any of the Looms 2.1 through 4.0, although for Loom 4.0 you need to be using KPML4 or later. To use Loom, permission for doing so, and the source files, must be obtained from ISI; this is free for research purposes. You must then compile Loom using your ANSI Common Lisp installation.

There is a single file at the top-level in the KPML distribution directory called selected-kpml-kr.lisp. This file is always loaded when KPML is installed and must contain code that takes responsibility for loading the complete KR system, which ever that may be. So the default contents of this file is a load-up script for Loom: all that needs to be set by the user is the root directory of the compiled Loom installation.

John Bateman. 19th. January 2013