翻譯

Snowflake 生成式 AI 入門

James Cha-Earley

Senior Developer Advocate, Snowflake

為何要翻譯?

查詢課程資料,顯示前 3 大評論語言

  • Executive Resorts 以多種語言收到數千則評論
Snowflake 生成式 AI 入門

用 Cortex 進行翻譯

from snowflake.cortex import translate

translated_review = translate( text="El hotel fue excelente. Muy limpio y cómodo.",
from_language="es",
to_language="en"
)
Snowflake 生成式 AI 入門

翻譯後的評論

print(translated_review)
The hotel was excellent. Very clean and comfortable.
Chinese zh Dutch nl English en
French fr German de Hindi hi
Italian it Japanese ja Korean ko
Polish pl Portuguese pt Russian ru
Spanish es Swedish sv
1 https://docs.snowflake.com/en/sql-reference/functions/translate-snowflake-cortex
Snowflake 生成式 AI 入門

從資料庫進行翻譯

Snowflake Notebook,包含一個 SQL 查詢,回傳一則西班牙文評論與其英文翻譯

Snowflake 生成式 AI 入門

翻譯

印出原始西班牙文與翻譯後評論的輸出

Snowflake 生成式 AI 入門

小心使用

原文(西班牙文):

「Nos trataron como reyes.」

AI 翻譯:

「They treated us like kings.」

修訂版本:

「They treated us like royalty.」

$$

原文(法文):

「Le service laisse à désirer.」

AI 翻譯:

「The service leaves to be desired.」

修訂版本:

「The service was disappointing.」

Snowflake 生成式 AI 入門

品質保證

$$

$$

$$

  • 依特定準則進行人工審查 ✅

$$

評論的品質保證流程,包含人工審查

Snowflake 生成式 AI 入門

一起來練習吧!

Snowflake 生成式 AI 入門

Preparing Video For Download...