0

Is there an option in Language translator to skip translation for certain words based on a regular expression or some other pattern.

For example we have some text where certain values are substituted based on a variable which we don’t want translated

"Hello $User_Name. How are you doing today?"

$User_Name should not be translated.

Is there a way to do this?

dk_cog
  • 60
  • 5
  • You could create a custom translation model. Your options would be either a forced glossary, where you could tell it to not translate fields like `$User_Name`; Or a parallel corpus where you could try and teach the model to not translate strings that start with `$`. Forced glossary should work, but will require you to provide all examples. Parallel corpus would give you the flexibility to not have to define all fields in advance, but it might not work so well. – chughts May 31 '19 at 12:00
  • Thanks, We can use forced glossary, however the number of these variables will increase and adding them every time to the glossary is not a viable option. To create a parallel corpus we need at least 5000 examples which we don't have right now. We will probably end up removing the variable before sending for translation and adding it back on the response. This may not be the best option, but one that is viable for now. – dk_cog Jun 03 '19 at 15:08

0 Answers0