Introduction
This procedure explains how to download and install translation resources from the Translation Resource Store (TRS) when the server SPN9 is not connected to the Internet.
Procedure
This procedure is for a NMT translation resource, but the logic is the same as for Hybrid, SPE or SMT models. The example concerns an ENFR generic (M) NMT engine.
3 steps are required to activate languages on your SYSTRAN server:
1) Download resources from Translation Resource Store (TRS)
2) Import resources on your SYSTRAN Server
3) Activate resources on your SYSTRAN Server
1) Download resources from SYSTRAN Translation Resource Store
Go to https://trs.systran.net using your TRS credentials.
1.2) Filter
The first step is to download the filter. Kindly look for the "Filter" under the translation resources. You can locate the resource by typing its name in the "Name" filter box.
- Go to "Translation Resources" tab and select "Master TRs" subtab
- In the field "Name", type "Filter" and in the field "Distribution" select your OS
- Select the filter that you want to install
- Click on "Download" and "JSON".
You should have only 1 corresponding filter appearing in the list:
Select the filter (by checking the field in front of the field “ID”) and then click on "Download" and "JSON" separately and the save the files in your project folder.
1.2) Translation Engines
A translation engine is build of direct resources, resources from dependencies and resources from dependencies for some engines of the dependencies.*
Main steps
- First, you have to identify the engine you want to download in the "Master TR" tab: you can use filters available like languages, domain or direct text search.
- Then download resource(s) from the "Download" and "JSON" button. Note that for some items, only "JSON" is available.
- Next step is to look for all dependencies: dependencies are identified in the "dependency" part. Dependencies are link so you can open it in new tab. Note that dependencies may have dependencies .
- For each dependency, get resource(s) from the "Download" and "JSON" button. Note that for some items, only "JSON" is available.
Step by step example for a latest or 2nd generation NMT engine (Technology : Transformers & Tenserflow)
Step by step example for a 1st generation NMT engine (Technology : Torch)
Here is an example of different types of resources for an ENFR engine:
- In the field "Distribution" select your OS, and type the language codes for "Source language" and "Target language"
- Select the engine that you want to install
- Click on "Download" and "JSON".
Click to display the details (click on the small arrow before the field "Key") and check the "Dependencies" chapter to display all dependencies needed for this Translation Resource
Dependencies
Now you have to download all the dependencies one by one.
Look for 3rdParty, click on the 3rdParty version “~9.0”.
A new web page will be opened where you should have only 1 resource appearing in the list. Kindly select it and then click on Download and JSON:
Now you can close the new web page.
Look for Common, click on the Common version “~9.0”.
A new web page will be opened where you should have several resources appearing in the list. Kindly select it (by default select the latest one) and then click on Download and JSON:
Now you can close the new web page.
Look for LingResource_enfr, click on the LingResource_enfr version “~3”.
A new web page will be opened where you should have only 1 resource appearing in the list. Kindly select it and then click on Download and JSON:
Now you can close the new web page.
Look for SystranTranslationEngineBin_enfr, click on the SystranTranslationEngineBin_enfr version “~9.0”.
A new web page will be opened where you should have several resources appearing in the list. Kindly select the required resource and then click on Download and JSON:
Now you can close the new webpage.
Look for SystranTranslationEngineNMTData_enfr_Generic, click on the SystranTranslationEngineNMTData_enfr_Generic version “~3.0.0”.
A new web page will be opened where you should have only 1 resource appearing in the list. Kindly select it and then click on Download and JSON:
Now you can close the new web page.
Step by step example for a Rule Based engine
When you want to install “S model” engines, you should download the S model along with its dependencies, needed on the SPN9 server.
- Go to "Translation Resources" tab and select "Master TRs" subtab
- In the field "Distribution" select your OS, and type the language codes for "Source language" and "Target language"
- Select the “S Model” engine that you want to install
- Click on "Download" and "JSON".
Dependencies
Now you have to download one by one, all the dependencies corresponding to the selected “S Model” engine.
IMPORTANT: 3rdParty and Common are needed only once, if it's already installed with the right version, it doesn't need to be installed for each Translation Resource. Only lingresource_XXXX is needed for each Translation Resource, with the right version.
Look for 3rdParty, click on the 3rdParty version “~9.0”.
A new web page will be opened where you should have only 1 resource appearing in the list. Kindly select it and then click on Download and JSON:
Now you can close the new web page.
Look for Common, click on the Common version “~9.0”.
A new web page will be opened where you should have only several resources appearing in the list. Kindly select it (by default select the latest one) and then click on Download and JSON:
Now you can close the new web page.
Look for LingResource_enfr, click on the LingResource_enfr version “~3”.
A new web page will be opened where you should have only 1 resource appearing in the list. Kindly select it and then click on Download and JSON:
Now you can close the new web page.
2) Import resources on your SYSTRAN Server
2.1 Copy downloaded package to your SYSTRAN server
Once downloaded, unzip or untar (json and tar.gz) in the same folder/directory(Linux):
mkdir Translation_Resources
Alternative 1:
mv *.json *.tar.gz Translation_Resources/
Alternative 2:
cd /Translation_Resources
wget www.dropboxlink.com
tar -xvf kit_name.tar
2.2) Import on Linux
To import all the downloaded Translation Resources, please go to your server using ssh. Then execute the following:
su -c "node /opt/systran/apps-node/translation-resource-store/trs-local-import-directory.js -d /Path/Where/is/Translation_Resources/" systran
The command should display a “success” per each language.
This phase can take a few minutes depending on the numbers of languages that are to be imported.
Check ownership of the files in /opt/systran/apps-node/translation-resource-store/file-backend-storage are systran:systran. If not:
chown systran:systran /opt/systran/apps-node/translation-resource-store/file-backend-storage/*
3a) Activate resources on your SYSTRAN Server
Go to your server’s URL using https://servername: and connect with Admin rights
Open the Menu and click on Advanced Configuration:
Then click on Translation Resource tab, and select the translation resource that you want to install (always prefer the resources containing “NMT” when available).
IMPORTANT: the Filter resource is a mandatory resource to import, because it is used by the interactive translation box and for file translations.
Click on the pen (right side) then change the instance number from 0 to 1, and hit “ENTER” on your keyboard (otherwise the instantiation won’t start) and create a profile.
You can also create profiles from Menu , click on Profiles.
Note: You may have the choice between NMT & RBMT technologies, so you can select the expected one. Give a name to this profile. The best practices are to give the same name as translation resource + add the scope for better clarity. In this case the scope of usage for this profile will be public (all users can use it), so name it like this:
On the next screen, set Public option to Yes if you want to give access to this profile to all users or let it on No then define the granted users or groups into Users or Groups fields.
Now you can finish the translation profile creation by clicking on Submit.
For the Filter resource, you must create a dedicated route by clicking on Add route option as shown below:
On the pop-up screen, set the Public option to Yes then click on Submit.
Note: Depending on the usage kindly select Public or private route. For the filter it is highly recommended to add a public route
Now you should be able to translate.