メインコンテンツまでスキップ

AI_SENTIMENT

説明

テキストの感情分析に使用されます。

構文

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

パラメータ

ParameterDescription
<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 |
+----------+