Class CollectionEntity

java.lang.Object
com.lexalytics.salience.CollectionEntity

public class CollectionEntity
extends java.lang.Object

A CollectionEntity object represents an Entity that has been extracted from a collection document.

  • Constructor Summary

    Constructors 
    Constructor Description
    CollectionEntity​(java.util.Vector<Phrase> vMentions, java.lang.String sType, java.lang.String sLabel, java.lang.String sNormalizedForm, int nCount, int nPositiveCount, int nNeutralCount, int nNegativeCount)
    Creates a new collection entity.
  • Method Summary

    Modifier and Type Method Description
    int getCount()
    Retrieves the number of occurrences of the entity across all collection documents.
    java.lang.String getLabel()
    A descriptive label for the entity.
    java.util.Vector<Phrase> getMentions()
    A list of entity mentions within the collection.
    int getNegativeCount()
    Retrieves the number of negative occurrences of the entity across all collection documents.
    int getNeutralCount()
    Retrieves the number of neutral occurrences of the entity across all collection documents.
    java.lang.String getNormalizedForm()
    The normalized for of the entity.
    int getPositiveCount()
    Retrieves the number of positive occurrences of the entity across all collection documents.
    java.lang.String getType()
    The entity type is a general classification of the entity, as determined by the entity extraction model or data file customizations to specify the entity type.

    Methods inherited from class java.lang.Object

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

    • CollectionEntity

      public CollectionEntity​(java.util.Vector<Phrase> vMentions, java.lang.String sType, java.lang.String sLabel, java.lang.String sNormalizedForm, int nCount, int nPositiveCount, int nNeutralCount, int nNegativeCount)
      Creates a new collection entity. This is not intended for client use. CollectionEntities are created by Salience Engine when getCollectionEntities is called.
      Parameters:
      vMentions - A Vector of entity Mention objects giving information about occurrences within the text.
      sType - The entity type (ex. Company, Person, Place, Product, List, Pattern).
      sLabel - A descriptive label for the entity.
      sNormalizedForm - The normalized form of the entity across all mentions.
      nCount - A count of the entity occurrences across the collection.
      nPositiveCount - A count of the entity occurrences with positive sentiment.
      nNeutralCount - A count of the entity occurrences with neutral sentiment.
      nNegativeCount - A count of the entity occurrences with negative sentiment.
  • Method Details

    • getMentions

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

      public java.lang.String getType()
      The entity type is a general classification of the entity, as determined by the entity extraction model or data file customizations to specify the entity type. The main entity types are Company, Person, Place, and Product.
      Returns:
      A String object containing the type of this entity (e.g. Person).
    • getNormalizedForm

      public java.lang.String getNormalizedForm()
      The normalized for of the entity. For example, an entity may appear as "George Washington", "he", "George". The normalized form would be "George Washington".
      Returns:
      A String object containing the normalized form of this entity (e.g. George Washington).
    • getLabel

      public java.lang.String getLabel()
      A descriptive label for the entity. This may be the same as the entity type, but can be customized in data files. For example, the entity "George Washington" would have a type "Person" and could have the label "Politician".
      Returns:
      A String object containing the label for this entity (e.g. Politician).
    • getCount

      public int getCount()
      Retrieves the number of occurrences of the entity across all collection documents.
      Returns:
      The number of mentions for this entity.
    • getPositiveCount

      public int getPositiveCount()
      Retrieves the number of positive occurrences of the entity across all collection documents. This is dependent on the neutral range set by the Options.SentimentOptions.SetSentimentThresholds(float, float) API call.
      Returns:
      The number of positive occurrences for this entity.
    • getNeutralCount

      public int getNeutralCount()
      Retrieves the number of neutral occurrences of the entity across all collection documents. This is dependent on the neutral range set by the Options.SentimentOptions.SetSentimentThresholds(float, float) API call.
      Returns:
      The number of neutral occurrences for this entity.
    • getNegativeCount

      public int getNegativeCount()
      Retrieves the number of negative occurrences of the entity across all collection documents. This is dependent on the neutral range set by the Options.SentimentOptions.SetSentimentThresholds(float, float) API call.
      Returns:
      The number of negative occurrences for this entity.