> rdf.sparqlRemote(I reported earlier two example SPARQL queries for chemistry, which can now be rewritten as Bioclipse scripts:
"http://dbpedia.org/sparql",
"select distinct ?Concept where{[] a ?Concept } LIMIT 10"
);
[[http://dbpedia.org/ontology/Place], [http://dbpedia.org/ontology/Area],
[http://dbpedia.org/ontology/City], [http://dbpedia.org/ontology/River],
[http://dbpedia.org/ontology/Road], [http://dbpedia.org/ontology/Lake],
[http://dbpedia.org/ontology/LunarCrater],
[http://dbpedia.org/ontology/ShoppingMall], [http://dbpedia.org/ontology/Park],
[http://dbpedia.org/ontology/SiteOfSpecialScientificInterest]]
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
var sparql = "\ | |
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> \ | |
PREFIX dbpedia: <http://dbpedia.org/ontology/> \ | |
PREFIX dbprop: <http://dbpedia.org/property/> \ | |
\ | |
SELECT DISTINCT ?compound ?smiles WHERE { \ | |
?compound a dbpedia:ChemicalCompound . \ | |
?compound dbprop:section ?section . \ | |
?section dbprop:smiles ?smiles . \ | |
} ORDER BY ?compound LIMIT 10 OFFSET 0 \ | |
"; | |
rdf.sparqlRemote("http://dbpedia.org/sparql", sparql); |
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
var sparql = "\ | |
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> \ | |
PREFIX dbpedia: <http://dbpedia.org/ontology/> \ | |
PREFIX dbprop: <http://dbpedia.org/property/> \ | |
\ | |
SELECT DISTINCT ?compound ?inchi WHERE { \ | |
?compound a dbpedia:ChemicalCompound . \ | |
?compound dbprop:section ?section . \ | |
?section dbprop:inchi ?inchi . \ | |
} ORDER BY ?compound LIMIT 10 OFFSET 0 \ | |
"; | |
rdf.sparqlRemote("http://dbpedia.org/sparql", sparql); |
No comments:
Post a Comment