Conceptualization

eventuality_conceptualizer

class aser.conceptualize.aser_conceptualizer.BaseASERConceptualizer[source]

Bases: object

Base ASER eventuality conceptualizer to conceptualize eventualities

close()[source]

Close the ASER Conceptualizer safely

conceptualize(eventuality)[source]

Conceptualize an eventuality

Parameters:

eventuality (aser.eventuality.Eventuality) – an eventuality

Returns:

a list of (conceptualized eventuality, score) pair

Return type:

List[Tuple[aser.concept.ASERConcept, float]]

class aser.conceptualize.aser_conceptualizer.ProbaseASERConceptualizer(probase_path=None, probase_topk=3)[source]

Bases: BaseASERConceptualizer

ASER eventuality conceptualizer based on Probase and NERs

close()[source]

Close the ASER Conceptualizer safely

conceptualize(eventuality)[source]

Conceptualization use probase given an eventuality

Parameters:

eventuality (aser.eventuality.Eventuality) – an eventuality

Returns:

a list of (conceptualized eventuality, score) pair

Return type:

List[Tuple[aser.concept.ASERConcept, float]]

class aser.conceptualize.aser_conceptualizer.SeedRuleASERConceptualizer(**kw)[source]

Bases: BaseASERConceptualizer

ASER eventuality conceptualizer based on rules and NERs

conceptualize(eventuality)[source]

Conceptualization based on rules and NERs given an eventuality

Parameters:

eventuality (aser.eventuality.Eventuality) – an eventuality

Returns:

a list of (conceptualized eventuality, score) pair

Return type:

List[Tuple[aser.concept.ASERConcept, float]]

conceptualize_from_text(words, ners)[source]

Conceptualization based on rules and NERs given a word list an a ner list

Parameters:
  • words (List[str]) – a word list

  • ners (List[str]) – a ner list

Returns:

a list of (conceptualized eventuality, score) pair

Return type:

List[Tuple[aser.concept.ASERConcept, float]]

is_pronoun(word)[source]
is_seed_concept(word)[source]