                          final_kb_ids.append(best_candidate.entity_)
  
          return final_entities, final_kb_ids
  
      def set_annotations(self, docs, entities, kb_ids=None):
          for entity, kb_id in zip(entities, kb_ids):
              for token in entity:
                  token.ent_kb_id_ = kb_id
  
      def to_disk(self, path, exclude=tuple(), **kwargs):
          serialize = OrderedDict()
          serialize["cfg"] = lambda p: srsly.write_json(p, self.cfg)
          serialize["vocab"] = lambda p: self.vocab.to_disk(p)
 
</s> remove         return final_entities, final_kb_ids
 </s> add         assert len(final_kb_ids) == entity_count </s> remove                         final_entities.append(ent)
 </s> add  </s> remove             for entity, value in gold.links.items():
                cats.append([value])
 </s> add             for entity, kb_dict in gold.links.items():
                for kb_id, value in kb_dict.items():
                    cats.append([value]) </s> remove             for entity, value in gold.links.items():
                start, end, kb_id = entity
 </s> add             for entity, kb_dict in gold.links.items():
                start, end = entity </s> remove         entities, kb_ids = self.predict([doc])
        self.set_annotations([doc], entities, kb_ids)
 </s> add         kb_ids = self.predict([doc])
        self.set_annotations([doc], kb_ids)
        return final_kb_ids

    def set_annotations(self, docs, kb_ids, tensors=None):
        i=0
        for doc in docs:
            for ent in doc.ents:
                kb_id = kb_ids[i]
                i += 1
                for token in ent:
                    token.ent_kb_id_ = kb_id
                          final_kb_ids.append(best_candidate.entity_)
  
          return final_entities, final_kb_ids
  
        return final_kb_ids

    def set_annotations(self, docs, kb_ids, tensors=None):
        i=0
        for doc in docs:
            for ent in doc.ents:
                kb_id = kb_ids[i]
                i += 1
                for token in ent:
                    token.ent_kb_id_ = kb_id
        return final_kb_ids

    def set_annotations(self, docs, kb_ids, tensors=None):
        i=0
        for doc in docs:
            for ent in doc.ents:
                kb_id = kb_ids[i]
                i += 1
                for token in ent:
                    token.ent_kb_id_ = kb_id
        return final_kb_ids

    def set_annotations(self, docs, kb_ids, tensors=None):
        i=0
        for doc in docs:
            for ent in doc.ents:
                kb_id = kb_ids[i]
                i += 1
                for token in ent:
                    token.ent_kb_id_ = kb_id
        return final_kb_ids

    def set_annotations(self, docs, kb_ids, tensors=None):
        i=0
        for doc in docs:
            for ent in doc.ents:
                kb_id = kb_ids[i]
                i += 1
                for token in ent:
                    token.ent_kb_id_ = kb_id
  
      def to_disk(self, path, exclude=tuple(), **kwargs):
          serialize = OrderedDict()
          serialize["cfg"] = lambda p: srsly.write_json(p, self.cfg)
          serialize["vocab"] = lambda p: self.vocab.to_disk(p)
keep keep keep keep replace replace replace replace keep keep keep keep keep
 have gold.links correspond exactly to doc.ents 
spacy/pipeline/pipes.pyx