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

Python Options

SetOptionsWithFile

Summary

Sets one or more options via a specially formatted file. This is an alternative to [the setOption functions][4] which requires you to programmatically define your option settings. You can also use [SetOptionWithString][3] to load options from an in memory string. Refer to [Options][http://dev.lexalytics.com/wiki/pmwiki.php?n=Salience6API.Options] documentation for the available options that may be set and their purpose.

This method provides a wrapper around the underlying C API method [lxaSetSalienceOptionsWithFile][6].

Syntax

salience6.setOptionsWithFile(oSession, sOptionFile, sConfigurationID)

Parameters

oSession

A SalienceSession object previously created via [openSession][6]

sOptionFile

Path to a option file to use for this configuration

acConfigurationID

An identifier for a configuration added through [addConfiguration][7], or empty string for default configuration

Returns

If successful, returns 0.

Example Option String

"Tagging Threshold" 50
"Lists and Tables" 1
"User Entity List" "C:/Salience/user.dat"

SetOptionWithString

Summary

Sets one or more options via a specially formatted string. This is an alternative to [the setOption functions][4] which requires you to programmatically define your option settings. You can also use [SetOptionsWithFile][1] to load options from an in memory string. Refer to [Options][5] documentation for the available options that may be set and their purpose.

This method provides a wrapper around the underlying C API method [lxaSetSalienceOptionWithString][6].

Syntax

salience6.setOptionWithString(oSession, sOptionString, sConfigurationID)

Parameters

oSession

A SalienceSession object previously created via [openSession][6]

sOptionString

Option configuration string

acConfigurationID

Character string specifying a unique identifier for this configuration

Returns

If successful, returns 0.

Option String Format

Each line in the string sets one option, and the format is "". The quotes around the option name are required. If the option value is a string that should be double quoted as well. The name of each option is available on the [Options][5] page.

Example Option String

"Tagging Threshold" 50
"Lists and Tables" 1
"User Entity List" "C:/Salience/user.dat"

setOption_TaggingThreshold
setOption_CalculateListsAndTables
setOption_MaxExecutionTime
setOption_FailOnLongSentences
setOption_UserDirectory
setOption_ConceptSlop
setOption_DocumentSemantics
setOption_ProcessAsOneSentence
setOption_UseSharedMemory
setOption_ProcessComplexStems
setOption_FlattenAllUpperCase
setOption_ContentHTML
setOption_AlternateForms
setOption_UseChainer
setOption_UseChunkParser

setOption_MaxConceptTopicHits
setOption_MinConceptTopicScore
setOption_ConceptTopicWindowSize
setOption_ConceptTopicWindowJump
setOption_NongrammaticalTopics
setOption_ConceptTopicList

setOption_RequiredEntities
setOption_AnaphoraResolution
setOption_EntityModelSensitivity
setOption_EntityThreshold
setOption_EntitySummaryLength
setOption_EntityOverlap
setOption_UserEntityList
setOption_OverlapSentimentThemes
setOption_EntityTopics
setOption_StemUserEntityContent
setOption_EntityUserDirectoryOnly

setOption_SetSentimentDictionary
setOption_AddSentimentDictionary
setOption_AddSentimentModel
setOption_ClearSentimentModel
setOption_UpperNeutralScore
setOption_LowerNeutralScore
setOption_UsePolarityModel
setOption_AllSentimentPhrases
setOption_EmphaticModifier
setOption_SuperlativeModifier

setOption_QueryTopicStemming
setOption_QueryTopicList
setOption_MaxQueryLength

setOption_CollectionResultSize
setOption_CollectionSemantics
setOption_MaxCollectionSize
setOption_ReturnAllThemeMentions
setOption_StemFacets

setOption_StemDocDetails

setOption_ClassificationThreshold
setOption_ClassificationModel

setOption_ThemeTopics

setOption_SummaryDelimiter
setOption_SummaryQuotesIntact
setOption_SummaryMinSentenceLength
setOption_SummaryAllowInitialConjunction
setOption_SummaryEarlySentenceCount
setOption_SummaryEarlySentenceBonus
setOption_SummaryPronounPenalty
setOption_SummaryIdealLength
setOption_SummaryLengthPenalty
setOption_SummaryDiversity

setOption_CategoryExplanation

Updated 7 months ago

Python Options


Suggested Edits are limited on API Reference Pages

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