- Kategorien:
Zeichenfolgen- und Binärfunktionen (Large Language Model)
SENTIMENT (SNOWFLAKE.CORTEX)¶
Gibt eine Stimmungswert (Sentiment Score) für den gegebenen englischsprachigen Eingabetext zurück.
Syntax¶
SNOWFLAKE.CORTEX.SENTIMENT(<text>)
Argumente¶
text
Zeichenfolge, die den Text enthält, für den ein Stimmungswert berechnet werden soll.
Rückgabewerte¶
Eine Gleitkommazahl von -1 bis 1 (einschließlich), die den Grad der negativen oder positiven Stimmung im Text angibt. Werte um 0 zeigen eine neutrale Stimmung an.
Access Control¶
Users must use a role that has been granted the SNOWFLAKE.CORTEX_USER database role. See Erforderliche Berechtigungen for more information on granting this privilege.
Beispiel¶
In diesem Beispiel enthält eine Tabelle mit dem Namen reviews
eine Spalte mit dem Namen review_content
, die den Text der von den Benutzern eingereichten Bewertungen enthält. Die Abfrage gibt für jede Bewertung einen Stimmungswert zurück.
SELECT SNOWFLAKE.CORTEX.SENTIMENT(review_content), review_content FROM reviews LIMIT 10;
Legal Notices¶
Snowflake Cortex LLM Functions are powered by machine learning technology, including Meta’s LLaMA 2. The foundation LLaMA 2 model is licensed under the LLaMA 2 Community License and Copyright (c) Meta Platforms, Inc. All Rights Reserved. Your use of any LLM Functions based on the LLama 2 model is subject to Meta’s Acceptable Use Policy.
Machine learning technology and results provided may be inaccurate, inappropriate, or biased. Decisions based on machine learning outputs, including those built into automatic pipelines, should have human oversight and review processes to ensure model-generated content is accurate.
LLM function queries will be treated as any other SQL query and may be considered metadata.
For further information, see Snowflake AI Trust and Safety FAQ.