TD_SentimentExtractor Function | SentimentExtractor - TD_SentimentExtractor - Analytics Database

Database Analytic Functions

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-04-06
dita:mapPath
gjn1627595495337.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
jmh1512506877710
Product Category
Teradata Vantageā„¢

TD_SentimentExtractor uses a dictionary model to extract the sentiment (positive, negative, or neutral) of each input document or sentence.

The dictionary model consists of WordNet, a lexical database of the English language, and these negation words such as no, not, neither, never, and so on.

The function handles negated sentiments as follows:
  • -1 if the sentiment is negated. For example, I am not happy.
  • -1 if one word separates the sentiment and a negation word. For example, I am not very happy.
  • +1 if two or more words separate the sentiment and a negation word. For example, I am not saying I am happy.
  • You can omit the dimension ON clauses of the dictionary tables from the query if you want to use the default sentiment dictionary.
  • You can use your dictionary table and provide it as a CustomDictionaryTable ON clause.
  • You can provide additional dictionary entries through the AdditionalDictionaryTable ON clause to add more entries to either the CustomDictionaryTable or default dictionary.
  • You can access the dictionary through the OutputDictionaryTable OUT clause to check the dictionary contents used during sentiment analysis.
  • Only supports the English language.
  • The maximum length supported for sentiment word in the dictionary table is 128 characters.
  • The maximum length of the sentiment_words output column is 32000 characters. If the sentiment_words output column value exceeds this limit, then a ellipsis (...) displays at the end of the string.
  • The maximum length of the content output column is 32000 characters; the supported maximum length of a sentence is 32000.
  • There can be up to 10 words in a sentiment phrase.