surfaceanalysissentiment_scalar
Analysisscalar · returns double

SENTIMENT_SCALAR

Per-row sentiment score (-1.0 to 1.0) for a text value

Per-row — runs once for each row.

analysishybridspecialist-zooscales-largetext

Syntax

semantic_sentiment_scalar({{ text }})
SENTIMENT_SCALAR({{ text }})

Arguments

nametypedescription
textVARCHAR

About

Scalar sentiment analysis — returns a numeric sentiment score from -1.0 to 1.0 for a single text, per-row. Backend: specialist zoo (twitter-roberta-base-sentiment-latest via TEI). Each row is a single sub-millisecond GPU call, batched transparently by TEI under load. Call as: SELECT SENTIMENT_SCALAR(review) FROM reviews -- recommended (unambiguous) SELECT SENTIMENT(review) FROM reviews -- shorter alias; may collide with the DIMENSION operator of the same name — prefer the _SCALAR form to be explicit. RELATED OPERATORS (same root name, different shapes): • sentiment (DIMENSION) use in GROUP BY to auto-cluster rows into labeled sentiment buckets e.g. GROUP BY sentiment(review) • semantic_sentiment (AGGREGATE) use SENTIMENT_AGG(col) to collapse a collection of texts into a single overall score (-1.0 to 1.0)

Examples

Positive sentiment returns positive score

SELECT
  semantic_sentiment_scalar ('I absolutely love this!')

Negative sentiment returns negative score

SELECT
  semantic_sentiment_scalar ('This is terrible and I hate it')

Nearby rabbit holes

same domain
Climb back to The Looking Glass