Teradata Scoring SDK Sentiment Extractor Additional Notes - 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ā„¢

Specify the supporting files (dictionary model or file, classification model) with the ModelTable syntax element in AMLGenerator.

The following examples show variations in usage of the dictionary and classification model.

Example 1: Use Default Model

The InputLanguage syntax element determines the default model.

InstalledFile ('default_sentiment_lexicon.txt')
InstalledFileTag ('DICT')

For Chinese language text, the default model is default_sentiment_lexicon_zh_cn.txt (for Simplified Chinese) and default_sentiment_lexicon_zh_tw.txt (for traditional Chinese).

Example 2: Use Dictionary Table as Model

ModelTable ('dict_table')
ModelTableTag ('DICT')

Example 3: Use Both Dictionary Table and Dictionary File

The dictionary file is different from the default. The sentiment words from the dictionary table have a higher priority than those in the dictionary file.

ModelTable ('dict_table')
ModelTableTag ('DICT')
InstalledFile ('sentiment_lexicon.txt')
InstalledFileTag ('DICT')
RequestArgName1 ('Model')
RequestArgVal1 ('dictionary:sentiment_lexicon.txt')

Example 4: Use Classification File

InstalledFile ('sentiment_classification_model.bin')
InstalledFileTag ('CLASS')
RequestArgName1 ('Model')
RequestArgVal1 ('classification:sentiment_classification_model.bin')