Nasty.AST.Semantic.Mention (Nasty v0.3.0)
View SourceMention of an entity in text, used for coreference resolution.
A mention can be a pronoun, proper name, or definite noun phrase that refers to an entity. Mentions are linked together into coreference chains.
Summary
Functions
Checks if mention is a definite noun phrase.
Checks if gender agreement holds between two mentions.
Creates a new mention.
Checks if number agreement holds between two mentions.
Checks if mention is pronominal.
Checks if mention is a proper name.
Types
@type gender() :: :male | :female | :neutral | :plural | :unknown
@type grammatical_number() :: :singular | :plural | :unknown
@type mention_type() ::
:pronoun | :proper_name | :definite_np | :indefinite_np | :demonstrative
Mention types for coreference resolution.
@type t() :: %Nasty.AST.Semantic.Mention{ chain_id: non_neg_integer() | nil, entity_type: atom() | nil, gender: gender(), number: grammatical_number(), phrase: Nasty.AST.Phrase.t() | nil, sentence_idx: non_neg_integer(), span: Nasty.AST.Node.span(), text: String.t(), token_idx: non_neg_integer(), tokens: [Nasty.AST.Token.t()], type: mention_type() }
Functions
Checks if mention is a definite noun phrase.
Checks if gender agreement holds between two mentions.
@spec new( String.t(), mention_type(), non_neg_integer(), non_neg_integer(), Nasty.AST.Node.span(), keyword() ) :: t()
Creates a new mention.
Checks if number agreement holds between two mentions.
Checks if mention is pronominal.
Checks if mention is a proper name.