LoadDictionary

Lists words from a Pulse user-defined dictionary into memory for use by sentimentAnalysis() and other Pulse functions.

This function must be used with the OVER() clause.

For more information on Pulse user-defined dictionaries, see Dictionaries and Mappings.

Syntax

SELECT LoadDictionary(word USING PARAMETERS listName='listname'[, language='lang'] [, label='label']) OVER() FROM table;

Parameters

Argument Description

word

A column of words to assign to a user-dictionary list. The column name must match the value of word.

listName

The user-dictionary list from which to load the values from word.

Valid values:

  • pos_words
  • neg_words
  • neutral_words
  • stop_words
  • white_list

See Dictionaries and Mappings for details on each list type.

language

The language of the dictionary:

  • 'english' or 'en'
  • 'spanish' or 'es'
label The label that you want to assign to the dictionary.
table The specified table from which values are loaded.

Examples

SELECT LoadDictionary(standard USING PARAMETERS listName=
'neg_words_en') OVER() from pulse.neg_words_en;
SELECT LoadDictionary(standard USING PARAMETERS listName=
'pos_words_en') OVER() from pulse.pos_words_en;
SELECT LoadDictionary(standard USING PARAMETERS listName= 
'pos_words_en', language='english') OVER() from pulse.pos_words_en;
SELECT LoadDictionary(standard USING PARAMETERS listName= 
'pos_words_es', language='spanish') OVER() from pulse.pos_words_es;
SELECT LoadDictionary(standard USING PARAMETERS listName=
'neg_words',label='custom_negatives') OVER() from pulse.neg_words_en;

See Also