Model 在Google AutoML翻译中使用带有自定义模型的词汇表

Model 在Google AutoML翻译中使用带有自定义模型的词汇表,model,request,machine-translation,google-cloud-automl,glossary,Model,Request,Machine Translation,Google Cloud Automl,Glossary,我在Google AutoML语言翻译中构建了一个自定义模型和一个词汇表。有没有一种方法可以同时使用自定义模型和术语表?如果是这样,request.json应该是什么样子?我不知道如何请求,但我使用了另一种方式。 从“词汇表”中获取翻译 将转换用作自定义模型源文本 就像这样: text=“您想要翻译”→ text2(使用术语表)→ 最终结果(自定义模型) 希望对您有所帮助“您想翻译”→ text2(使用术语表)→ 最终结果(自定义模型)听起来很有趣。我来试试。您完全可以同时使用glossar

我在Google AutoML语言翻译中构建了一个自定义模型和一个词汇表。有没有一种方法可以同时使用自定义模型和术语表?如果是这样,request.json应该是什么样子?

我不知道如何请求,但我使用了另一种方式。

  • 从“词汇表”中获取翻译
  • 将转换用作自定义模型源文本
就像这样: text=“您想要翻译”→ text2(使用术语表)→ 最终结果(自定义模型)


希望对您有所帮助

“您想翻译”→ text2(使用术语表)→ 最终结果(自定义模型)听起来很有趣。我来试试。

您完全可以同时使用glossary和AutoML。提出发帖请求:

POST https://translation.googleapis.com/v3/projects/project-number-or-id/locations/us-central1:translateText
用这个有效载荷。模型应该指向AutoML模型路径,glossaryConfig应该指向术语表id

{
  "model": "projects/project-number-or-id/locations/us-central1/models/TRL1395675701985363739",
  "sourceLanguageCode": "en",
  "targetLanguageCode": "ru",
  "contents": "Dr. Watson, please discard your trash. You've shared unsolicited email with me. Let's talk about spam and importance ranking in a confidential mode.",
  "glossaryConfig": {
    "glossary": "projects/project-number/locations/us-central1/glossaries/glossary-id"
  }
}

嗨,戴尔,我正面临着同样的问题。我需要将AutoML训练模型与术语表结合起来。从谷歌的文档中,我发现不可能将它们结合起来。此外,该库不允许将术语表作为输入参数。你有什么建议吗?