8a2e857746dbab697b0045aa6c38133f3de71250,nalaf/learning/taggers.py,StubSameSentenceRelationExtractor,annotate,#StubSameSentenceRelationExtractor#Any#,138
Before Change
self.sentence_splitter.split(dataset)
self.tokenizer.tokenize(dataset)
for document in dataset:
for part in document:
for ann_1, ann_2 in product(
(a for a in part.annotations if a.class_id == self.entity1_class),
(a for a in part.annotations if a.class_id == self.entity2_class)):
if part.get_sentence_index_for_annotation(ann_1) == part.get_sentence_index_for_annotation(ann_2):
rel = Relation(self.relation_type, ann_1, ann_2)
part.predicted_relations.append(rel)
class StubSameDocumentPartRelationExtractor(RelationExtractor):
// Would be better if it just ussed an existing edge generator
def __init__(self, entity1_class, entity2_class, relation_type):
After Change
def annotate(self, dataset):
super().annotate(dataset)
class StubSameDocumentPartRelationExtractor(RelationExtractor):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: Rostlab/nalaf
Commit Name: 8a2e857746dbab697b0045aa6c38133f3de71250
Time: 2016-11-14
Author: i@juanmi.rocks
File Name: nalaf/learning/taggers.py
Class Name: StubSameSentenceRelationExtractor
Method Name: annotate
Project Name: Rostlab/nalaf
Commit Name: ebe4256914107273feb1da940fc3e4237731365e
Time: 2016-11-11
Author: i@juanmi.rocks
File Name: nalaf/preprocessing/edges.py
Class Name: SimpleEdgeGenerator
Method Name: generate
Project Name: facebookresearch/Horizon
Commit Name: dc1835982db065302b92ba8a8fdf4139af910a66
Time: 2018-10-30
Author: jjg@fb.com
File Name: ml/rl/test/gridworld/gridworld_evaluator.py
Class Name: GridworldDDPGEvaluator
Method Name: evaluate_critic