def __init__(self, sparql_endpoint=None, thread_limiter=4):
"""Creates the dataset class
The default endpoint is the original from wikidata.
:param string sparql_endpoint: The URI of the SPARQL endpoint
:param integer thread_limiter: The number of concurrent HTTP queries
"""
if sparql_endpoint is not None:
self.SPARQL_ENDPOINT = sparql_endpoint
self.th_semaphore = threading.Semaphore(thread_limiter)
# self.query_sem = threading.Semaphore(thread_limiter)
# Instanciate splited subs as false
self.splited_subs = {'updated': False}
评论列表
文章目录