part.edges = []
for ann_1, ann_2 in product(
(ann for ann in chain(part.annotations, part.predicted_annotations) if ann.class_id == self.entity1_class),
(ann for ann in chain(part.annotations, part.predicted_annotations) if ann.class_id == self.entity2_class)):
index_1 = part.get_sentence_index_for_annotation(ann_1)
After Change
import warnings
warnings.warn("Use `SentenceDistanceEdgeGenerator` directly. This will be deleted", DeprecationWarning)
super().generate(dataset)
class WordFilterEdgeGenerator(EdgeGenerator):