How can I get both gender specific translations?

109 views
Skip to first unread message

Alfred S

unread,
May 17, 2020, 12:46:36 PM5/17/20
to Google Cloud Translation API
Hi,

Since 2018, the Google Translate website provides both masculine and feminine translations for gender-ambiguous phrases. (see the attached screenshot)

Screen Shot 2020-05-17 at 11.46.23.png


However, I can't seem to access both translations through the API? I've tried both the "base" and "nmt" models, and both only provide one translation in the response JSON, the masculine: "el público".

Is it possible to access both somehow?

Many thanks.

For reference, this is my request:

{
  parent: 'projects/****/locations/global',
  model: 'projects/****/locations/global/models/general/base',
  contents: [ 'the public' ],
  mimeType: 'text/plain',
  sourceLanguageCode: 'en',
  targetLanguageCode: 'es'
}

And this is the API response:

{
  translations: [
    {
      translatedText: 'el público',
      model: 'projects/****/locations/global/models/general/base',
      glossaryConfig: null,
      detectedLanguageCode: ''
    }
  ],
  glossaryTranslations: []
}

Yue Shi

unread,
May 17, 2020, 2:31:15 PM5/17/20
to Google Cloud Translation API
Hi, Cloud Translation API doesn't support gender specific translation at this time. Sorry for the inconvenience!
Reply all
Reply to author
Forward
0 new messages