Nasty.AST.Semantic.Mention (Nasty v0.3.0)

View Source

Mention 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

Types

Mention types for coreference resolution.

t()

Functions

Checks if mention is a definite noun phrase.

Checks if gender agreement holds between two mentions.

Checks if number agreement holds between two mentions.

Checks if mention is pronominal.

Checks if mention is a proper name.

Types

gender()

@type gender() :: :male | :female | :neutral | :plural | :unknown

grammatical_number()

@type grammatical_number() :: :singular | :plural | :unknown

mention_type()

@type mention_type() ::
  :pronoun | :proper_name | :definite_np | :indefinite_np | :demonstrative

Mention types for coreference resolution.

t()

@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

definite_np?(arg1)

@spec definite_np?(t()) :: boolean()

Checks if mention is a definite noun phrase.

gender_agrees?(arg1, arg2)

@spec gender_agrees?(t(), t()) :: boolean()

Checks if gender agreement holds between two mentions.

new(text, type, sentence_idx, token_idx, span, opts \\ [])

Creates a new mention.

number_agrees?(arg1, arg2)

@spec number_agrees?(t(), t()) :: boolean()

Checks if number agreement holds between two mentions.

pronoun?(arg1)

@spec pronoun?(t()) :: boolean()

Checks if mention is pronominal.

proper_name?(arg1)

@spec proper_name?(t()) :: boolean()

Checks if mention is a proper name.