C-Phrase Admin InterfaceA tour of the C-Phrase Administration Interface
All of your actions to create, edit, launch and log natural language interfaces (NLIs) will be via the C-Phrase Admin Interface. You can reach this interface by pointing your browser at port 9999 of the public DNS of the EC2 instance you are running a C-Phrase Server on. After you provide user and password (default user: "admin" with password being the instance id of your EC2 instance), you are presented the Admin Interface:
If you hover over the C-Phrase logo on the top left of the dark control bar, you will see the current version of C-Phrase you are running. Continuing to the right, NLIs is where you launch natural language interfaces, Create is where you create a new configuration over a database, Edit is where you edit and extend configurations, and Documentation brings you to the current version of the documentation. On the far right of the control bar, you see a refresh button and then a logout button.
The NLIs page lets you launch natural language interfaces and shows those currently running.
To launch an NLI, select
configuration/corpus/port combinations and click 'Launch'.
In the screen above, the administrator has already launched three NLIs using three different
configurations. These NLIs can be accessed through the browser via the given
NLI link on the left. Logs of user interactions can be
accessed by clicking on corresponding log icons. In this case only the interface
'system' is being logged.
Create Configuration Page
The create configuration page is where administrators create or upload earlier configurations. Broadly speaking, there are two alternative modes to using C-Phrase: (1) In the remote mode a natural language interface (NLI) is configured for an existing remote database; (2) In the stand-alone mode a database and NLI configuration are created entirely within the C-Phrase Admin Interface and hosted on the C-Phrase Server.
The area to the upper left is where you create configurations for remote databases. The area to the upper right is where you create stand-alone configurations. The area at the bottom is where you upload earlier configuration directories as part of migrating to new C-Phrase Server instances. In the bottom you can also upload CSV to create an instant stand-alone configuration with the database being the contents of the CSV.
In the screen above the administrator is building a configuration over a remote MySQL database by specifying a database connection string (see this video where a DBA builds a rudimentary interface over the Northwind database).
Edit Configurations Page
The edit configurations page is where you do the bulk of your work. On the left, you select
a configuration, which then gives a set of applicable actions on the right. In the screen above the administrator has selected the 'recipes' configuration. By clicking the action 'Edit', the administrator opens the tree editor for the
.cphrase file in the currently select configuration(see screen blow). The 'Copy','Rename' and 'Remove' actions apply to the entire directory of the current configuration. 'Launch Interface' takes the administrator to the interfaces page with the current configuration selected. 'Add Corpus' will let the administrator build up a set of example natural questions to present to users. Since 'recipes' is a stand-alone configuration, the administrator can click 'Build database' and a new SQLite database is built directly from the .cphrase configuration. A related operation is to 'Load DB into .cphrase'. This updates the current .cphrase file with the state of the current database over which users have been making updates. The 'Download ZIP' action downloads a
.zip file containing the entire configuration directory. This operation lets administrators back-up their configurations as well as migrate configurations to new C-Phrase server instances. Finally, in the area at the bottom, administrators may upload specific files and sub-directories into the configuration directory.
The .cphrase tree editor is where the 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 make use it.
In the screen above the contents of the recipes configuration directory are displayed in the directory navigator. There are several distict file types that are relevant:
<configuration-name>.cphrasefile is where you specify which tables and views of the underlying database can be accessed and with what phrases. A detailed description of the
.cphrasefile format is presented here.
.corpusfile represents question sets that may be presented as examples to users. Corpus files can either be edited directly or tree edited.
.logfiles 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.
<configuration-name>.pyfile is a special initialization files that C-Phrase executes when an NLI is launched. This sets configuration specific global variables.
flask.config.jsonfile is where you may fix user name/password authentication to guard which users have access to launched NLIs.
.dbfiles are binary files are SQLite databases that are used in stand-alone configurations . After building up a
.cphrasefile, administrators create these SQLite database (.db file) directly. Launching an NLI over such configuratins will be blocked until this local database is created. Afterall, the NLI must be over some database.
flask.config.jsonfile at the root of directory explorer to the left, they can change the administration user and password, save, and then restart the C-Phrase Server for these changes to take effect.
Documentation PageThe documentation page always points to the latest version of the documentation hosted at https://c-phrase.com/documentation (Confirm that you are not viewing a cached earlier version of the documentation).