This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## verex list | |
SELECT p.page_id, p.page_title | |
FROM page p | |
WHERE p.page_namespace=0 | |
INTO OUTFILE '/tmp/vertices.tsv' | |
FIELDS TERMINATED BY ' '; | |
## edge list | |
SELECT l.pl_from, p.page_id | |
FROM page p, pagelinks l |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from SPARQLWrapper import SPARQLWrapper, JSON | |
sparql = SPARQLWrapper("http://localhost:8890/sparql") | |
for i in range(25): | |
query = """ | |
select ?slabel ?olabel | |
where { | |
?s rdfs:subClassOf ?o. | |
?s rdf:type owl:Class. | |
?o rdf:type owl:Class. |
NewerOlder