Commit 691d467a authored by Pokiros's avatar Pokiros
Browse files

debug boundaries

parent 3096a639
No related merge requests found
Showing with 5 additions and 7 deletions
+5 -7
...@@ -12,12 +12,10 @@ class WikipediaURI(Process): ...@@ -12,12 +12,10 @@ class WikipediaURI(Process):
self.uri_miss = json.load(open(wiki_uri_file,encoding = 'utf-8')) self.uri_miss = json.load(open(wiki_uri_file,encoding = 'utf-8'))
self.uri_miss=set(self.uri_miss) self.uri_miss=set(self.uri_miss)
self.outfile = open(file_name,'w',encoding = 'utf-8') self.outfile = open(file_name,'w',encoding = 'utf-8')
self.geoname_prop = Property("P1566", False, ExternalIdentifier())
def processItem(self,entry): def processItem(self,entry):
if self.geoname_prop.exists(entry): siteLinks = entry['sitelinks']
siteLinks = entry['sitelinks'] for link in siteLinks:
for link in siteLinks: rn = link.rstrip('wiki')+':'+siteLinks[link]['title']
rn = link.rstrip('wiki')+':'+siteLinks[link]['title'] if rn in self.uri_miss:
if rn in self.uri_miss: self.outfile.write(rn + "\t" + entry['id']+'\n')
self.outfile.write(rn + "\t" + entry['id']+'\n')
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment