Class Mention

java.lang.Object
com.lexalytics.salience.Phrase
com.lexalytics.salience.Mention

public class Mention
extends Phrase

A Mention object represents a specific occurrence of a specific item within the content. This could be an Entity or Facet for example.

  • Constructor Details

    • Mention

      public Mention​(java.lang.String sText, int nSentence, int nWord, int nLength, int nByteOffset, int nByteLength, int nCharOffset, int nCharLength, int nModifier, int nSection, int nRow, int nColumn, Mention.MentionType eType, float fScore)
      Creates a new mention. This is not intended for client use. Mentions are created by Salience Engine when needed to fill other result structures with results from API methods.
      Parameters:
      sText - The text of the phrase.
      nSentence - The zero-based index of the sentence in which the phrase occurs.
      nWord - The zero-based index of the first word of the phrase.
      nLength - The length (in tokens) of the phrase.
      nByteOffset - The byte offset of the phrase.
      nByteLength - The length of the phrase in bytes.
      nCharOffset - The char offset of the phrase.
      nCharLength - The length of the phrase in char.
      nModifier - States whether or not the phrase is an negator = 1, intensifier = 2, currently only relevant for sentiment phrases but could be implemented elsewhere
      nSection - The zero-based index of the document details section this phrase occurs in.
      nRow - The zero-based index of the row if the phrase occurs in a list or a table.
      nColumn - The zero-based index of the column if the phrase occurs in a table.
      eType - The mention type.
      fScore - A score value associated with the mention.
  • Method Details

    • GetType

      public Mention.MentionType GetType()
      Retrieves the type for the mention.
      Returns:
      A Mention.MentionType enumeration value identifying the type of mention.
    • GetScore

      public float GetScore()
      Retrieves the score for the mention, a value between 0 and 100. With entities, this is the entity extraction confidence that the extracted item is an entity, and should exceed the threshold set through the Options.EntityOptions.setEntityThreshold(int) option call.
      Returns:
      A score for this mention.