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

Data Structures

SalienceAttribute

A wrapper around the underlying SalienceAttribute structure in the C API.

sAttribute

The text of the attribute

nCount

The count of occurrences of the attribute

nPositiveCount

The count of positive occurrences of the attribute, based on value of the Neutral Upper Bound option

nNegativeCount

The count of negative occurrences of the attribute, based on value of the Neutral Lower Bound option

nNeutralCount

The count of neutral occurrences of the attribute, based on value of the Neutral Upper Bound and Neutral Lower Bound options

Mentions

A List<> of SaliencePhrase structures with details about the occurrences

PositiveMentions

A List<> of SaliencePhrase structures with details about the positive occurrences of the attribute, based on value of the Neutral Upper Bound option

NegativeMentions

A List<> of SaliencePhrase structures with details about the negative occurrences of the attribute, based on value of the Neutral Lower Bound option

NeutralMentions

A List<> of SaliencePhrase structures with details about the neutral occurrences of the attribute, based on value of the Neutral Upper Bound and Neutral Lower Bound options

See also: SalienceCollection.GetFacets

SalienceChunk

A wrapper around the underlying SalienceChunk structure in the C API.

sLabel

A label describing the grammatical type of the chunk

nSentence

A zero-based index indicating the sentence in which the chunk appears

Tokens

A List<> of SalienceWord structures that comprise the chunk

SalienceCollectionDetails

A wrapper around the underlying SalienceCollectionDetails structure in the C API.

nSize

The number of documents added to the collection

See also: SalienceCollection.GetCollectionDetails

SalienceCollectionDocument

sIdentifier

An identifier for the document

sText

The text of the document

SalienceCollectionEntity

A wrapper around the underlying SalienceCollectionEntity structure in the C API.

sNormalizedForm

Normalized form of the entity

sType

Type of entity (Company, Person, Place, Product, etc.)

sLabel

Descriptive label for the entity

nCount

Count of documents in which this entity occurs

nPositiveCount

Count of documents in which this entity occurs with positive sentiment, based on value of the Neutral Upper Bound option

nNegativeCount

Count of documents in which this entity occurs with negative sentiment, based on value of the Neutral Lower Bound option

nNeutralCount

Count of documents in which this entity occurs with neutral sentiment, based on value of the Neutral Lower Bound and Neutral Upper Bound options

oMentions

A List<> of SaliencePhrase structures of all mentions of this entity in the document

See also: SalienceCollection.GetEntities

SalienceDocument

A wrapper around the underlying SalienceDocument structure in the C API.

pSentences

A List<> of SalienceSentence structures that make up the document

SalienceDocumentDetails

A wrapper around the underlying SalienceDocumentDetails structure in the C API.

Sections

A List<> of SalienceSection structures containing details about the document content

See also: Salience.GetDocumentDetails

SalienceEntity

A wrapper around the underlying SalienceEntity structure in the C API.

sNormalizedForm

Normalized form of the entity

sType

Type of entity (Company, Person, Place, Product, etc.)

sLabel

Descriptive label for the entity

fSentimentScore

Sentiment related to the entity

nEvidence

A measure of how much evidence the sentiment score was based on (1 to 7)

nConfident

Whether the entity passed any confidence queries

nAbout

Whether the document is about this entity

sSummary

A summary of the document related to this entity

nCount

The number of entity mentions for this entity

nFirstPos

The byte offset within the content indicating the location of the first mention of the entity

Mentions

A List<> of SalienceMention structures of all mentions of this entity in the document

Themes

A List<> of SalienceTheme structures of themes related to this entity

SentimentPhrases

A List<> of SalienceSentimentPhrase structures of sentiment phrases related to this entity

RelatedEntities

A Dictionary<String,List<> > of SalienceEntity structures providing labeled references to entities related to this entity (currently used by meta-entities, likely to be expanded).

Topics

A List<> of SalienceTopic structures providing information about topics related to the entity

See also: Salience.GetNamedEntities, Salience.GetUserDefinedEntities

SalienceEntityParams

nRequiredThreshold

Threshold for entity extraction, sets the Entity Threshold option. Default value is 55.

nSummaryLength

Length in sentences for entity summary, sets the Entity Summary Length option. Default value is 2.

nTimeout

A timeout for entity extraction. Default value is 5.

SalienceFacet

A wrapper around the underlying SalienceFacet structure in the C API.

sFacet

The text of the facet

nCount

The count of occurrences of the facet

nPositiveCount

The count of positive occurrences of the facet, based on value of the Neutral Upper Bound option

nNegativeCount

The count of negative occurrences of the facet, based on value of the Neutral Lower Bound option

nNeutralCount

The count of neutral occurrences of the facet, based on value of the Neutral Lower Bound and Neutral Upper Bound options

Attributes

A List<> of SalienceAttribute structures for the facet

nSubjectLength

Number of SalienceAttribute structures for the facet

Mentions

A List<> of SaliencePhrase structures with details about the occurrences

PositiveMentions

A List<> of SaliencePhrase structures with details about the positive occurrences of the facet, based on the value of the Neutral Upper Bound option

NegativeMentions

A List<> of SaliencePhrase structures with details about the negative occurrences of the facet, based on the value of the Neutral Lower Bound option

NeutralMentions

A List<> of SaliencePhrase structures with details about the neutral occurrences of the facet, based on the value of the Neutral Upper Bound and Neutral Lower Bound options

See also: SalienceCollection.GetFacets

SalienceIntention

A wrapper around the underlying SalienceIntention structure in the C API.

sWhat

The object of the intention, if detected. Otherwise, this structure member will be empty.

sWho

The expresser of the intention, if detected. Otherwise, this structure member will be empty.

sEvidence

The phrase expressing the intention.

sType

The intention type, out of the set of defined intention types, that was detected.

oWhat

A SalienceChunk containing positional information about the chunk identifying the object of the intention.

oWho

A SalienceChunk containing positional information about the chunk identifying the expresser of the intention. This will be an empty structure containing zeroes if acWho has not been detected.

oEvidence

A SalienceChunk containing positional information about the chunk containing the intention

See also: Salience.GetDocumentIntentions

SalienceMention

A wrapper around the underlying SalienceMention structure in the C API.

Phrase

A SaliencePhrase structure containing location of the mention in text

nType

The type of mention (Named, Nominal, Pronominal)

fScore

How likely it is that this is actually a mention of the entity

SalienceModelSentiment

A wrapper around the underlying SalienceSentimentModel structure in the C API.

sName

Name of the sentiment model used for scoring

nBest

Indicator of the sentiment category determined as best match (0=Positive, 1=Negative, 2=Mixed, 3=Neutral)

fPositive

Model-based score associated with likelihood document is positive

fNegative

Model-based score associated with likelihood document is negative

fMixed

Model-based score associated with likelihood document is mixed

fNeutral

Model-based score associated with likelihood document is neutral

Note: Sum of model scores should equal 1, nBest should match category of greatest model score.

SalienceOpinion

A wrapper around the underlying SalienceOpinion structure in the C API.

Speaker

A SalienceEntity structure for the entity expressing the opinion

EntityTopic

A SalienceEntity structure for the entity that is the subject of the opinion, if applicable

ThemeTopic

A SalienceTheme structure for the theme that is the subject of the opinion, if applicable

sQuotation

The text of the expressed opinion

fSentiment

The sentiment associated with the opinion

bThemeOpinion

An indicator of whether the opinion is being expressed about an entity or a theme

See also: Salience.GetNamedEntityOpinions, Salience.GetUserEntityOpinions

SaliencePhrase

A wrapper around the underlying SaliencePhrase structure in the C API.

sText

The text of the phrase

nDocument

The zero-based index of the document in the collection

nSentence

The zero-based index of the sentence

nWord

The zero-based index of the first token in the phrase

nLength

The length (in tokens) of the phrase

nByte

The byte offset in the original text that the phrase starts at

nByteLength

The length of the phrase in bytes

nIsNegated

An indicator of whether the phrase is negated (1) or not (0)

sNegator

If the phrase is negated, the negator is provided in this field

nType

An indicator of whether the phrase is negated (1), modified (2), both (3), or neither (0). This is only relevant to phrases related to SalienceSentimentPhrases.

nSection

The zero-based index of the document details section that this phrase occurs in

nRow

The zero-based index of the row if the phrase occurs in a list or table

nColumn

The zero-based index of the column if the phrase occurs in a list or table

SalienceRelationship

A wrapper around the underlying SalienceRelation structure in the C API.

fScore

Measure of confidence in the relationship

sLabel

Type of relationship, as defined in the relationship pattern

sExtra

Additional information associated with the relationship

Entities

A List<> of the SalienceEntity structures for the entities involved in the relationship

See also: Salience.GetNamedEntityRelationships, Salience.GetUserEntityRelationships

SalienceRow

A wrapper around the underlying SalienceRow structure in the C API.

Columns

A List<> of SalienceDocument structures representing the contents of the columns within the row of a table

SalienceSection

A wrapper around the underlying SalienceSection structure in the C API.

sText

The internal version of the document

sFingerprint

A calculated fingerprint of the document (DEPRECATED)

sHeader

The header for this section of the document, if applicable. Otherwise, blank.

nWordCount

The number of SalienceWords in the document

nSentenceCount

The number of SalienceSentences in the document

nObjectiveCount

The number of objective SalienceSentences in the document

nSubjectiveCount

The number of subjective SalienceSentences in the document

nParsedCount

The number of sentences that grammatically parse

TermFrequency

A List<> of SalienceToken structures providing term frequency analysis

TaggedTermFrequency

A List<> of SalienceToken structures providing tagged term frequency analysis

BiGramFrequency

A List<> of SalienceToken structures providing bi-gram frequency analysis

TaggedBiGramFrequency

A List<> of SalienceToken structures providing tagged bigram frequency analysis

TriGramFrequency

A List<> of SalienceToken structures providing tri-gram frequency analysis

TaggedTriGramFrequency

A List<> of SalienceToken structures providing tagged trigram frequency analysis

QuadGramFrequency

A List<> of SalienceToken structures providing quad-gram frequency analysis, for ideogram languages only

oNegators

A List<> of SalienceToken structures providing information about negators in the content

oIntensifiers

A List<> of SalienceToken structures providing information about intensifiers in the content

Sentences

A List<> of SalienceSentence structures for the sentences in the content

Chunks

A List<> of SalienceChunk structures providing chunk breakdown of the document

Rows

A List<> of SalienceRow structures for table and list-based content

SalienceSentence

A wrapper around the underlying SalienceSentence structure in the C API.

Tokens

A List<> of SalienceWord structures that make up the sentence

Chunks

A List<> of SalienceChunk structures that make up the sentence

nLength

The number of SalienceWords in the sentence

nChunkCount

The number of SalienceChunks in the sentence

nSubjective

An indicator specifying if the sentence is subjective (1) or objective (0)

nPolar

An indicator specifying if the sentence conveys sentiment polarity (1) or not (0)

nImperative

An indicator specifying if the sentence conveys an imperative (or "call to action") (1) or not (0)

sText

The text of the sentence

nSummaryRank

The rank of the sentence with relation to the summary. A call to retrieve the document summary must be made for this field to be initialized.

fSentiment

Reserved for future use to provide sentence-level sentiment. Currently returns 0.

TEXTgoesHERE

TEXTgoesHERE

SalienceSentiment

A wrapper around the underlying SalienceSentimentResult structure in the C API.

fScore

Phrase-based sentiment score

Phrases

A List<> of SalienceSentimentPhrase structures containing details of phrase-based sentiment analysis

ModelSentiment

A List<> of SalienceModelSentiment structures containing details of model-based sentiment analysis

Emotions

A List<> of SalienceTopics structures containing details of emotions detected in the content

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

See also: Salience.GetDocumentSentiment

SalienceSentimentPhrase

A wrapper around the underlying SalienceSentimentPhrase structure in the C API.

Phrase

A SaliencePhrase structure with details about the phrase

sSource

The path of the HSD file containing the phrase, if HSD-based

fScore

The sentiment weight for the phrase

nType

An indicator specifying if the phrase is HSD-based or not

nModified

An indicator of whether the phrase is negated (1), modified (2), both (3), or neither (0)

SupportingPhrases

A List<> of SaliencePhrase structures with details about any relevant supporting phrase, such as a negating or intensifying phrase

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

A SentimentPhrase has the following helpful functions for understanding the score:

getType() Returns an int, denoting how this phrase was identified:

0 : This was in the “lsf file”, which is a whole bunch of sentiment phrases already identified by Salience
1 : This was in an “hsd file”, either customer provided or general.hsd from Salience
Mostly that’s all you need, but the rest of the set is:
2 : This was defined in a special file “documentconcepts.dat”
3 : This was defined in a special file “metaphors.dat” for phrases longer than 5 words
4 : You turned “all possible sentiment phrases on” and while this isn’t a sentiment phrase, maybe it could be.
5 : You defined a query in your hsd file (“hot NOT WITH sun OR fire OR fever”)
6 : This phrase was found but isn’t being used because it’s in a question
7 : This phrase was found via a specially trained model.

getSource() For dictionary based results, returns the file name where this was found.

getModified() : Returns a bitmask for modifications to this sentiment phrase.

1 : The phrase was negated
2 : The phrase was intensified e.g. "very"
Those are the main ones, but also:
4 : The phrase was typographically intensified: currently just letter repetition e.g. "I looovvvveee this"
8 : The phrase was modified by its use in discourse e.g. “desert was good, but everything else was bad” the use of ‘but’ generally conveys greater emphasis for the latter idea over the former.
16 : The sentence ended in an exclamation mark

getSupportingPhrases() : this returns the Phrase objects which were the negators or intensifiers discovered.

SalienceStartup

A wrapper around the underlying SalienceSessionStartup structure in the C API.

sLogPath

Fully-qualified path to location where startup log can be written

sDataDirectory

Path to data directory for use

sUserDirectory

Path to user directory for use

nMode

A SALIENCE_MODE enum value indicating the mode for the Salience session

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

The nMode member may be set to the following values: SALIENCEMODE_DEFAULT: Default mode for handling general content. SALIENCEMODE_SHORTFORM: Mode for handling short-form content such as Twitter.

SalienceSummary

A wrapper around the underlying SalienceSummaryResult structure in the C API.

sSummary

Summary text generated for the document via default method

vSentences

A List<> of SalienceSentence objects providing the individual sentences in the summary with ranking

sAlternateSummary

Summary text generated for the document via an alternate method

vAlternateSentences

A List<> of SalienceSentence objects providing the individual sentences in the alternate summary with ranking

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

TEXTgoesHERE

SalienceTheme

A wrapper around the underlying SalienceTheme structure in the C API.

sTheme

The text of the theme

sStemmedTheme

The stemmed version of the theme

sNormalizedTheme

The normalized version of the theme

nThemeType

An indicator is this is a "meta-theme" (1) or not (0)

fScore

Documents: A measure of the strength of the theme within the document. Collections: A count of the themes that have been rolled together across collection documents into this theme result

fSentiment

Documents: The sentiment score for the theme. Collections: A sentiment score derived from aggregating the sentences containing the theme mentions into a single document

nEvidence

Documents: A measure (from 1 to 7) of the content on which the sentiment score for the theme is based. Collections: The number of sentiment phrases used in calculating the theme's sentiment as described above

bAbout

Documents: An indicator specifying if the theme is contained within the summary of the document. Collections: False (not used)

sSummary

A summary of the document content relevant to the theme

ThemeMentions

A List<> of SaliencePhrase structures providing information about theme occurrences in the document

Topics

A List<> of SalienceTopic structures providing information about topics related to the theme

AlternateThemes

Reserved for future use.

ChildMentions

A List<> of SaliencePhrase structures containing information about child mentions of the theme.

RelatedMentions

A List<> of SaliencePhrase structures containing information about related mentions of the theme.

See also: Salience.GetDocumentThemes, SalienceCollection.GetThemes

SalienceToken

A wrapper around the underlying SalienceToken structure in the C API.

sToken

A single token (generally a word, but also includes punctuation and other individual textual items)

nCount

Number of occurrences of the token

SalienceTopic

A wrapper around the underlying SalienceTopic structure in the C API. This structure is used to return results for multiple API calls:

Query-defined topics

sTopic

The query-defined topic label

nHits

Documents: This is the number of query terms that hit for the document. Collections: This is the number of documents within the collection that contain hits for the topic.

fScore

Documents: This is the sentiment score for content associated with topic query hits. Collections: This value is always 0 (not used).

vDocuments

Documents: A List<> of sentences containing the topic hits. Collections: A List<> of the document identifiers for the documents identified for the topic.

nType

0 (indicates query topic result)

sSummary

Documents: A summary of the document focused on the query result. Collections: Not used.

vChildren

Not used

vEntities

A List<> of entities that match the {entity ...} syntax if used in the query definition

SentimentPhrases

A List<> of SalienceSentimentPhrase structures of sentiment phrases related to this entity

Concept-defined topics

sTopic

The concept-defined topic label

nHits

Documents: This value is always 0 (not used). Collections: This is the number of documents within the collection that conceptually match for the topic.

fScore

Documents: This provides an indication of the strength of the match. Collections: This value is the sum of match strengths for the topic across all documents in the collection that match for the topic.

vDocuments

Documents: A List<> of sentences containing the topic hits. Collections: A List<> of the document identifiers for the documents identified for the topic.

nType

1 (indicates concept topic result)

sSummary

Documents: A summary of the document focused on the query result. Collections: Not used.

vChildren

Not used

vEntities

Not used

SentimentPhrases

A List<> of SalienceSentimentPhrase structures of sentiment phrases related to this entity

Document categories

Document categories are returned using the Wikipedia category information contained within the Concept Matrix. Document categories are only available at the document level.

sTopic

The concept-defined topic label

nHits

0 (not used)

fScore

This provides an indication of the strength of the match

nType

An integer indicating the type of category result: 2=category node, 3=category leaf, 4=category explain info

vChildren

A List<> of SalienceTopic objects representing child topics

SentimentPhrases

A List<> of SalienceSentimentPhrase structures of sentiment phrases related to this entity

Document classification

Document classification results are returned when using classification models in Salience 6. Document classification results are only available at the document level.

sTopic

The classification label

fScore

This provides an indication of the strength of the match for the classification

SalienceWord

A wrapper around the underlying SalienceWord structure in the C API.

sToken

The token associated with the word

sPOSTag

The part-of-speech tag associated with the token, see Supported POS tags

sStem

The stemmed version of the word

bInvert

An indicator specifying if sentiment for the word has been inverted

fSentiment

Sentiment for word, filled in when returned for sentiment and entity markup

nSentimentType

Indicator of source of sentiment; from hand-scored dictionary, or stopword

sEntityType

Entity type for word if it is part of an entity, returned for entity markup

nID

Identifiers of which markup applies to the word

nSecondaryID

Secondary identifier of which markup applies to the word

bPostFixed

An indicator specifying if the word is post-fixed (followed by a space)

Updated 2 months ago

Data Structures


Suggested Edits are limited on API Reference Pages

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