Introduction

The C-Phrase Format Manual gives a detailed description of the XML-formats that underlie all C-Phrase NLIs. These formats are captured in the .cphrase and .corpus files within C-Phrase NLI configurations. A .cphrase configuration file is always takes the same name as its configuration and contains the root element config. Configs define what tables (and views) can be accessed and with what phrases. The examples discussed here are drawn from the .cphrase files: geo.cphrase, PIM.cphrase and northwind.cphrase that are delivered as working examples with C-Phrase. We recommend that you peruse these files to get an idea of what typical .cphrase files look like. Likewise .corpus files that contain the root element corpus and provide a set of example questions and constants directives that can help user navigate NLIs. We recommend you peruse the example corpus supplied in the geo configuration.

This manual gives the DTD definitions of the elements that make up these formats along with a detailed description of what each XML attribute and attribute value means. Note that as a general convention all XML attributes named id represent identifiers. They should not start with a number, nor contain any spaces or any special characters besides the underscore character '_'. Also all XML attributes names description contain a documentation string that is attached to an element. Finally, all XML attributes named alive default to "true". If it is "false" then the corresponding element is temporarily disabled.

As a final point, often .cphrase files will contain fragments of SQL that are to be evaluated over the underlying database. Because .cphrase files are in XML, this SQL will always be encapsulated in CDATA sections. You will find that crafting arbitrary expressions of SQL in the dialect of the underlying database can solve many intricate configuration problems.