pyknp_eventgraph.event

class pyknp_eventgraph.event.Event(sentence, evid, sid, ssid, start=None, head=None, end=None)[source]

Bases: pyknp_eventgraph.component.Component

Event is the basic information unit of EventGraph. Event is closely related to PAS but more application-oriented with respect to the following points:

  • Semantic heaviness: Some predicates are too semantically light for applications to treat as information units. EventGraph constrains an event to have a semantically heavy predicate.

  • Rich linguistic features: Linguistic features such as tense and modality are assigned to events.

sentence: :class:`.Sentence`

A sentence to which this event belongs.

evid: int

A serial event ID.

sid: str

An original sentence ID.

ssid: int

A serial sentence ID.

start: :class:`pyknp.knp.tag.Tag`, optional

A start tag.

head: :class:`pyknp.knp.tag.Tag`, optional

A head tag.

end: :class:`pyknp.knp.tag.Tag`, optional

An end tag.

pas: PAS, optional

A predicate argument structure.

outgoing_relations: List[Relation]

A list of relations where this event is the modifier.

incoming_relations: List[Relation]

A list of relations where this event is the head.

features: Features, optional

Linguistic features.

parent: Event, optional

A parent event.

children: List[Event]

A list of child events.

head_base_phrase: Token, optional

A head basic phrase.

content_rep_list_()[source]

A list of content words.

Return type

List[str]

mrphs_(include_modifiers=False)[source]

A tokenized surface string.

Parameters

include_modifiers (bool) – If true, tokens of events that modify this event will be included.

Return type

str

mrphs_with_mark_(include_modifiers=False)[source]

A tokenized surface string with marks.

Parameters

include_modifiers (bool) – If true, tokens of events that modify this event will be included.

Return type

str

normalized_mrphs_(include_modifiers=False)[source]

A tokenized/normalized surface string.

Parameters

include_modifiers (bool) – If true, tokens of events that modify this event will be included.

Return type

str

normalized_mrphs_with_mark_(include_modifiers=False)[source]

A tokenized/normalized surface string with marks.

Parameters

include_modifiers (bool) – If true, tokens of events that modify this event will be included.

Return type

str

normalized_mrphs_with_mark_without_exophora_(include_modifiers=False)[source]

A tokenized/normalized surface string with marks but without exophora.

Parameters

include_modifiers (bool) – If true, tokens of events that modify this event will be included.

Return type

str

normalized_mrphs_without_exophora_(include_modifiers=False)[source]

A tokenized/normalized surface string without exophora.

Parameters

include_modifiers (bool) – If true, tokens of events that modify this event will be included.

Return type

str

normalized_reps_(include_modifiers=False)[source]

A normalized representative string.

Parameters

include_modifiers (bool) – If true, tokens of events that modify this event will be included.

Return type

str

normalized_reps_with_mark_(include_modifiers=False)[source]

A normalized representative string with marks.

Parameters

include_modifiers (bool) – If true, tokens of events that modify this event will be included.

Return type

str

reps_(include_modifiers=False)[source]

A representative string.

Parameters

include_modifiers (bool) – If true, tokens of events that modify this event will be included.

Return type

str

reps_with_mark_(include_modifiers=False)[source]

A representative string with marks.

Parameters

include_modifiers (bool) – If true, tokens of events that modify this event will be included.

Return type

str

surf_(include_modifiers=False)[source]

A surface string.

Parameters

include_modifiers (bool) – If true, tokens of events that modify this event will be included.

Return type

str

surf_with_mark_(include_modifiers=False)[source]

A surface string with marks.

Parameters

include_modifiers (bool) – If true, tokens of events that modify this event will be included.

Return type

str

to_dict()[source]

Convert this object into a dictionary.

Return type

dict

to_string()[source]

Convert this object into a string.

Return type

str

property content_rep_list

A list of content words.

Return type

List[str]

property event_id

An alias to evid.

Return type

int

property mrphs

A tokenized surface string.

Return type

str

property mrphs_with_mark

A tokenized surface string with marks.

Return type

str

property normalized_mrphs

A tokenized/normalized surface string.

Return type

str

property normalized_mrphs_with_mark

A tokenized/normalized surface string with marks.

Return type

str

property normalized_mrphs_with_mark_without_exophora

A tokenized/normalized surface string with marks but without exophora.

Return type

str

property normalized_mrphs_without_exophora

A tokenized/normalized surface string without exophora.

Return type

str

property normalized_reps

A normalized representative string.

Return type

str

property normalized_reps_with_mark

A normalized representative string with marks.

Return type

str

property reps

A representative string.

Return type

str

property reps_with_mark

A representative string with marks.

Return type

str

property surf

A surface string.

Return type

str

property surf_with_mark

A surface string with marks.

Return type

str