LoadMapping

Loads a Pulse user-mapping 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-mappings, see Dictionaries and Mappings.

Syntax

SELECT LoadMapping(base, wordToMap USING PARAMETERS mapName='mapName' [, language='lang'][, label='label']) OVER() FROM table;

Parameters

Argument Description

base

A column of base words to assign to a mapped word. The column name must match the value of base.

wordToMap

A column of words to map to the base word in the same row. The column name must match the value of wordToMap.

mapName

The mapping to load the words into.

Valid values:

  • irregular_verbs — list of conjugations of verbs and their bases.
  • normalization — list of synonyms and their base word.
language

The language of the dictionary:

  • 'english' or 'en'
  • 'spanish' or 'es'
label The label of the mapping that you want to load. If you do not provide a label, Pulse uses the default mapping.
table The specified table from which values are loaded.

Examples

SELECT LoadMapping(standard_base, standard_synonym USING PARAMETERS 
mapName='normalization') OVER() from pulse.normalization_en;
SELECT LoadMapping(standard_base, standard_synonym USING PARAMETERS
mapName='normalization', language='english') OVER() from pulse.normalization_en;

SELECT LoadMapping(standard_base, standard_synonym USING PARAMETERS
mapName='normalization', language='spanish') OVER() from pulse.normalization_es;

See Also