':type subject: CaperFragmentNode'

def update(self, subject):

    if ((not subject.match) or (not subject.match.success)):
        return
    if (type(subject) is CaperFragmentNode):
        self.num_matched += (len(subject.fragments) if (subject.fragments is not None) else 0)
    self.weights.append(subject.match.weight)
    if subject.match:
        if (subject.match.tag not in self.info):
            self.info[subject.match.tag] = []
        self.info[subject.match.tag].insert(0, subject.match.result)
