NDS Updating Dictionaries
This page documents both lexicon and fst updating, and restarting of the server.
Administering NDS requires the use of Fabric, which is a system for performing
All dictionaries are on gtdict, and require logging in
Updating the lexica on gtdict
For the impatient: The short version:
fab DICT compile fab DICT test_configuration fab DICT restart_service
The longer explanation:
1.) Log in to the server via SSH
Log in to gtdict, and thereafter do sudo su neahtta
Note that when logged in as the NDS user, the python virtualenv should be
(neahtta_env)[neahtta@gtdict ~]$
(If you do not see this, do the following commands from the home directory of
When you see (env) in the command prompt, continue.
2.) Go to the neahtta catalogue and run the Fabric process
cd ~/neahtta/ fab DICT compile_dictionary
Replace DICT below with sanit, baakoeh, etc. (to fab sanit compile_dictionary etc.)
If you have problems here, make sure that the environment variables for
3.) Check that there were no errors, also wc -l dicts/*.xml to make sure there is content in the files.
If there is an error in an XML file used in compilation, Saxon will print out
This process compiles all dictionaries to dicts/, which is the place that
NB: The files checked in to SVN are different from those actually used in
4.) Test the configuration files
An automatic tool to check that everything went well is also available.
Running the following command will evaluate the config, test dictionaries, and
fab DICT test_configuration
5.) Restart the server process
When everything is working, run the following:
fab DICT restart_service
Updating the FSTs
There are two ways to update the FSTs. For both of these options, you must
As above, you can use the test command to see if the files were updated.
fab DICT test_configuration
If you see any errors, be sure to correct them.
Updating on your own
The first way to update FSTs is to do so on your own, using whichever method
To find the FST locations:
fab DICT test_configuration
This will output the following:
SoMe: FOUND: /opt/smi/sme/bin/analyser-dict-gt-desc-mobile.xfst UPDATED: Tue Nov 4 15:47:31 2014 FOUND: /opt/smi/sme/bin/generator-dict-gt-norm.xfst UPDATED: Tue Nov 4 15:47:31 2014 sme: FOUND: /opt/smi/sme/bin/analyser-dict-gt-desc.xfst UPDATED: Tue Nov 4 15:47:31 2014 FOUND: /opt/smi/sme/bin/generator-dict-gt-norm.xfst UPDATED: Tue Nov 4 15:47:31 2014 ... snip ...
When you compile the analyzers on your own, copy them to these paths, and test
Updating via Fabric
NB: on gtdict this will work only by removing 'gtdict.uit.no' in the variable no_fst_install in the fabfile.py.
Fabric provides a quick shortcut to the build processes for each language.
When you are logged in and in the ~/neahtta/ directory, you may run these
Compiling FSTs with Fabric is as follows: you can compile all FSTs
fab DICT compile_fst:ISO fab DICT compile
When you run these, follow the output to make sure no errors have occurred. The
Updates to FSTs do not require restarting the server, and changes will be made
Either of these will compile the FSTs in their original locations as defined in
Testing the configuration
Go to neahtta and configure the dictionaries
cd ~/neahtta/ fab DICT test_configuration
Here, replace DICT with the relevant name in configs/ that you are working on (the list of DICTs above).
If everything is good and there are no errors, you'll see FST paths, and some happy cyan text at the end.
Resetting the server
Either use the fab process, or relevant system commands.
cd ~/neahtta/ fab DICT restart_service
NB: you may be prompted for the neahtta sudo password, and if this doesn't
More on Fabric
The Fabric system.
The Fabric system itself (cf fabric.org is run,
Using Fabric
Most of the process here is delegated to other commands, and this is because
Two benefits for people who need to run these processes frequently are:
- chaining commands together
- running remotely
Commands can also be chained, for example (here with guusaaw as DICT):
fab sanit compile test_configuration restart_service
This would execute everything after sanit in order: compilation, testing, and