The Admin Interface
You use the Admin Interface to create, edit, launch and monitor natural language interfaces (NLIs). The interface consists of several pages, each accessible from the navbar at the top (see top of figure 1). On the navbar, from left to right, NLIs is where you launch natural language interfaces, Create is where you create new configurations and Edit is where you refine and extend existing configurations. On the far right part of the navbar, there is a memory usage meter, a link to documentation and the Catch-Phrase logo which, if hovered over, shows the current version of Catch-Phrase. Finally, there is a logout button.
The NLIs page

The NLIs page lets you launch natural language interfaces (NLIs) and shows those currently running.
To launch an NLI, select
configuration/corpus/port combinations and click 'Launch'.
In figure 1, the administrator has already launched seven NLIs using seven different
configurations. These NLIs can be accessed through the browser via the given NLI
link on the left
of each table entry. The home button will take you to the home of each configuration. The .cphrase file,
examples, port and parameters
buttons will take you to the corresponding files for the given configuration. The checkbox on the far left lets
you terminate or restart a given NLI.
The Create page

Figure 2 shows the Create page where you can create configurations for remote databases or upload new configurations. In the left half of the page you can create a configuration for a remote database by specifying the configuration name, database engine, remote database host location and port, the name of the remote database and username and password to connect to the given database. Also, you specify checkboxes to characterization of the size of the remote database and whether to inport empty columns.
In the right portion of the Create Page, you can upload earlier or backed-up Catch-Phrase configurations. You will need to do this when you upgrade to newer versions of Catch-Phrase.

Figure 3 shows the Create page where you can create a stand-alone database. In this case all you need to specify is the name of the configuration.
The Edit page

Figure 4 shows the Edit page where you do the bulk of your work. On the left is the file navigator
where you select configuration folders or individual files. In the screen above the
northwind
configuration has been selected and we are in its home where a set of ten action buttons
are available for selection. By clicking the action button Edit,
you can open the tree editor for the .cphrase
file for northwind
(see figure 5). The
Copy,Rename and Remove actions apply to the entire directory of the current configuration.
Launch takes you to the NLIs page with the current configuration selected. Create Corpus
lets you build up a set of example natural language questions to present to users. Back-up will copy the configuration to
a hidden directory on the host in case you ever need to manually ssh into the host to manually recover the configuration. It is
recommended to manually back-up prior to major schema evolution operations. The Download ZIP action downloads a .zip
file containing the
entire configuration directory. This operation lets administrators back-up their configurations to external file systems
as well as to facilitate migration of configurations to newer versions of Catch-Phrase. Clicking on
XML snapshot of remote database will build
.db_xml
files that capture the state of the remote database. This operation is dangerous for
very large databases because it literally will copy the entire contents of the database into the
.db_xml
files on the host. (For stand-alone configurations this operation is called XML snapshot of local database).
Finally, if you click Condolidate Logs and Snapshots then all the NLI logs will be collapsed into a single log file and all
snapshot files and other logs will be deleted.
In stand-alone mode when there are XML snapshot files present and there is no local database present (it was removed), then you will have the available action Build SQLite Database from XML Snapshot. This allows you to rebuild the local database. This is usually part of the process of schema evolution of the original database.
In remote database mode when there are XML snapshot files present and the target attribute is set, there will be an available action Build Target Remote Database from XML Snapshot. This will build the database into the remote database specified in the target attribute. Via this technique Catch-Phrase can be used in data exchange.
Finally, in the zone at the bottom, administrators may upload specific files and subdirectories into the currently selected configuration directory. Normally this will be CSV files that the administrator is ingesting into the database.
Managing .cphrase files
The <configuration-name>.cphrase
file is where you specify which tables and views of the
underlying database can be accessed and with what phrases. A detailed description of the
.cphrase
file format is presented The Format Manual.

In figure 5, the administrator has clicked on the edit action and the .cphrase tree editor is brought up
for the northwind
configuration. This is where you build and edit a
.cphrase
file.
The operations in this editor are fairly straightforward provided one has studied in detail the
.cphrase file format. Once you have updated and saved a configuration, you
must launch or restart an NLI for users to use it.

In figure 6, the administrator has clicked on the edit action and selected the edit flat file button. This allows you to directly modify the XML within the editor. Note that if you try to save non-valid XML, the editor will block you.
Managing .corpus files

In figure 7 we see the tree editor for corpus files where we specify a set of
pre-build example questions to present to users as examples or as
constants directives that can be used in explorer of the NLI to help users
click construct questions and commands. A detailed description of the
.corpus
format is presented The Format Manual.
In addition to providing examples, corpus files can also be used in testing.
New corpus files may also be obtained by opening a log
file, clicking on Q and then running the corpus.xql
routine. The result of this
can then be pasted into the XML that defines the corpus. One can build tests from corpus files
and then later re-run such tests to check whether behaviour has changed.
This is particularly useful for testing whether extensions to
the configuration have broken any previously working questions.
Managing other files
In the above figure 7 the contents of the northwind
configuration directory are displayed in the file
navigator. There are several distinct file types other than the .cphrase
and .corpus
files
that are relevant:
- The
.log
files are XML-based logs of user sessions over the NLI. When opened, the full log in all its detail is shown. You can then run various in-built XQuery routines to better view and analyse these logs. These XQuery routines have self-explanatory names. -
The
<configuration-name>.py
file is a special initialization files that Catch-Phrase executes when an NLI is launched. This sets configuration specific NLI parameters . -
The
config.json
file is where you may fix username/password authentication to control which users have access to launched NLIs. One also specifies the default port and proxies of a given NLI as well as the number of simultaneous users (threads) the NLI can support. - The
.db
files are binary files are SQLite databases that are used in stand-alone configurations . After building up a.cphrase
file, administrators create these SQLite database (.db file) directly. - The
.db_xml
files are XML files representing the entire contents of a database. These are used to migrate databases and evolve databases in highly agile use cases. See this video for an example use of this to migrate a remote Oracle database to a stand-alone SQLite database.
Finally the config.json
file at the root of file navigator
is where you can change the administration user and password of the
Admin Server
.
Changing the administrator user name and password
If you wish to change the username/password for Admin Server
, navigate to the Edit page and
then click on the config.json
at the top left and edit the username and password values. In
the screen below, we have changed the username to "michael" and the password to "monGOOSE-123". Save this
file by clicking on the red save button. After this restart the Admin Server.

Documentation Page
The documentation page always points to the latest version of the documentation hosted at https://c-phrase.com/documentation
Migrating to newer versions of the Catch-Phrase AMI
Periodically there will be new releases of the Catch-Phrase that include new features, performance improvements
and bug fixes.
To migrate to a new version, first download all of your configurations as .zip files via the Admin Interface on
your old Catch-Phrase host.
Then extract these .zip files onto your local file system. Now launch a new version of Catch-Phrase.
Once you log into
the Admin Interface on this new instance, navigate to the Create
page and drag your extracted
directories in the
"Drop configuration folder here" zone at the bottom right of the screen. This is how you will be able to migrate
your
configurations to newer versions of Catch-Phrase.