↧
Answer by logi-kal for How to harvest wikidata for generating an ontology...
The following iterates over your output DataFrame and populates the ontology with subclass assertions:from owlready2 import *import redef get_entity_id(iri) : return re.sub(r".*[#/\\]", "", iri)def...
View ArticleHow to harvest wikidata for generating an ontology with owlready (python)?
With the help e.g. of wikidata_query(...) it is simple to perform queries to wikidata from python:E.g.q = """SELECT ?item ?itemLabel WHERE { ?item wdt:P279 wd:Q125977. SERVICE wikibase:label {...
View Article