fe41a42ff872debbc18f465f003a314f5ad19d29,nala/utils/tagger.py,TmVarTagger,generate_abstracts,#TmVarTagger#Any#,42

Before Change


                denotations = [text[d["span"]["begin"]:d["span"]["end"]] for d in denotations]

                for part_id, part in doc.parts.items():
                    for ann in chain(part.annotations, part.predicted_annotations):
                        if ann.class_id == MUT_CLASS_ID and ann.text not in denotations:
                            ann.subclass = True

After Change


        for doc_id in tm_var:
            doc = Document()
            text = tm_var[doc_id]["text"]
            part = Part(text)
            denotations = tm_var[doc_id]["denotations"]
            annotations = []
            for deno in denotations:
                ann = Annotation(class_id="e_2", offset=int(deno["span"]["begin"]), text=text[deno["span"]["begin"]:deno["span"]["end"]])  // todo check whether right offsets (especially the last one)
                annotations.append(ann)
                // discussion should the annotations from tmvar go to predicted_annotations or annotations?
            part.annotations = annotations
            doc.parts["abstract"] = part
            dataset.documents[doc_id] = doc

        return dataset
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: Rostlab/nalaf
Commit Name: fe41a42ff872debbc18f465f003a314f5ad19d29
Time: 2015-09-20
Author: carsten.uhlig@gmail.com
File Name: nala/utils/tagger.py
Class Name: TmVarTagger
Method Name: generate_abstracts


Project Name: Rostlab/nalaf
Commit Name: 90bbf47abab22b01d073f6565f57097cd6c16a66
Time: 2015-10-14
Author: aleksandar.bojchevski@gmail.com
File Name: nala/bootstrapping/utils.py
Class Name: DownloadArticle
Method Name: download


Project Name: Rostlab/nalaf
Commit Name: 39a53e54d563674e4faec8797558a1b68a47e8c2
Time: 2015-11-24
Author: aleksandar.bojchevski@gmail.com
File Name: nala/bootstrapping/utils.py
Class Name: DownloadArticle
Method Name: download