  
              entries_by_offset = entries_per_article.get(article_id, dict())
              entries_by_offset[start + "-" + end] = (alias, wp_title)
  
              entries_per_article[article_id] = entries_by_offset
  
      return entries_per_article
  
  
  def read_training(nlp, training_dir, dev, limit, to_print):
 
</s> remove             entries_by_offset = entries_per_article.get(article_id, dict())
            entries_by_offset[start + "-" + end] = (alias, wp_title)
 </s> add                     alias = fields[1]
                    wp_title = fields[2]
                    start = fields[3]
                    end = fields[4]

                    entries_by_offset = entries_per_article.get(article_id, dict())
                    entries_by_offset[start + "-" + end] = (alias, wp_title) </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                     gold_entities = list()
                    for ent in article_doc.ents:
                        start = ent.start_char
                        end = ent.end_char

                        entity_tuple = entries_by_offset.get(str(start) + "-" + str(end), None)
                        if entity_tuple:
                            alias, wp_title = entity_tuple
                            if ent.text != alias:
                                print("Non-matching entity in", article_id, start, end)
                            else:
                                gold_entities.append((start, end, wp_title))

                    if gold_entities:
                        gold = GoldParse(doc=article_doc, links=gold_entities)
                        data.append((article_doc, gold))

                    cnt += 1
                except Exception as e:
                    print("Problem parsing article", article_id)
                    print(e)
                    raise e

    if to_print:
        print()
        print("Processed", cnt, "training articles, dev=" + str(dev))
        print()
 </s> add  </s> remove                                             print("alias (" + lang + "):", item["value"])
 </s> add                                              print("alias (" + lang + "):", item["value"]) </s> remove                     entries_by_offset = entries_per_article.get(article_id, dict())
 </s> add         except Exception as e:
            print("Problem parsing article", article_id)
            print(e)
            raise e
                    entries_per_article[article_id] = entries_by_offset
  
              entries_by_offset = entries_per_article.get(article_id, dict())
              entries_by_offset[start + "-" + end] = (alias, wp_title)
  
                    entries_per_article[article_id] = entries_by_offset
  
      return entries_per_article
  
  
  def read_training(nlp, training_dir, dev, limit, to_print):
keep keep keep keep replace keep keep keep keep keep
 reprocessing all of wikipedia for training data 
examples/pipeline/wiki_entity_linking/training_set_creator.py