SentimentExtractor Example 4: Model ('classification:sentimentmodel1.bin') - Teradata Vantage

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
8.00
1.0
Published
May 2019
Language
English (United States)
Last Update
2019-11-22
dita:mapPath
blj1506016597986.ditamap
dita:ditavalPath
blj1506016597986.ditaval
dita:id
B700-4003
lifecycle
previous
Product Category
Teradata Vantage™

This example uses the model file sentimentmodel1.bin, output by the SentimentTrainer Example.

SQL Call

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

Output

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