snowflake.cortex.Sentiment¶
- snowflake.cortex.Sentiment(text: Union[str, Column], session: Optional[Session] = None) Union[float, Column] ¶
Sentiment calls into the LLM inference service to perform sentiment analysis on the input text.
- Parameters:
text – A Column of text strings to send to the LLM.
session – The snowpark session to use. Will be inferred by context if not specified.
- Returns:
A column of floats. 1 represents positive sentiment, -1 represents negative sentiment.