660f6e5185dbd68267916ff093c81500614d7318,snorkel/features.py,NgramFeaturizer,_match_contexts,#NgramFeaturizer#Any#,73
Before Change
feature_generators.append(self._generate_context_feats( \
lambda c : get_feats(c.xmltree.root, cidxs), "TDLIB_", candidates))
if self.arity == 2:
c1idxs = range(c.e1.word_start, c.e1.word_end+1)
c2idxs = range(c.e2.word_start, c.e2.word_end+1)
// Add TreeDLib relation features
if candidates[0].xmltree.root is not None:
get_feats = compile_relation_feature_generator()
feature_generators.append(self._generate_context_feats( \
lambda c : get_feats(c.xmltree.root, c1idxs, c2idxs), "TDLIB_", candidates))
return feature_generators
class LegacyCandidateFeaturizer(Featurizer):
After Change
lambda c : get_feats(c.xmltree.root, range(c.word_start, c.word_end+1)), "TDL_", candidates))
if self.arity == 2:
raise NotImplementedError("Featurizer needs to be implemented for binary relations!")
return feature_generators
class LegacyCandidateFeaturizer(Featurizer):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: snorkel-team/snorkel
Commit Name: 660f6e5185dbd68267916ff093c81500614d7318
Time: 2016-07-29
Author: ajratner@gmail.com
File Name: snorkel/features.py
Class Name: NgramFeaturizer
Method Name: _match_contexts
Project Name: snorkel-team/snorkel
Commit Name: b56a4b355dfc302fa449d223e065af3a7acac986
Time: 2018-05-03
Author: dnicholson329@gmail.com
File Name: snorkel/learning/pytorch/noise_aware_model.py
Class Name: TorchNoiseAwareModel
Method Name: marginals
Project Name: dmlc/dgl
Commit Name: ca2a7e1ca16ce1d2341dd09d7d358d21c1d88f95
Time: 2019-03-05
Author: minjie.wang@nyu.edu
File Name: python/dgl/contrib/sampling/sampler.py
Class Name: SampledSubgraphLoader
Method Name: _prefetch