What are Runtime Rules?
Language Studio™ Enterprise Runtime Rules provide a means to modify the translation dynamically at runtime, forcing the translation engine to bias the output towards the terms specified in the runtime glossary.
Runtime rules are a very simple format, with the source and target term separated by a tab. Each runtime rule can have multiple lines and each rule should be separated by a new line.
Runtime rules are absolute. If the specified term is found, it will override the statistical engine and be used in the translated output.
There are four types of Runtime rules, which are explained below.
What Runtime Rules can be added
There are four runtime rules that can be added to the engine at runtime.
1. Pre-Translation Correction (PTC):
Language Studio™ allows for the adjustment of terminology so that older terms are transformed into their more modern form prior to translation. As the correct form is passed into the translation engine, the translation will also choose the correct form. Pre-Translation Corrections can also correct known errors such as spelling mistakes, common OCR errors, glued words, etc. Often the original source material may contain outdated terminology.
2. Runtime Glossaries (GLO):
Language Studio™ allows glossaries to be defined on a customer, project and job level. Like RBMT systems, the preferred term can guide the translation. Unlike RBMT systems, most terms are already known by the SMT platform via the translation memories provided, thereby reducing the amount of work needed for a specialist or a linguist to refine the engine.
1. Non-Translatable Terms (NTT):
Some terms such as product names, venue names, etc. should not be translated. Language Studio™ allows a list of non-translatable terms to be specified.
2. Post-Translation Adjustments (PTA):
Statistics may determine a preferred term based upon the training data provided. A preferred term for one customer may not be the preferred term for another customer. One of our clients has 2 clients of their own in the commercial real-estate business. One prefers to call some buildings by their older name, while the other prefers the new name. A single engine can be used, with a Post-Translation Adjustment making the necessary change for each specific customer.
When To Use A Runtime Rule
Runtime rules are not a permanent solution, they offer a temporary solution for a quick fix or change. They are useful when a new version of the engine has yet to be trained.
How to Create A Runtime Rule
A Glossary is built using a Text Editor such as Notepad++. The file is built and saved as a .txt file in UTF-8 format.
How to Write A Runtime Rule
For the runtime rule, there are three columns, apart from an NTT, which has just the two.
PTA, GLO, PTC:
source term 1<TAB>target term 1<TAB>rule
source term 2<TAB>target term 2<TAB>rule
source term 1<TAB>rule
source term 2<TAB>rule
Application of a rule can be either Case Sensitive (CS) or Case Insensitive (CI) on the Source.
By default the Source side is CS. The Target side is also case sensitive. Language Studio™ has a special feature to allow case sensitivity to be specified by the user.
The third column in a rule can set the Case Sensitivity of the Source, by using CS, CI, Null (no value given).
A rule has one of the following values:
cs: case sensitive
ci: case insensitive
rcs: regex case sensitive (for PowerTool users)
rci: regex case insensitive (for PowerTool users)
brown sugar<TAB>azúcar moreno<TAB>ci
Sorting The File
To ensure that some patterns do not break other patterns make sure that you sort the rules by the length of the source search pattern with the longest at the top.
metallic plate<tab>placa metálica<tab>ci
metallic plate<tab>placa metálica<tab>ci
Example of a glossary:
Saving The File
Important Note - When the file is complete sorted and saved, exit the file and change the file extension to .ptc .ntt .glo .pta. as appropriate.
How to Set A Runtime Rule
The Glossary is then uploaded into Language Studio™ Run-time Rules page, found in the Translation tab, and must be applied to the relevant translation engine and project.
The runtime rule is uploaded to the relevant place, the Language Pair, Domain and Project. For example, a glossary will be uploaded to the GLO section by clicking on Upload.
The file for translation can now be run with the rule set.
To remove the rule, just select the rule from the above page and press Delete.