1.0 - 8.00 - SentimentExtractor Example 3: Model ('classification:default_sentiment_classification_model.bin') - Teradata Vantage

Teradata® Vantage Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
1.0
8.00
Release Date
May 2019
Content Type
Programming Reference
Publication ID
B700-4003-098K
Language
English (United States)

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')
  ModelFile ('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