Esempio n. 1
0
 def add_mark(self, type, target, reason):
     comment = annotation.OnelineCommentAnnotation(
         target,
         self.result.get_new_id('#'),
         type,
         "\t" + reason)
     self.result.add_annotation(comment)
Esempio n. 2
0
def add_comments(doc, ann, entity_ids):
    for entity in doc.select(folia.Entity):
        desc = entity.select(folia.Description)
        if desc:
            #only 1 desc for every entity
            desc = desc[0]
            cid = ann.get_new_id('#')
            description = annotation.OnelineCommentAnnotation(
                entity_ids[entity.id], cid, "AnnotatorNotes",
                "\t" + desc.value.rstrip())
            ann.add_annotation(description)