SPL File ToolkitUtilities.spl

Content

Functions
Types
  • ACTION: When updating external dictionaries and tables using the resources port of the SentimentExtract and TextExtract operators, the action to take must be specified.
  • Language: This enum represents the languages for the available pre-built extractor libraries: WESTERN_STANDARD represents the Western libraries with the standard tokenizer, WESTERN_MULTILINGUAL, the Western extractor libraries with a multilingual tokenizer, JAPANESE, the extractor libraries for Japanese CHINESE, the extractor libraries for Chinese.
  • SentimentScore: This is the type of the output from the SentimentExtractor operator. Composed of two attributes:
  • SentimentType: Enum describing the types of sentiment that a portion of text can contain

Functions

rstring pathToSentimentDictionaries()

This function returns a value that can be passed to the modulePath parameter of the TextExtract operator, or the dictionaryPath parameter of the SentimentExtractor operator.

Returns

  • the path within the toolkit to the dictionaries required by the BigInsights Sentiment extractor

rstring BigInsightsWesternNERMultilingual()

This function returns a value that can be passed to the modulePath parameter of the TextExtract operator.

Returns

  • The path to the multilingual version of the pre-built BigInsights extractors that are included in the toolkit.

rstring BigInsightsWesternNERStandard()

This function returns a value that can be passed to the modulePath parameter of the TextExtract operator.

Returns

  • the path to the Standard pre-built BigInsights extractors that are included in the toolkit.

rstring BigInsightsChineseNER()

This function returns a value that can be passed to the modulePath parameter of the TextExtract operator.

Returns

  • the path to the pre-built BigInsights extractors in Chinese that are included in the toolkit.

rstring BigInsightsJapaneseNER()

This function returns a value that can be passed to the modulePath parameter of the TextExtract operator.

Returns

  • the path to the pre-built BigInsights extractors in Japanese that are included in the toolkit.

Types

ACTION

When updating external dictionaries and tables using the resources port of the SentimentExtract and TextExtract operators, the action to take must be specified. This type describes which action should be taken - whether the specified table or dictionary should be updated with the given words, or if its contents should be replaced with the given words.

ACTION = enum { UPDATE, REPLACE };

SentimentType

Enum describing the types of sentiment that a portion of text can contain

SentimentType = enum { POSITIVE, NEGATIVE, NEUTRAL, NONE_DETECTED };

SentimentScore

This is the type of the output from the SentimentExtractor operator. Composed of two attributes:
  • The score represents what fraction of the sentiment in the input was negative or positive. It will be a value between -1.0 and 1.0 inclusive. Values between -1.0 and 0 indicate a negative overall sentiment, and values from 0 to +1 are positive. If no negative or positive sentiment was detected in the input, the score will be 0.0.
  • The sentiment, an attribute of type SentimentType indicating the overall sentiment of the text, Positive, Negative, Neutral, or None_Detected if no sentiment was detected in the text.
  • The targetSentiment contains the sentiment for each identified target in the output, and the specific sentiment towards that target, which will be one of the following strings: "positive","negative", or "neutral".

SentimentScore = float32 score, SentimentType sentiment, map<rstring, rstring> targetSentiment;

Language

This enum represents the languages for the available pre-built extractor libraries: WESTERN_STANDARD represents the Western libraries with the standard tokenizer, WESTERN_MULTILINGUAL, the Western extractor libraries with a multilingual tokenizer, JAPANESE, the extractor libraries for Japanese CHINESE, the extractor libraries for Chinese. See the BigInsights documentation for more information on the pre-built extractor libraries.

Language = enum { WESTERN_STANDARD, WESTERN_MULTILINGUAL, JAPANESE, CHINESE };