yield candidate.id, FEAT_PRE + f, v
// Binary candidates
elif len(args) == 2:
span1, span2 = args
// Add VisualLib entity features (if applicable)
if span1.sentence.is_visual() or span2.sentence.is_visual():
After Change
else:
spans = args
// Add VisualLib entity features (if applicable)
if all([span.sentence.is_visual() for span in spans]):
for i, span in enumerate(spans):
prefix = f"e{i}_"
if span.stable_id not in unary_vizlib_feats: