Salience

The Salience Developer Hub

Welcome to the Salience developer hub. You'll find comprehensive guides and documentation to help you start working with Salience as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started

Sentiment Options

Sentiment Dictionary

Add, set, or clear hand-scored dictionaries for use in sentiment analysis. The string value provided is the path to the HSD (hand-scored dictionary) file to use. The integer value must be 0 or 1. Providing a value of 0 adds entries in the HSD to any existing HSD files in use. Providing a value of 1 clears any other HSD files, leaving only the provided HSD file in effect.

Min/Max range

N/A

Default value

None

C API

SalienceOption oOption;
oOption.nOption = SALIENCEOPTION_SENTIMENTDICTIONARY;
oOption.acValue = _strdup();
oOption.nValue = ;
lxaSetSalienceOption(pSession,&oOption);

.NET

SalienceEngine.AddSentimentDictionary(string value,boolean value)

Java

Salience.Options.Sentiment.AddSentimentDictionary(string value)

Python

salience.setOption_AddSentimentDictionary(session,string value, configuration ID)

Sentiment Model File

Add, set, or clear model for use in model-based sentiment analysis.

Min/Max range

N/A

Default value

none

C API

SalienceOption oOption;
oOption.nOption = SALIENCEOPTION_SENTIMENTMODEL;
oOption.acValue = _strdup();
lxaSetSalienceOption(pSession,&oOption);

.NET

Java

Salience.Options.Sentiment.AddSentimentModel(string value)

Python

salience.setOption_AddSentimentModel(session,string value, configuration ID)

Sentiment Upper Neutral Bound

Set upper bound of range for sentiment value to be considered neutral.

Min/Max range

MIN FLOAT - MAX FLOAT

Default value

0.5

C API

SalienceOption oOption;
oOption.nOption = SALIENCEOPTION_SENTIMENTUPPERNEUTRAL;
oOption.fValue = ;
lxaSetSalienceOption(pSession,&oOption);

.NET

SalienceFiveCollection.NeutralSentimentUpperBound = float value
Note: this option is only available at the collection level.

Java

Salience.Options.Sentiment.SetSentimentThresholds(float value, float value)
Note: Java wrapper sets the upper bound and lower bound in the same method call.

Python

salience.setOption_UpperNeutralScore(session,float value, configuration ID)

Sentiment Lower Neutral Bound

Set lower bound of range for sentiment value to be considered neutral.

Min/Max range

MIN FLOAT - MAX FLOAT

Default value

-0.45

C API

SalienceOption oOption;
oOption.nOption = SALIENCEOPTION_SENTIMENTLOWERNEUTRAL;
oOption.fValue = ;
lxaSetSalienceOption(pSession,&oOption);

.NET

SalienceFiveCollection.NeutralSentimentLowerBound = float value

Java

Salience.Options.Sentiment.SetSentimentThresholds(float value, float value)

Python

salience.setOption_LowerNeutralScore(session,float value, configuration ID)

Sentiment Polarity Model

Includes a measure of whether a sentence 'looks' like the sort of sentence that usually communicates sentiment in analysis. Defaults to false (0).

Min/Max range

0 or 1

Default value

0

C API

SalienceOption oOption;
oOption.nOption = SALIENCEOPTION_SENTIMENTUSEPOLARITYMODEL;
oOption.nValue = ;
lxaSetSalienceOption(pSession,&oOption);

.NET

SalienceEngine.UsePolarityModel = boolean value

Java

Salience.Options.Sentiment.setUsePolarityModel(boolean value)

Python

salience.setOption_UsePolarityModel(session,integer value, configuration ID)

Sentiment All Phrases

Enables the user to get all possible sentiment phrases back from GetSentiment, even ones that aren't in the dictionary. Defaults to false (0).

Min/Max range

0 or 1

Default value

0

C API

SalienceOption oOption;
oOption.nOption = SALIENCEOPTION_SENTIMENTALLPHRASES;
oOption.nValue = ;
lxaSetSalienceOption(pSession,&oOption);

.NET

SalienceEngine.SetAllSentimentPhrases = boolean value

Java

Salience.Options.Sentiment.setAllSentimentPhrases(boolean value)

Python

salience.setOption_AllSentimentPhrases(session,integer value, configuration ID)

Sentiment Emphatic Modifier

Enables the user to adjust the multiplier for emphatic modifiers (such as exclamation marks). Defaults to 2.

Min/Max range

0 or MAX_FLOAT

Default value

2

C API

SalienceOption oOption;
oOption.nOption = SALIENCEOPTION_SENTIMENTEMPHATICMULTIPLIER;
oOption.fValue = ;
lxaSetSalienceOption(pSession,&oOption);

.NET

SalienceEngine.EmphaticModifier = float value

Java

Salience.Options.Sentiment.setEmphaticMultiplier(float value)

Python

salience.setOption_EmphaticModifier(session,float value, configuration ID)

Sentiment Superlative Modifier

Enables the user to adjust the multiplier for superlative phrases. Defaults to 1.25.

Min/Max range

0 or MAX_FLOAT

Default value

1.25

C API

SalienceOption oOption;
oOption.nOption = SALIENCEOPTION_SENTIMENTSUPERLATIVEMULTIPLIER;
oOption.fValue = ;
lxaSetSalienceOption(pSession,&oOption);

.NET

SalienceEngine.SuperlativeModifier = float value

Java

Salience.Options.Sentiment.setSuperlativeMultiplier(float value)

Python

salience.setOption_SuperlativeModifier(session,float value, configuration ID)

Chain Entity Sentiment Algorithm

Allows the user to return to the previous entity sentiment algorithm, from the new chunk parse based one. In general the new algorithm is more accurate but has more neutral results.

Min/Max range

0 or 1

Default value

0

C API

SalienceOption oOption;
oOption.nOption = SALIENCEOPTION_CHAINENTITYSENTIMENT;
oOption.nValue = ;
lxaSetSalienceOption(pSession,&oOption);

.NET

SalienceEngine.ChainEntitySentiment= boolean value

Java

Salience.Options.Sentiment.setChainedEntitySentiment(boolean value)

Python

salience.setOption_ChainedEntitySentiment(session,integer value, configuration ID)

Simple Sentiment Calculations

Disables the advanced features in sentiment calculations, giving inferior but easier to understand results. Defaults to false (0).

Min/Max range

0 or 1

Default value

0

C API

SalienceOption oOption;
oOption.nOption = SALIENCEOPTION_SIMPLESENTIMENTCALCULATIONS;
oOption.nValue = ;
lxaSetSalienceOption(pSession,&oOption);

.NET

SalienceEngine.SimpleSentimentCalculations= boolean value

Java

Salience.Options.Sentiment.setSimpleSentimentCalculations(boolean value)

Python

salience.setOption_SimpleSentimentCalculations(session,integer value, configuration ID)

POStag restricted HSD Matches

By default we exclude certain sentiment phrases because of their part of speech. For example, while rob as a verb is negative, Rob as a proper noun is not. While this is generally helpful, it can sometimes lead to confusion and missed phrases. Disable this option if you want Salience to always accept any phrase you provide via an HSD file. Defaults to true (1).

Min/Max range

0 or 1

Default value

1

C API

SalienceOption oOption;
oOption.nOption = SALIENCEOPTION_POSTAGRESTRICTEDHSDMATCHES;
oOption.nValue = ;
lxaSetSalienceOption(pSession,&oOption);

.NET

SalienceEngine.POSTagRestrictedHSDMatches= boolean value

Java

Salience.Options.Sentiment.setPOSTagRestrictedHSDMatches(boolean value)

Python

salience.setOption_POSTagRestrictedHSDMatches(session,integer value, configuration ID)

User Sentiment Phrases Only

Salience has a great deal of sentiment phrases baked into the engine. If you want us to calculate sentiment only with phrases you have provided, set this option to true. Defaults to false (0).

Min/Max range

0 or 1

Default value

0

C API

SalienceOption oOption;
oOption.nOption = SALIENCEOPTION_USERSENTIMENTPHRASESONLY;
oOption.nValue = ;
lxaSetSalienceOption(pSession,&oOption);

.NET

SalienceEngine.UserSentimentPhrasesOnly= boolean value

Java

Salience.Options.Sentiment.setUserSentimentPhrasesOnly(boolean value)

Python

salience.setOption_UserSentimentPhrasesOnly(session,integer value, configuration ID)

Updated 7 months ago

Sentiment Options


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.