Class Attribute

java.lang.Object
com.lexalytics.salience.Attribute

public class Attribute
extends java.lang.Object

An Attribute object represents a noun or adjective phrase connected to the Facet of a document. Where a Facet is the subject of the conversation, the Attribute is what is being discussed about the Facet.

A list of Attribute objects is returned in Facet results from calls to the SalienceCollections.getCollectionFacets() API method.

  • Constructor Summary

    Constructors 
    Constructor Description
    Attribute​(java.lang.String sAttribute, int nCount, int nPositiveCount, int nNegativeCount, int nNeutralCount, java.util.Vector<Phrase> vMentions, java.util.Vector<Phrase> vPositiveMentions, java.util.Vector<Phrase> vNegativeMentions, java.util.Vector<Phrase> vNeutralMentions)
    Creates a new attribute.
  • Method Summary

    Modifier and Type Method Description
    int getCount()
    Retrieves a count of the occurrences of the attribute.
    java.lang.String getLabel()
    Retrieves the text of the attribute.
    java.util.Vector<Phrase> getMentions()
    Retrieves a list of the mentions of the attributes.
    int getNegativeCount()
    Retrieves a negative count of the occurrences of the attribute.
    java.util.Vector<Phrase> getNegativeMentions()
    Retrieves a list of the negative mentions of the attributes.
    int getNeutralCount()
    Retrieves a neutral count of the occurrences of the attribute.
    java.util.Vector<Phrase> getNeutralMentions()
    Retrieves a list of the neutral mentions of the attributes.
    int getPositiveCount()
    Retrieves a positive count of the occurrences of the attribute.
    java.util.Vector<Phrase> getPositiveMentions()
    Retrieves a list of the positive mentions of the attributes.

    Methods inherited from class java.lang.Object

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

    • Attribute

      public Attribute​(java.lang.String sAttribute, int nCount, int nPositiveCount, int nNegativeCount, int nNeutralCount, java.util.Vector<Phrase> vMentions, java.util.Vector<Phrase> vPositiveMentions, java.util.Vector<Phrase> vNegativeMentions, java.util.Vector<Phrase> vNeutralMentions)
      Creates a new attribute. This is not intended for client use. Attributes are created by Salience Engine when the SalienceCollections.getCollectionFacets() API method is called.
      Parameters:
      sAttribute - The text of the attribute.
      nCount - The count of occurrences of the attribute.
      nPositiveCount - The count of positive occurrences of the attribute.
      nNegativeCount - The count of negative occurrences of the attribute.
      nNeutralCount - The count of neutral occurrences of the attribute.
      vMentions - A Vector of the attribute mentions.
      vPositiveMentions - A Vector of the positive attribute mentions.
      vNegativeMentions - A Vector of the negative attribute mentions.
      vNeutralMentions - A Vector of the neutral attribute mentions.
  • Method Details

    • getLabel

      public java.lang.String getLabel()
      Retrieves the text of the attribute.
      Returns:
      A String that contains the text of the attribute.
    • getCount

      public int getCount()
      Retrieves a count of the occurrences of the attribute.
      Returns:
      The count of attribute occurrences.
    • getPositiveCount

      public int getPositiveCount()
      Retrieves a positive count of the occurrences of the attribute.
      Returns:
      The positive count of attribute occurrences.
    • getNegativeCount

      public int getNegativeCount()
      Retrieves a negative count of the occurrences of the attribute.
      Returns:
      The negative count of attribute occurrences.
    • getNeutralCount

      public int getNeutralCount()
      Retrieves a neutral count of the occurrences of the attribute.
      Returns:
      The neutral count of attribute occurrences.
    • getMentions

      public java.util.Vector<Phrase> getMentions()
      Retrieves a list of the mentions of the attributes.
      Returns:
      A Vector of Phrase objects containing information about the occurrences of the attributes.
    • getPositiveMentions

      public java.util.Vector<Phrase> getPositiveMentions()
      Retrieves a list of the positive mentions of the attributes.
      Returns:
      A Vector of Phrase objects containing information about the occurrences of the positive attributes.
    • getNegativeMentions

      public java.util.Vector<Phrase> getNegativeMentions()
      Retrieves a list of the negative mentions of the attributes.
      Returns:
      A Vector of Phrase objects containing information about the occurrences of the negative attributes.
    • getNeutralMentions

      public java.util.Vector<Phrase> getNeutralMentions()
      Retrieves a list of the neutral mentions of the attributes.
      Returns:
      A Vector of Phrase objects containing information about the occurrences of the neutral attributes.