Create Dictionary Setup File
Information about a dictionary has to be provided in its own setup file. The name of this file
is the name of the dictionary file itself, with the ending .dictionary
appended to it.
Note: The file name of a dictionary may not contain spaces. Choose short names if possible. |
Setup files need to be placed in Babbletower's dictionary directory. If you did not explicitly specify a dictionary directory, then this defaults to Babbletower's working directory.
The basic format for setting a dictionary property is:
property_name.
sub_property
=
value
Following a table with the properties you can set, along with their default values. You don't have to specify a property if the default value is already what you would like to set
property | meaning | default value | can also be set interactively |
---|---|---|---|
encoding |
text encoding of dictionary | UTF8 |
no |
format |
name of the entry format definition to be used with the dictionary. Predefined formats are:
|
default |
no |
file |
If you want to place a dictionary in a directory different from the dictionary directory, specify its full file name here. Note that the accompanying index file will have to be stored in the same directory. | none | no |
comment |
short dictionary comment | none | no |
hits.sort |
Whether to sort the result of a lookup in this dictionary. Values are on
or off . |
on |
yes |
hits.weight. length |
This and the next property, the position weight, are used when sorting hits (see manual). Values are from 1 (less important) through 10 (very important). | 1 |
yes |
hits.weight. position |
See comments for length weight. | 10 |
yes |
hits.checkend |
Trail checking during hit sort (see manual). Values are on or
off . |
on |
yes |
legend |
If you want to place the dictionary's legend file in a
directory different from the dictionary directory, specify its full file name here, including
the .legend extension. Alternatively, you can specify the name of a different
dictionary, from which to use the legend file. |
none | no |
Example
Here two examples for the dictionaries kanjidic
and eijiro
:
kanjidic.dictionary
:format = kanjidic comment = Kanji Dictionary hits.sort = off
eijiro.dictionary
:format = eijiro comment = English - Japanese (Eijiro) hits.weight.length = 3 file = /mnt/cf2/dictio/eijiro
Optional
You can place dictionary settings also in Babbletower's optional
properties file. Note however that in that case the name of the dictionary has to be prepended
to all property keys, e.g. |
file
property in the setup file,
copy the dictionary and index file into the same directory. If you did specify the file
property, be careful to place both dictionary and index file into that location