SentimentExtractor Example | Teradata Vantage - SentimentExtractor Example: InputModelFile ('classification:default_sentiment_classification_model.bin') - Teradata Vantage

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
9.02
9.01
2.0
1.3
Published
February 2022
Language
English (United States)
Last Update
2022-02-10
dita:mapPath
rnn1580259159235.ditamap
dita:ditavalPath
ybt1582220416951.ditaval
dita:id
B700-4003
lifecycle
previous
Product Category
Teradata Vantageā„¢

This example uses the maximum entropy classification model file default_sentiment_classification_model.bin.

SQL Call

SELECT * FROM SentimentExtractor (
  ON sentiment_extract_input
  USING
  TextColumn ('review')
  InputModelFile ('classification:default_sentiment_classification_model.bin')
  AnalysisType ('document')
  Accumulate ('id')
) AS dt ORDER BY id;

Output

 id out_polarity out_strength 
 -- ------------ ------------ 
  1 NEG                     2
  2 POS                     2
  3 NEG                     2
  4 POS                     2
  5 POS                     1
  6 NEG                     2
  7 NEG                     2
  8 NEG                     2
  9 NEG                     2
 10 NEG                     2

Download a zip file of all examples and a SQL script file that creates their input tables.