Introduction
C-Phrase can either be hosted by us, launched by you on AWS, launched by you on Azure, launched by you on another cloud provider, or installed and run on your on-premises LINUX machine. Whichever option you choose, we refer to the virtual or physical machine where you run C-Phrase as the C-Phrase Host
This guide gives instructions on how to install and launch the C-Phrase Admin Server and how to use its Admin Interface to configure, launch and monitor Natural Language Interfaces (NLIs) that can be accessed by users via an NLI Portal. It also covers the REST API that allows developers to integrate NLIs into arbitrary systems.
Overview of Operation
Using your browser, you access the Admin Server via the Admin Interface where you configure, launch and monitor NLIs that users access via their web browsers or through custom applications making REST API calls. We support all major browsers including Chrome, Firefox, Opera and Safari.
Broadly speaking, there are two alternative operating modes of C-Phrase: remote mode and stand-alone mode. In remote mode a natural language interface (NLI) is configured for an existing remote database. In stand-alone mode a database and NLI configuration are created entirely within the Admin Interface and both the NLI and database are run on the C-Phrase Host. The work flows for these modes are spelled out below.
Remote Mode (video)
To build an NLI for an existing remote database, first you create a configuration which, among other things, associates default words and phrases with tables, views, columns, values and foreign keys of your remote database. The configuration also holds several additional files that configure passwords, global parameters, examples questions files, logs, etc.
Once you have a configuration, then you can launch an NLI through which users can access your database. The figures below illustrates this: (1) you connect to your remote database; (2) a configuration is built and saved on the file system of the C-Phrase Host; (3) you launch an NLI; (4) users ask questions over the NLI; (5) SQL is processed over the remote database.
Stand-Alone Mode (video)
In stand-alone mode, you use C-Phrase to build a completely self-contained (database) application. The configuration files for the NLI as well as the actual database all sit within the same directory on the file system of the C-Phrase Host. The definition of the database is either constructed from CSV file uploads or is built manually within the Admin Interface. An SQLite database instance is built and is populated either by importing data from CSVs (video) or by issuing natural language update commands through the NLI.
An interesting aspect of stand-alone mode is how it supports the rapid evolution of the structure and contents of a database. Specifically you can export the entire contents of the database into C-Phrase's XML format. This is a human-readable format that represents a total database state and natural language interface definition. You can then make changes and extensions to it and then rebuild everything into a new more evolved database. You can also very easily merge other databases into a growing stand-alone configuration. This ability to make rapid changes is very useful in agile use cases where the structure of the data is changing quickly.
Customize your NLI
No matter if it is remote or stand-alone, you will probably want to improve the quality of your initial NLI by customizing it. This is achieved using the tree editor of the Admin Interface to attach phrases to database elements and to set special properties on table columns. It may also involve setting NLI parameters to best fit performance, recall and precision tradeoffs. While you may need to specify some regular expressions and some SQL templates, there is no grammar to specify, nor are there training sets that need to managed.