1.1 - 8.10 - Teradata Scoring SDK Sentiment Extractor Additional Notes - Teradata Vantage

Teradata Vantage™ - Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
1.1
8.10
Release Date
October 2019
Content Type
Programming Reference
Publication ID
B700-4003-079K
Language
English (United States)

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