      # STEP 3: create and train the entity linking pipe
      logger.info("STEP 3: training Entity Linking pipe")
  
      el_pipe = nlp.create_pipe(
          name="entity_linker", config={"pretrained_vectors": nlp.vocab.vectors.name}
      )
      el_pipe.set_kb(kb)
      nlp.add_pipe(el_pipe, last=True)
  
      other_pipes = [pipe for pipe in nlp.pipe_names if pipe != "entity_linker"]
 
</s> remove     # STEP 3: create and train the entity linking pipe
    logger.info("STEP 3: training Entity Linking pipe")
 </s> add     # STEP 3: create and train an entity linking pipe
    logger.info("STEP 3: Creating and training an Entity Linking pipe") </s> remove         kb=kb,
 </s> add         kb=None,
        labels_discard=labels_discard </s> remove     logger.info("STEP 4: performance measurement of Entity Linking pipe")
 </s> add     logger.info("STEP 4: Final performance measurement of Entity Linking pipe") </s> remove     logger.info("STEP 5: applying Entity Linking to toy example")
 </s> add     logger.info("STEP 5: Applying Entity Linking to toy example") </s> remove         measure_performance(dev_data, kb, el_pipe)
 </s> add             measure_performance(dev_data, kb, el_pipe, baseline=False, context=True)
        name="entity_linker", config={"pretrained_vectors": nlp.vocab.vectors.name,
                                      "labels_discard": labels_discard}
      # STEP 3: create and train the entity linking pipe
      logger.info("STEP 3: training Entity Linking pipe")
  
      el_pipe = nlp.create_pipe(
        name="entity_linker", config={"pretrained_vectors": nlp.vocab.vectors.name,
                                      "labels_discard": labels_discard}
      )
      el_pipe.set_kb(kb)
      nlp.add_pipe(el_pipe, last=True)
  
      other_pipes = [pipe for pipe in nlp.pipe_names if pipe != "entity_linker"]
keep keep keep keep replace keep keep keep keep keep
 KB extensions and better parsing of WikiData (#4375)

* fix overflow error on windows

* more documentation & logging fixes

* md fix

* 3 different limit parameters to play with execution time

* bug fixes directory locations

* small fixes

* exclude dev test articles from prior probabilities stats

* small fixes

* filtering wikidata entities, removing numeric and meta items

* adding aliases from wikidata also to the KB

* fix adding WD aliases

* adding also new aliases to previously added entities

* fixing comma's

* small doc fixes

* adding subclassof filtering

* append alias functionality in KB

* prevent appending the same entity-alias pair

* fix for appending WD aliases

* remove date filter

* remove unnecessary import

* small corrections and reformatting

* remove WD aliases for now (too slow)

* removing numeric entities from training and evaluation

* small fixes

* shortcut during prediction if there is only one candidate

* add counts and fscore logging, remove FP NER from evaluation

* fix entity_linker.predict to take docs instead of single sentences

* remove enumeration sentences from the WP dataset

* entity_linker.update to process full doc instead of single sentence

* spelling corrections and dump locations in readme

* NLP IO fix

* reading KB is unnecessary at the end of the pipeline

* small logging fix

* remove empty files 
bin/wiki_entity_linking/wikidata_train_entity_linker.py