OmegaT: Customizing Options for Okapi Filters
February 4th, 2014, Roman Mironov
The Okapi Filters plugin makes it possible for OmegaT to use the Okapi filters. This has two advantages:
- Some of the filters included in the plugin, such as XLF and TXML, are different from the native OmegaT filters and can therefore be used where the native ones are less effective.
- The plugin has filters for important file formats not supported by OmegaT natively, such as TTX and IDML.
Until recently, users could not configure the Okapi filters to use with OmegaT, although these did have configurable options. On November 10, Okapi developer Yves Savourel announced that customizing these options had been made possible. This post explains how to do this and provides an example.
- Download the latest version of the Okapi Filters plugin and put it into OmegaT’s plugins folder.
- Open Rainbow and select Tools => Filter Configurations.
- In the Folder field, select the folder to save your custom configuration.
- Select the desired filter, for example IDML (okf_idml).
- Click Create.
- Change the configuration’s name, for example to “copy-of-default-IDML.”
- Change the options as desired. For instance, enable the Create new text units on hard returns checkbox.
- Click OK. Rainbow will save the file to the selected folder under “copy-of-default-IDML.fprm”
- In OmegaT, open the File Filters settings (global or project-specific ones, depending on what you are using). I recommend using project-specific file filters; in this case, go to Project => Properties => File Filters.
- Select the appropriate filter. In our example, this is going to be InDesign IDML files (Okapi).
- Click Options.
- Enable the Use the following filter parameters file checkbox and select the file that you created.
- Click OK until you get back to the Editor, and reload the project. The new options will apply.
- If you need to change the options in your custom FPRM file, you need to do that from Rainbow again. After changing the custom file, you do not need to change anything in OmegaT, since the plugin will re-read the custom file upon the next reload.
- Note that all custom FPRM files need to be within the same folder.
Example: Customizing the IDML filter
By default, this filter does not segment text on hard returns, resulting in multiple occurrences of sentences packed into one segment. But the filter does allow configuring this option, although it is still in beta. Simply enable the checkbox in your custom file. Below is a comparison of two files segmented with this option disabled and enabled. The custom file (with this option enabled) results in many more segments, which is beneficial for translation.