It is very common to implement a conversational assistant in multiple languages. Let’s say you have built a customer service assistant. One of the requirements may be to support additional languages, such as Arabic and Spanish, to accommodate your customer base. Often, I am asked how best to manage multiple skills, formerly called workspaces, in IBM Watson Assistant to achieve this goal. Though complete automation is a non-trivial task, there are ways this can be managed with some automation. Below are some suggestions to get you on your path.
Let’s assume you have built your Watson Assistant in the English language. Now you need to build the Arabic version of the assistant. The first thing you should do is review the list of supported languages and features for your languages of interest. Each language does not support all features. For example, contextual entities are supported in English but not in Arabic. So just be mindful of those feature differences and account for them accordingly.
Next, you need to export your English skill from Watson Assistant. Before you do that, you want to make sure that the “Irrelevance detection” option is set to “Keep existing”. There is an enhanced capability to detect irrelevant topics, however as of this post, it is only available in English. If this is not set properly, the import of your skill will throw an error later.
Now you are ready to export your English skill. Go to your “Skills” section in Watson Assistant, click on the ellipsis and then select “Export”. This will export your skill to a json file.
Open that json file in your text editor of choice and look for the language parameter. Change the ‘en’ to the target language of your choice. In this case, ‘ar’ for the Arabic language. You can find the appropriate value for your language here.
Once you have made the change, save the json file. Go back to Watson Assistant, create a new dialog skill and select the “Import skill” option. Then point to your newly modified json file, which contains the Arabic language value. Watson Assistant will build your new skill with the core language set to Arabic.
To be clear, what you now have, is a copy of your English skill. It has all the dialog, intents, etc, still in the English language. But it is inside the context of an Arabic skill according to Watson Assistant. Note that there are additional bidirectional language preferences that you can optionally configure in an Arabic skill.
The next step is to translate all your textual content from English to Arabic. There are two major steps in this process. The first step is getting the content translated. The second step is updating the skill with the translated content. There are several ways you can go about doing this.
One automation option is to use IBM Watson Language Translator to translate all your text from English to Arabic. You would need to write a script to extract the relevant text from your English skill’s json file to process those through the Watson Language Translator service. Those results need to be stored somewhere such as a data store or a temporary location — I’ll discuss this in the next section. Remember, this is a conversational use case. English and Arabic are wildly different languages in their form and origin (I speak Arabic, so I know firsthand :) . I would highly suggest having a native Arabic resource (who also speaks, reads and writes English fluently) review all the translations to ensure that the context is optimal for conversation.
Another option would be to have a native Arabic resource manually translate the content. You would need to create a data store, such as a spreadsheet, that contains all your dialog structure, intents, etc. The resource can use this to review the content and add their translations. Using an external data store will make it much easier to manage your skills for purposes like this.
Now that you have the content translated, the ideal scenario would be to trigger a process to have all the content automatically updated in your skill, in Watson Assistant. This is certainly achievable but requires some work to create a program that will take the new Arabic translations from your data store or temporary storage and update the English equivalents. You can programmatically apply the updates to your skill json file. You need to have an organized and detailed data store that contains a key reference (eg dialog node ID) to ensure this is done smoothly.
Another option is to do this manually in Watson Assistant. It would not be the most exciting task, yet it will get the job done. The resource who updates the content in Watson Assistant will still require the data store reference to know how to appropriately update the content.
The option that you decide on will depend on several factors such as your sizing of effort, resources available, etc.
Managing Content Going Forward
Once you define your process to translate your skills, you can use that approach to manage any updates going forward. There are other possible options out there to accomplish these tasks but these tips will help get you started on your path.
Marc is the CTO for IBM Watson AI Strategic Partnerships. When not leading the technology strategy and vision for IBM Partnerships, Marc enjoys DJing, playing video games and wrestling.