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

Before Change


                    self.ner_per_ents[ent.label_].fp += 1
                else:
                    cand_ents.add((ent.label_, first, last))
                    current_ent[ent.label_].update([x for x in cand_ents if x[0] == ent.label_])
                    current_gold[ent.label_].update([x for x in gold_ents if x[0] == ent.label_])
            // Scores per ent
            [

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: 7

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: tyarkoni/pliers
Commit Name: af8f451f0df8f93092d50f28c6200a1ba8f99d81
Time: 2017-12-01
Author: delavega@utexas.edu
File Name: pliers/utils/updater.py
Class Name:
Method Name: check_updates


Project Name: nilmtk/nilmtk
Commit Name: 7d5c595768fb372606290277996ec63c5489aa11
Time: 2014-12-19
Author: jack-list@xlk.org.uk
File Name: nilmtk/metergroup.py
Class Name: MeterGroup
Method Name: draw_wiring_graph


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