925a852bb6450e16a23346e97a1813fc0fcb22a0,spacy/scorer.py,Scorer,score,#Scorer#,120

Before Change


                    cand_deps.add((gold_i, gold_head, token.dep_.lower()))
        if "-" not in [token[-1] for token in gold.orig_annot]:
            cand_ents = set()
            current_ent = {k.label_: set() for k in doc.ents}
            current_gold = {k.label_: set() for k in doc.ents}
            for ent in doc.ents:
                if ent.label_ not in self.ner_per_ents:
                    self.ner_per_ents[ent.label_] = PRFScore()

After Change


                    cand_deps.add((gold_i, gold_head, token.dep_.lower()))
        if "-" not in [token[-1] for token in gold.orig_annot]:
            // Find all NER labels in gold and doc
            ent_labels = set([x[0] for x in gold_ents]
                    + [k.label_ for k in doc.ents])
            // Set up all labels for per type scoring and prepare gold per type
            gold_per_ents = {ent_label: set() for ent_label in ent_labels}
            for ent_label in ent_labels:
                if ent_label not in self.ner_per_ents:
                    self.ner_per_ents[ent_label] = PRFScore()
                gold_per_ents[ent_label].update([x for x in gold_ents if x[0] == ent_label])
            // Find all candidate labels, for all and per type
            cand_ents = set()
            cand_per_ents = {ent_label: set() for ent_label in ent_labels}
            for ent in doc.ents:
                first = gold.cand_to_gold[ent.start]
                last = gold.cand_to_gold[ent.end - 1]
                if first is None or last is None:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: explosion/spaCy
Commit Name: 925a852bb6450e16a23346e97a1813fc0fcb22a0
Time: 2019-08-01
Author: adrianeboyd@gmail.com
File Name: spacy/scorer.py
Class Name: Scorer
Method Name: score


Project Name: cesium-ml/cesium
Commit Name: 2ab1119596b420cc696a783271d617562ccf7e28
Time: 2017-03-29
Author: brettnaul@gmail.com
File Name: cesium/tests/fixtures.py
Class Name:
Method Name: sample_featureset


Project Name: dask/dask-image
Commit Name: c9fd2c425cb873508ba16221819574400ad2443e
Time: 2018-09-30
Author: jakirkham@gmail.com
File Name: dask_image/ndmeasure/__init__.py
Class Name:
Method Name: extrema