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

Item Structures

LexalyticsLicense

This structure has no accessible members

See also: lxaLoadLicense

ModelSmokeTestEntry

acModelPath

The filesystem path to the model that was tested

acMessage

Brief error message

acExplanation

Detailed error message

acDocumentId

Internal ID of the document that produced the error

acExpectedLabel

True classification for document or textual item, e.g. entity

acActualLabel

Classification actually reported by the model for document or textual item

acExpectedSpanOffset

True offset into document for a textual item (in characters)

acActualSpanOffset

The offset actually reported for a textual item (in characters)

acExpectedSpanLength

True length of a textual item (in characters)

acActualSpanLength

The length actually reported of a textual item (in characters)

See also: lxaRunModelSmokeTest

SalienceAttribute

acAttribute

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.

oMentions

A SaliencePhraseList structure with details about the occurrences

oPositiveMentions

A SaliencePhraseList structure with details about the positive occurrences of the attribute, based on value of the Neutral Upper Bound option.

oNegativeMentions

A SaliencePhraseList structure with details about the negative occurrences of the attribute, based on value of the Neutral Lower Bound option.

oNeutralMentions

A SaliencePhraseList structure with details about the neutral occurrences of the attribute, based on value of the Neutral Upper Bound and Neutral Lower Bound options.

See also: lxaGetCollectionFacets

SalienceChunk

pTokens

A pointer to a list of SalienceWord structures that comprise the chunk

nLength

The number of SalienceWords in the chunk

acLabel

A label describing the grammatical type of the chunk

nSentence

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

SalienceCollection

acCollectionName

Name of the collection

nSize

Size of the collection

pDocuments

A pointer to a list of SalienceCollectionDocument structures that comprise the collection

See also: [lxaPrepareCollection]

SalienceCollectionDetails

nSize

The number of documents added to the collection

See also: lxaGetCollectionDetails

SalienceCollectionEntity

acNormalizedForm

Normalized form of the entity

acType

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

acLabel

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 SaliencePhraseList of all mentions of this entity in the document

See also: lxaGetCollectionEntities

SalienceDocument

nSentenceCount

The number of SalienceSentences in the document

pSentences

A pointer to a list of SalienceSentence structures that make up the document

See also: lxaGetNamedEntityMarkup, lxaGetUserEntityMarkup, lxaGetPOSMarkup, lxaGetSentimentMarkup

SalienceDocumentDetails

nSectionCount

The number of SalienceSections that comprise the document

oSections

A pointer to a list of SalienceSections containing information about the sections within the document

See also: lxaGetDocumentDetails

SalienceRelatedEntity

acRelation

Name of the relation between the parent entity and the related entity.

pEntity

Related Entity

SalienceEntity

acNormalizedForm

Normalized form of the entity

acType

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

acLabel

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

acSummary

A summary of the document related to this entity

oMentions

A SalienceMentionList of all mentions of this entity in the document

oThemes

A SalienceThemeList of themes related to this entity

oSentimentPhrases

A SalienceSentimentPhraseList of sentiment phrases related to this entity

oTopics

A SalienceTopicList structure with details about topics that co-occur with entities

oRelatedEntities

A SalienceRelatedEntityList structure with details about entities related to this entity, currently just used by metaentities.

See also: lxaGetNamedEntities, lxaGetUserDefinedEntities

SalienceFacet

acFacet

The text of the facet

acSubFacetList

The list of sub-facets. Note: At present the acSubFacetList is empty and reserved for future possible use.

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

pAttributes

Pointer to a list of SalienceAttribute structures for the facet

nSubjectLength

Number of SalienceAttribute structures for the facet

oMentions

A SaliencePhraseList structure with details about the occurrences

oPositiveMentions

A SaliencePhraseList structure with details about the positive occurrences of the facet, based on value of the Neutral Upper Bound option.

oNegativeMentions

A SaliencePhraseList structure with details about the negative occurrences of the facet, based on value of the Neutral Lower Bound option.

oNeutralMentions

A SaliencePhraseList structure with details about the neutral occurrences of the facet, based on value of the Neutral Upper Bound and Neutral Lower Bound options.

See also: lxaGetCollectionFacets

SalienceIntention

acEvidence

The phrase expressing the intention.

acType

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

acWhat

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

acWho

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

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

SalienceMention

oPhrase

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

SalienceOpinion

oSpeaker

A SalienceEntity structure for the entity expressing the opinion

oEntityTopic

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

oThemeTopic

A SalienceTheme structure for the theme that is the subject of the opinion, if applicable
Collections: Is always NULL

acQuotation

The text of the expressed opinion

fSentiment

The sentiment associated with the opinion

nHasTheme

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

SalienceOption

nOption

Integer code for the option being set, as defined in SalienceOptions

acValue

Use this member if the option requires a string value

nValue

Use this member if the option requires an integer value

fValue

Use this member if the option requires a float value

See also: lxaSetSalienceOption

SaliencePhrase

acText

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 this phrase has been negated

acNegator

The token responsible for negation if nNegated = 1

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

SalienceRelation

oEntities

A SalienceEntityList structure with the entities involved in the relationship

acType

Type of relationship, as defined in the relationship pattern

fConfidence

Measure of confidence in the relationship

acExtra

Additional information associated with the relationship

See also: lxaGetNamedEntityRelationships, lxaGetUserEntityRelationships

SalienceRow

nColumnCount

A count of the columns detected in this row

oColumns

A SalienceTokenList of the tokens in this row

SalienceSection

nWordCount

The number of SalienceWords in the section

nSentenceCount

The number of SalienceSentences in the section

nObjectiveCount

The number of objective SalienceSentences in the section

nSubjectiveCount

The number of subjective SalienceSentences in the section

nParsedCount

The number of sentences that grammatically parse

oTermFrequency

A SalienceTokenList structure providing term frequency analysis. Note that the tokens for term frequency analysis do not include numbers, punctuation, conjunctions or determiners.

oTaggedTermFrequency

A SalienceTokenList structure providing tagged term frequency analysis

oBiGrams

A SalienceTokenList structure providing bi-gram frequency analysis. Note that the bi-grams do not include numbers, punctuation, conjunctions or determiners.

oTaggedBiGrams

A SalienceTokenList structure providing tagged bi-gram frequency analysis

oTriGrams

A SalienceTokenList structure providing tri-gram frequency analysis. Note that the tri-grams do not include numbers, punctuation, conjunctions or determiners.

oTaggedTriGrams

A SalienceTokenList structure providing tagged tri-gram frequency analysis

oQuadGrams

A SalienceTokenList structure providing quad-gram frequency analysis. Note that the quad-grams do not include numbers, punctuation, conjunctions or determiners.

oNegators

A SalienceTokenList structure providing frequency analysis of negators

oIntensifiers

A SalienceTokenList structure providing frequency analysis of intensifiers

pSentences

A pointer to a list of SalienceSentence structures that make up the document

acInternalVersion

The internal version of the document

acFingerprint

A calculated fingerprint of the document (DEPRECATED)

oRows

If this section is a table or row, a SalienceRowList structure is provided for each row

acHeader

The header for this section

SalienceSentence

pTokens

A pointer to a list of SalienceWord structures that make up the sentence

pChunks

A pointer to 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" statement (1) or not (0)

acText

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, otherwise this structure member contains the value -1.

fSentiment

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

SalienceSentimentModel

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

acModelName

Name of the sentiment model used for scoring

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

SalienceSentimentPhrase

oPhrase

A SaliencePhrase structure with details about the phrase

fScore

The sentiment weight for the phrase

nType

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

acSource

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

nModified

An indicator specifying if the phrase has been modified << 0: no modification, 1: negated, 2: intensified, 3: negated and intensified

oSupportingPhrases

A SaliencePhraseList with details about any relevant supporting phrases, such as a negating phrases or intensifying phrase

SalienceSentimentResult

fScore

Phrase-based sentiment score

oPhrases

A SalienceSentimentPhraseList structure containing details of phrase-based sentiment analysis

pModel

Pointer to a list of SalienceSentimentModel structures containing details of model-based sentiment analysis

nModelCount

Number of models for which model-based sentiment results are provided

oEmotions

DEPRECATED: A list of SalienceTopicList structures containing information about emotions detected in the content

See also: lxaGetSentiment

SalienceSession

This structure has no accessible members

See also: lxaOpenSalienceSession

SalienceSessionStartup

acError

Character buffer filled with error message when needed

nStartupLog

Integer flag indicating whether startup log should be created (1) or not (0)

acLogPath

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

acDataDirectory

Character buffer containing path to data directory for use

acUserDirectory

Character buffer containing path to user directory for use

nMode

A integer to set a pre-defined mode for Salience, which has the effect of setting specific option values for handling certain content.

The mode member of the structure 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.

See also: lxaOpenSalienceSession

SalienceSummaryResult

acSummary

Character buffer providing summary for the document via default method

pDocument

A pointer to a SalienceDocument structure containing a pointer to a list of SalienceSentence structures for the sentences in the summary. The SalienceSentence structs will contain ranking for the sentence with respect to the summary.

acAlternateSummary

Character buffer providing summary generated for the document via an alternate method

pAlternateDocument

A pointer to a SalienceDocument structure containing a pointer to a list of SalienceSentence structures for the sentences in the alternate summary. The SalienceSentence structs will contain ranking for the sentence with respect to the alternate summary.

See also: lxaGetSummary

SalienceTheme

acTheme

The text of the theme

acStemmedTheme

The stemmed version of the theme

acNormalizedTheme

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

nAbout

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

acSummary

A summary of the document content relevant to the theme

oMentions

A SaliencePhraseList structure with details about the theme occurrences

oTopics

A SalienceTopicList structure with details about topics that co-occur with themes.

oAlternateThemes

Reserved for future use.

oChildMentions

A SaliencePhraseList structure with details about phrases associated with child mentions of the theme.

oRelatedMentions

A SaliencePhraseList structure with details about phrases associated with related mentions of the theme.

SalienceToken

acToken

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

nCount

Number of occurrences of the token

SalienceTopic

The SalienceTopic structure is used as the return structure for multiple functions.

Query-defined topics

When returned for query-defined topics at the document level

acTopic

The query-defined topic label

nHits

Number of query terms that hit within the document content

fScore

0 (not used)

fSentiment

The sentiment score for document content associated with the topic

acAdditional

A field for any additional information related to the topic

nType

0 (indicates query topic result)

pChildren

Null (not used)

oEntities

A SalienceEntityList containing information about entities specified in the query definition, if any. Otherwise, an empty list.

oSentimentPhrases

A SalienceSentimentPhraseList containing information about the phrases used in calculating this topic's sentiment score

When returned for query-defined topics at the collection level

acTopic

The query-defined topic label

nHits

The number of documents within the collection that contain hits for the topic

fScore

0 (not used)

fSentiment

An average of the sentiment values for topic hits within the collection

acAdditional

A field for any additional information related to the topic

nType

0 (indicates query topic result)

pChildren

Null (not used)

oEntities

A SalienceEntityList containing information about entities specified in the query definition, if any. Otherwise, an empty list.

oSentimentPhrases

Null (not used)

Concept-defined topics

When returned for concept topics at the document level

acTopic

The concept topic label

nHits

0 (not used)

fScore

Strength of the concept topic match to document content

fSentiment

Sentiment for content related to the topic within the document

acAdditional

A field for any additional information related to the topic

nType

1 (indicates concept topic result)

pChildren

Null (not used)

oEntities

Not used, this member will contain an empty SalienceEntityList

oSentimentPhrases

A SalienceSentimentPhraseList containing information about the phrases used in calculating this topic's sentiment score

When returned for concept topics at the collection level

acTopic

The concept topic label

nHits

The number of documents within the collection that match the concept

fScore

0 (not used)

fSentiment

An average of the sentiment values for topic hits within the collection

acAdditional

A field for any additional information related to the topic

nType

1 (indicates concept topic result)

pChildren

Null (not used)

oEntities

Not used, this member will contain an empty SalienceEntityList

oSentimentPhrases

Null (not used)

Categories

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

acTopic

The category label

nHits

0 (not used)

fScore

Strength of the category match to document content

fSentiment

0 (not used)

acAdditional

Not used

nType

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

pChildren

A pointer to a SalienceTopicList containing information about child categories

oEntities

Not used, this member will contain an empty SalienceEntityList

oSentimentPhrases

A SalienceSentimentPhraseList containing information about the phrases used in calculating this topic's sentiment score

Classification

Document classification results are determined via the API call lxaGetDocumentClasses. Document classification is only available at the document level.

acTopic

The classification label

nHits

0 (not used)

fScore

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

fSentiment

0 (not used)

acAdditional

Not used

nType

Not used

pChildren

Not used

oEntities

Not used

oSentimentPhrases

Null (not used)

SalienceWord

acToken

The token associated with the word

acPOSTag

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

acStem

The stemmed version of the word

nInvert

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

acEntityType

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

nPostFixed

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

Updated 3 months ago

Item Structures


Suggested Edits are limited on API Reference Pages

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