A single occurrence of an entity in the text.

Implements

Properties

derivedFrom: null | Entity

Entity from which this mention can be derived (e.g. mention salmon for entity fish), if applicable.

feats: Map<string, string>

Custom features/properties.

id: string

ID of the mention used to refer to it from other objects.

mentionOf: Entity

Entity this mention belongs to. Set from outside.

mwl: string

Lemma of this mention (potentially multiword lemma), i.e. base form of the entity expression.

sentiment: null | Sentiment

Sentiment of this mention. Note: Not supported yet.

text: string

The form of this entity mention, as it occurs in the text.

tokens: TokenSupport

Tokens of this entity mention.

vectors: null | Vector[]

Optional vectors for this mention.

Methods

  • Checks whether the entity mention is continuous (most are).

    Returns boolean

  • True iff this entity mention is derived from some other entity (e.g. mention salmon for entity fish).

    Returns boolean

  • Sentence containing this entity mention. Entity mention belongs to maximally one sentence; artificial mentions without tokens belong to no sentence.

    Returns Sentence

  • Returns a string representation of an object.

    Returns string

  • EntityMention factory method, public constructor.

    Parameters

    • id: string
    • text: string
    • mwl: string
    • tokens: Token[]
    • feats: null | Map<string, string> = null
    • derivedFrom: null | Entity = null
    • sentiment: null | Sentiment = null
    • vectors: null | Vector[] = null

    Returns EntityMention