surfaceclassificationsentiment
Classificationdimension · returns varchar

SENTIMENT

Dimension-shaped sentiment analysis for GROUP BY

Per-row classifier — stable across GROUP BY.

classificationhybridspecialist-zootext

Arguments

nametypedescription
textVARCHAR
focusVARCHAR
num_levelsINTEGER

About

Dimension-shaped sentiment analysis — assigns each text a sentiment LABEL (e.g., "Very Negative", "Negative", "Neutral", "Positive", "Very Positive") and is designed for GROUP BY clauses. Returns VARCHAR. Backend: specialist zoo, dual-path. - **No focus** (general sentiment): uses `specialist_sentiment` which runs cardiffnlp/twitter-roberta-base-sentiment-latest — a purpose-built sentiment model — and buckets the continuous -1.0..+1.0 score into `num_levels` discrete labels. - **With focus** (e.g., "fear", "excitement", "credibility"): uses `specialist_classify_batch` with dynamically-generated labels of the form "No {focus}" / "Low {focus}" / "Moderate {focus}" / "High {focus}" / "Extreme {focus}". RELATED OPERATORS (same root name, different shapes): • semantic_sentiment_scalar (SCALAR) SENTIMENT_SCALAR(col) → numeric per-row • semantic_sentiment (AGGREGATE) SENTIMENT_AGG(col) → single overall score For LLM-style sentiment bucketing with nuanced emotional reasoning, use SENTIMENT_LLM — see sentiment_dimension_llm.cascade.yaml.

Examples

Sentiment assessed

SELECT
  sentiment ('I had a great experience')

Nearby rabbit holes

same domain
Climb back to The Looking Glass