Setup with multiple source dictionaries
The standard way to setup a DictionaryForMIDs dictionary is to use one input dictionary file. An index will be generated for both the left and right languages.
For these dictionaries an expression ABC will translate to XYZ. XYZ will also translate back to ABC. However, there are also some dictionaries where ABC translates to XYZ, but XYZ translates to DEF. For this kind of dictionary you will need to setup your dictionary files a little differently.
Instead of using a single input dictionary file, you will use 2 input files, one for the ABC to XYZ translation, and one for the XYZ to DEF translation. Then you will run DictionaryGeneration within the DictionaryForMIDs-Creator 2 times. Here are the details of the process.
Step 1: Run DictionaryGeneration
- generate 2 input dictionary files (both files should have the languages organized the same way. For example, if you have an English to German dictionary, then the English side should be in the left column for both of the input files)
- enter these properties into your DictionaryForMIDs.properties file:
language1HasSeparateDictionaryFile: true language2HasSeparateDictionaryFile: true
- also enter this into your DictionaryForMIDs.properties file:
language1IsSearchable: true language2IsSearchable: false language1GenerateIndex: true language2GenerateIndex: false
- run DictionaryGeneration for 1st input dictionary file
- rename the "dictionary" directory (that contains the directory.csv, index.csv and searchlist.csv files) to something else (dictionaryEngGer, for example)
- DictionaryForMIDs-Creator will automatically create a new "dictionary" directory in the same place as the old directory if the output directory for the 2 dictionaries you provided is the same.
- change these properties in your DictionaryForMIDs.properties file manually:
language1IsSearchable: false language2IsSearchable: true language1GenerateIndex: false language2GenerateIndex: true
- run DictionaryGeneration again for the second input dictionary file
- copy the contents of the 1st output folder into the second output folder, except for the "DictionaryForMIDs.properties" file (For example: from 'dictionaryEngGer' to 'dictionary')
Step 2: Edit your outputted DictionaryForMIDs.properties file
- change both these settings to true:
language1IsSearchable: true language2IsSearchable: true
- look at the DictionaryForMIDs.properties files for both outputs. Find the bigger number of the two files and enter it into your final DictionaryForMIDs.properties file manually also:
indexFileMaxSize dictionaryFileMaxSize searchListFileMaxSize
- copy one line into the DictionaryForMIDs.properties file to have both these properties (each of the export files will only have one line):
language1IndexNumberOfSourceEntries language2IndexNumberOfSourceEntries
Step 3: Run JarCreator to package the generated dictionary files in the empty DictionaryForMIDs.jar/jad
Prev | DfM-Creator Home | Next |
Normation - Advanced | Content declarations |