Public Functions
__init__(self, tarsqidoc)
Set component name and load rules into a BlinkerRuleDictionary
object, this object knows where the rules are stored.
process_element(self, element)
Apply the Blinker rules to the element. Creates a TarsqiTree instance
and then applies the Blinker rules.
run_timex_linking(self)
Apply the rules that govern relations between TIMEX3 tags. Only
applies to TIMEX3 tags with type=DATE.
Private Functions
_add_tlink(self, reltype, id1, id2, source)
Add a TLINK to self.tarsqidoc.
_apply_event_anchoring_rules(self, sentence, timex, i)
Anchor events to a given timex that occurs in the sentence at index
i. The method proceeds by looking for some simple syntactic patterns
with and without prepositions. If a pattern with a preposition occurs,
then the preposition is looked up in self.rule2_index. If no signal is
found, then the default INCLUDES rule will apply (rule 1), this is not
yet implemented.
_apply_event_ordering_with_signal_rules(self)
Some more rules without using any rules, basically a placeholder
for event ordering rules that use a signal.
_apply_type3_rules(self, event1, event2)
Creates a TLINK between two main events
_apply_type5_rules(self, sentence, event1, position)
Creates TLINKs between the reporting event and reported events
Takes as arguments sentence, reporting event constituent, and
position of that constituent within the sentence list
_create_timex_link(self, timex1, timex2)
Try to create a TLINK between two timexes.
_index_rules(self)
Rules of type 2 (timex-signal-event) can be simply put in a hash
keyed on the signals.
_run_blinker(self)
Apply BLinker rules to the sentences in the doctree variable. This
currently only deals with rule type 2, anchoring an event to a timex in
those cases where there is a signal (that is, a preposition). New
Tlinks are added just before the closing tag of the fragment.