705e46d8c12fb86646ea5438e2225b5dd3912ae9,snorkel/viewer.py,Viewer,__init__,#Viewer#,51

Before Change



        // TODO: Hack!!!
        try:
            self.contexts = list(set(c.context for c in self.candidates.union(self.gold)))
        except:
            self.contexts = list(set(c.span0.context for c in self.candidates.union(self.gold)))

After Change


        // We get the sorted candidates and all contexts required, either from unary or binary candidates
        self.gold = list(gold)
        try:
            self.candidates = sorted(list(candidates), key=lambda c : c.char_start)
            self.contexts   = list(set(c.context for c in self.candidates + self.gold))
        except:
            self.candidates = sorted(list(candidates), key=lambda c : c.span0.char_start)
            self.contexts   = list(set(c.span0.context for c in self.candidates + self.gold))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: snorkel-team/snorkel
Commit Name: 705e46d8c12fb86646ea5438e2225b5dd3912ae9
Time: 2016-08-10
Author: ajratner@gmail.com
File Name: snorkel/viewer.py
Class Name: Viewer
Method Name: __init__


Project Name: mariogeiger/se3cnn
Commit Name: 40beebb8d5281e0195b454fdc43c5987aeb4d1ff
Time: 2019-11-11
Author: geiger.mario@gmail.com
File Name: se3cnn/point/kernel.py
Class Name: Kernel
Method Name: __init__


Project Name: dit/dit
Commit Name: d738388c3ac14684d384b05d7e03417a0edffdd1
Time: 2016-05-11
Author: ryangregoryjames@gmail.com
File Name: dit/multivariate/dilworth.py
Class Name:
Method Name: dilworth