Salience Five - Sentiment options

<<Entity options | Back to Options index | Query Topic 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(<string value>);
oOption.nValue = <integer value>;
lxaSetSalienceOption(pSession,&oOption);
.NET SalienceEngine.AddSentimentDictionary(string value,boolean value)
Java insert Java example
PHP insert PHP example
Python insert python example

Back to top

Sentiment Model

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(<path-to-model-file>);
lxaSetSalienceOption(pSession,&oOption);
.NET insert .Net example
Java insert Java example
PHP insert PHP example
Python saliencefive.setOption_AddSentimentModel(session,string value)

Back to top

Neutral Upper 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 = <float value>;
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.

PHP salience_set_option($session, SALIENCEOPTION_SENTIMENTUPPERNEUTRAL , float value)
Python saliencefive.setOption_UpperNeutralScore(session,float value)

Back to top

Neutral Lower 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 = <float value>;
lxaSetSalienceOption(pSession,&oOption);
.NET SalienceFiveCollection.NeutralSentimentLowerBound(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.

PHP salience_set_option($session, SALIENCEOPTION_SENTIMENTLOWERNEUTRAL , float value)
Python saliencefive.setOption_LowerNeutralScore(session,float value)

Back to top

Added in Salience 5.1

Use 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 = <integer value>;
lxaSetSalienceOption(pSession,&oOption);
.NET SalienceEngine.UsePolarityModel = boolean value
Java Salience.Options.Sentiment.setUsePolarityModel(boolean value)
PHP salience_set_option($session, SALIENCEOPTION_SENTIMENTUSEPOLARITYMODEL , integer value)
Python saliencefive.setOption_UsePolarityModel(session,integer value)

Back to top

Added in Salience 5.1.1

Return All Possible 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 = <integer value>;
lxaSetSalienceOption(pSession,&oOption);
.NET SalienceEngine.SetAllSentimentPhrases = boolean value
Java Salience.Options.Sentiment.setAllSentimentPhrases(boolean value)
PHP salience_set_option($session, SALIENCEOPTION_SENTIMENTALLPHRASES , integer value)
Python saliencefive.setOption_AllSentimentPhrases(session,integer value)

Emphatic multiplier

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 = <float value>;
lxaSetSalienceOption(pSession,&oOption);
.NET SalienceEngine.EmphaticModifier = float value
Java Salience.Options.Sentiment.setEmphaticMultiplier(float value)
PHP salience_set_option($session, SALIENCEOPTION_SENTIMENTEMPHATICMULTIPLIER , float value)
Python saliencefive.setOption_EmphaticModifier(session,float value)

Superlative multiplier

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 = <float value>;
lxaSetSalienceOption(pSession,&oOption);
.NET SalienceEngine.SuperlativeModifier = float value
Java Salience.Options.Sentiment.setSuperlativeMultiplier(float value)
PHP salience_set_option($session, SALIENCEOPTION_SENTIMENTSUPERLATIVEMULTIPLIER , float value)
Python saliencefive.setOption_SuperlativeModifier(session,float value)

Back to top