      # create training dataset
      create_wp_training = False
  
      # train the EL pipe
      train_pipe = False
      measure_performance = False
  
      # test the EL pipe on a simple example
      to_test_pipeline = False
  
      # write the NLP object, read back in and test again
 
</s> remove     to_test_pipeline = False
 </s> add     to_test_pipeline = True </s> remove     to_read_kb = False
 </s> add     to_read_kb = True </s> remove     to_create_kb = True
 </s> add     to_create_kb = False </s> remove def read_training(nlp, training_dir, dev, limit, to_print):
    # This method will provide training examples that correspond to the entity annotations found by the nlp object
    entries_per_article = read_training_entities(training_output=training_dir)
 </s> add def read_training(nlp, training_dir, dev, limit):
    # This method provides training examples that correspond to the entity annotations found by the nlp object

    print("reading training entities")
    entries_per_article = read_training_entities(training_output=training_dir, dev=dev, limit=limit)
    print("done reading training entities") </s> remove     cnt = 0
    files = listdir(training_dir)
    for f in files:
        if not limit or cnt < limit:
            if dev == run_el.is_dev(f):
                article_id = f.replace(".txt", "")
                if cnt % 500 == 0 and to_print:
                    print(datetime.datetime.now(), "processed", cnt, "files in the training dataset")

                try:
                    # parse the article text
                    with open(os.path.join(training_dir, f), mode="r", encoding='utf8') as file:
                        text = file.read()
                        article_doc = nlp(text)
 </s> add             if gold_entities:
                gold = GoldParse(doc=article_doc, links=gold_entities)
                data.append((article_doc, gold))
    train_pipe = True
    measure_performance = True
      # create training dataset
      create_wp_training = False
  
      # train the EL pipe
    train_pipe = True
    measure_performance = True
    train_pipe = True
    measure_performance = True
  
      # test the EL pipe on a simple example
      to_test_pipeline = False
  
      # write the NLP object, read back in and test again
keep keep keep keep replace replace keep keep keep keep keep
 reprocessing all of wikipedia for training data 
examples/pipeline/wiki_entity_linking/wiki_nel_pipeline.py