メインコンテンツまでスキップ
に最終更新

AI_SENTIMENT

説明​

テキストの感情を分析します。

構文​

AI_SENTIMENT([<resource_name>], <text>)

引数​

引数説明
<resource_name>指定するリソース名
<text>感情を分析するテキスト

戻り値​

感情分析の結果を返します。値には次のものがあります。

  • positive
  • negative
  • neutral
  • mixed

いずれかの入力が NULL の場合は NULL を返します。

結果は大規模言語モデルによって生成されるため、出力は変わることがあります。

例​

SET default_ai_resource = 'resource_name';
SELECT AI_SENTIMENT('Apache Doris is a great DB system.') AS Result;
+----------+
| Result |
+----------+
| positive |
+----------+
SELECT AI_SENTIMENT('resource_name', 'I hate sunny days.') AS Result;
+----------+
| Result |
+----------+
| negative |
+----------+