automated Pipeline for parsing profiles of politically exposed persons (PEP) into Wikidata
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

37 lines
844 B

import os
import yaml
import json
class WikidataPEP(object):
def __init__(self, configFile):
with open(configFile, "r") as stream:
try:
self.config = yaml.safe_load(stream)
except yaml.YAMLError as exc:
print(exc)
def importMembersOfParliamentDict(self, listOfCountries):
self.fullDictionaryMemberLists = {}
for country in listOfCountries:
print('started to parse data of member of ' + country + ' ..')
f = open('crawlers/output/' + country +'MemberList.txt')
text = f.read()
self.fullDictionaryMemberLists[country] = eval(text)
print(self.fullDictionaryMemberLists)