      with bz2.open(WIKIDATA_JSON, mode='rb') as file:
          line = file.readline()
          cnt = 0
          while line and (not limit or cnt < limit):
              if cnt % 100000 == 0:
                  print(datetime.datetime.now(), "processed", cnt, "lines of WikiData dump")
              clean_line = line.strip()
              if clean_line.endswith(b","):
                  clean_line = clean_line[:-1]
              if len(clean_line) > 1:
 
</s>
            if cnt % 500000 == 0:
      with bz2.open(WIKIDATA_JSON, mode='rb') as file:
          line = file.readline()
          cnt = 0
          while line and (not limit or cnt < limit):
            if cnt % 500000 == 0:
                  print(datetime.datetime.now(), "processed", cnt, "lines of WikiData dump")
              clean_line = line.strip()
              if clean_line.endswith(b","):
                  clean_line = clean_line[:-1]
              if len(clean_line) > 1:
keep keep keep keep replace keep keep keep keep keep
 reading all persons in wikidata
examples/pipeline/wikidata_entity_linking.py