index
module components.merging.wrapper
MergerWrapper
Python wrapper around the merging code.
Calls SputLink's ConstraintPropagator to do all the work. For now does not do
any graph reduction at the end.
TODO:
- Decide what we want to take from the output. We now take all non-disjunctive
links. We could add the disjunctive links as well. Or we could not take
inverse relations. Or we could reduce the graph to a minimal graph.
- We now put all links on the queue and order them in a rather simplistic way,
where we have S2T < Blinker < Classifier, and classifier are ordered use the
classifier-assigned confidence scores. For the merging routine to be better we
should let the ranking be informed by hard evaluation data.
class MergerWrapper
Inherits from: object
Wraps the merging code, including Sputlink's temporal closure code.
Public Functions
__init__(self, document)
process(self)
Run the contraint propagator on all TLINKS in the TarsqiDocument and
add resulting links to the TarsqiDocument.
Private Functions
_add_constraint_to_tarsqidoc(self, edge)
Add the constraint as a TLINK to the TarsqiDocument.
_update_tarsqidoc(self, cp)
Remove existing TLINKs from the TarsqiDocument and add new ones given
the final constraints in the graph used by the constraint propagator.
module functions
sort_on_confidence(link)
Sort key for determining how good we think a link is. Rather primitive for
now. We consider S2T links the best, then links derived by Blinker, then
links derived by the classifier. Classifier links themselves are ordered
using their classifier-assigned confidence scores.
tlink_arg1_attr(identifier)
Return the TLINK attribute for the element linked given the identifier.
tlink_arg2_attr(identifier)
Return the TLINK attribute for the element linked given the identifier.