Class Theme

java.lang.Object
com.lexalytics.salience.Theme

public class Theme
extends java.lang.Object

A theme represents a general idea expressed in content. Themes are the type of items generally shown in a tag cloud.

Salience extracts themes from document content primarily by calls to Salience.getDocumentThemes(). However, themes are also present in the Entity objects returned from calls to Salience.getNamedEntities() and Salience.getUserEntities().

Themes are extracted on the basis of part-of-speech patterns, defined in the themes folder of the data directory. That means the exact text of the theme occurs within the content.

  • Constructor Summary

    Constructors 
    Constructor Description
    Theme​(java.lang.String sTheme, java.lang.String sStemmedTheme, java.lang.String sNormalizedTheme, float fScore, boolean bMeta, float fSentiment, int nEvidence, boolean bAbout, java.lang.String sSummary, java.util.Vector<Phrase> vMentions, java.util.Vector<Topic> vTopics, java.util.Vector<AlternateTheme> vAlternateThemes, java.util.Vector<Phrase> vChildMentions, java.util.Vector<Phrase> vRelatedMentions)
    Creates a new theme.
  • Method Summary

    Modifier and Type Method Description
    boolean getAbout()
    Boolean indicator of theme "aboutness".
    java.util.Vector<AlternateTheme> getAlternateThemes()
    A list of alternate themes.
    java.util.Vector<Phrase> getChildMentions()
    A list of supporting theme mentions within the content.
    int getEvidence()
    Evidence is a measure of the content available to determine the sentiment score for the theme.
    java.util.Vector<Phrase> getMentions()
    A list of theme mentions within the content.
    java.lang.String getNormalizedTheme()
    The normalized version of the theme text
    java.util.Vector<Phrase> getRelatedMentions()
    A list of related theme mentions within the content.
    float getScore()
    Score giving indication of the strength of the theme, higher scores are stronger themes.
    float getSentiment()
    Sentiment score associated with content related to the theme.
    java.lang.String getStemmedTheme()
    The stemmed version of the theme text
    java.lang.String getSummary()
    A summary of content related to the theme.
    java.lang.String getTheme()
    The theme text
    java.util.Vector<Topic> getTopics()
    Added in Salience 5.1: A list of topics related to the theme.
    boolean isMeta()
    A meta-theme is one that occurs as a part of other themes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Theme

      public Theme​(java.lang.String sTheme, java.lang.String sStemmedTheme, java.lang.String sNormalizedTheme, float fScore, boolean bMeta, float fSentiment, int nEvidence, boolean bAbout, java.lang.String sSummary, java.util.Vector<Phrase> vMentions, java.util.Vector<Topic> vTopics, java.util.Vector<AlternateTheme> vAlternateThemes, java.util.Vector<Phrase> vChildMentions, java.util.Vector<Phrase> vRelatedMentions)
      Creates a new theme. This is not intended for client use. Themes are created by Salience Engine when theme-related API methods are called.
      Parameters:
      sTheme - The theme text.
      sStemmedTheme - The stemmed version of the theme text.
      sNormalizedTheme - The normalized version of the theme text
      fScore - Score giving indication of the strength of the theme, higher scores are stronger themes.
      bMeta - If true, the theme is a "meta-theme", or one that repeats across multiple other theme results (ex. "healthcare industry", "healthcare reform" becomes "healthcare").
      fSentiment - Sentiment score for the theme.
      nEvidence - Measure of evidence used to determine sentiment.
      bAbout - Boolean flag indicating that the theme occurs in the internal summary of the document.
      sSummary - A summary of content related to the theme.
      vMentions - A Vector of Phrase objects giving mentions of the theme.
      vTopics - Added in Salience 5.1: A Vector of Topic objects giving topics related to the theme.
      vChildMentions - A Vector of Phrase objects giving supporting mentions of the theme.
      vRelatedMentions - A Vector of Phrase objects giving related mentions of the theme.
  • Method Details

    • getTheme

      public java.lang.String getTheme()
      The theme text
      Returns:
      A String object with the text of the theme.
    • getStemmedTheme

      public java.lang.String getStemmedTheme()
      The stemmed version of the theme text
      Returns:
      A String ojbect with the stemmed text of the theme.
    • getNormalizedTheme

      public java.lang.String getNormalizedTheme()
      The normalized version of the theme text
      Returns:
      A String ojbect with the normalized text of the theme.
    • getScore

      public float getScore()
      Score giving indication of the strength of the theme, higher scores are stronger themes. This is a positive value, where greater values indicate themes that are stronger indications of the central message of the content.

      Collections: For collection themes, this value represents the number of themes across collection documents that were rolled together into this theme result.

      Returns:
      The score associated with the theme.
    • isMeta

      public boolean isMeta()
      A meta-theme is one that occurs as a part of other themes. For example, the themes "healthcare industry" and "healthcare reform" could result in a meta-theme of "healthcare".
      Returns:
      Boolean flag indicating if the theme is a "meta theme".
    • getSentiment

      public float getSentiment()
      Sentiment score associated with content related to the theme.

      Collections: The sentiment score is derived by aggregating the sentences from collection documents that contain the theme mentions into a single document.

      Returns:
      Sentiment score determined for a theme.
    • getEvidence

      public int getEvidence()
      Evidence is a measure of the content available to determine the sentiment score for the theme.

      Collections: The evidence score is the number of sentiment phrases that were used in calculating the sentiment score.

      Returns:
      The evidence score. This is on a scale of 1 to 7, where evidence values greater than 4 indicate a reasonable amount of content for sentiment detection.
    • getSummary

      public java.lang.String getSummary()
      A summary of content related to the theme.
      Returns:
      A String object containing the summary content associated with the theme.
    • getAbout

      public boolean getAbout()
      Boolean indicator of theme "aboutness". This is flag is true if the theme occurs within the summary of the document that Salience calculates internally. One can expect that the highest scoring themes will generally occur within this summary as being indicative of the emphasis of the text.

      Collections: The "aboutness" field is not used and this method should always return false.

      Returns:
      Boolean flag indicating theme "aboutness".
    • getMentions

      public java.util.Vector<Phrase> getMentions()
      A list of theme mentions within the content.
      Returns:
      A Vector of Salience Phrase objects. These provide positional information about the occurrences of the theme within the content.
    • getTopics

      public java.util.Vector<Topic> getTopics()
      Added in Salience 5.1: A list of topics related to the theme.
      Returns:
      A Vector of Salience Topic objects. These are controlled by the Options.ThemeOptions.setThemeTopics(boolean) option, and provide topics detected that are related to the theme.
    • getAlternateThemes

      public java.util.Vector<AlternateTheme> getAlternateThemes()
      A list of alternate themes.
      Returns:
      A Vector of Salience AlternateTheme objects.
    • getChildMentions

      public java.util.Vector<Phrase> getChildMentions()
      A list of supporting theme mentions within the content.
      Returns:
      A Vector of Salience Phrase objects. These provide positional information about the occurrences of the theme within the content.
    • getRelatedMentions

      public java.util.Vector<Phrase> getRelatedMentions()
      A list of related theme mentions within the content.
      Returns:
      A Vector of Salience Phrase objects. These provide positional information about the occurrences of related themes within the content.