SentimentExtractor Function | Teradata Vantage - SentimentExtractor (ML Engine) - 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ā„¢

The SentimentExtractor function extracts the sentiment (positive, negative, or neutral) of each input document or sentence, using either a classification model output by the function SentimentTrainer (ML Engine) or a dictionary model.

The dictionary model consists of WordNet, a lexical database of the English language, and these negation words:

  • no
  • not
  • neither
  • never
  • scarcely
  • hardly
  • nor
  • little
  • nothing
  • seldom
  • few
The function handles negated sentiments as follows:
  • -1 if the sentiment is negated (for example, "I am not happy")
  • -1 if the sentiment and a negation word are separated by one word (for example, "I am not very happy")
  • +1 if the sentiment and a negation word are separated by two or more words (for example, "I am not saying I am happy")

SentimentExtractor uses files that are preinstalled on ML Engine. For details, see Preinstalled Files That Functions Use.