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

Teradata Vantage™ - Machine Learning Engine Analytic Function Reference

Teradata Vantage
Release Number
October 2019
Content Type
Programming Reference
Publication ID
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')