def webqsp_generator():
      """Generate set intersections.

      Yields:
        a tuple of features and label
      """
      for (question_token_ids, segment_ids, question_mask, question_entity_id,
           constraint_entity_id, answer_ids) in data:
        # question
        question_entity_sketch = np.zeros((self.cm_depth, self.cm_width),
                                          dtype=np.float32)
        for i, j in enumerate(self.all_entity_sketches[question_entity_id]):
          question_entity_sketch[i, j] = 1.0
        # constraint
        constraint_entity_sketch = np.zeros((self.cm_depth, self.cm_width),
                                            dtype=np.float32)
        if constraint_entity_id != -1:
          for i, j in enumerate(self.all_entity_sketches[constraint_entity_id]):
            constraint_entity_sketch[i, j] = 1.0
        yield (question_token_ids, segment_ids, question_mask,
               question_entity_id, question_entity_sketch, constraint_entity_id,
               constraint_entity_sketch, answer_ids), 0
Generate set intersections.

      Yields:
        a tuple of features and label
      
language/emql/data_loader.py