1 / 11

Corese

Corese. olivier.corby@inria.fr. Corese/KGRAM. Corese : Conceptual Resource Search Engine KGRAM: Knowledge Graph Abstract Machine h ttp://wimmics.inria.fr/corese RDF/S & SPARQL KGRAM: SPARQL 1.1 Interpreter Java 1.6 Design by Wimmics team @ Inria /I3S. Goodies. SPARQL 1.1

meghan
Download Presentation

Corese

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Corese olivier.corby@inria.fr

  2. Corese/KGRAM Corese: Conceptual Resource SearchEngine KGRAM: Knowledge Graph Abstract Machine http://wimmics.inria.fr/corese • RDF/S & SPARQL • KGRAM: SPARQL 1.1 Interpreter • Java 1.6 • Design by Wimmics team @ Inria/I3S

  3. Goodies • SPARQL 1.1 • XPath and SQL • Path variable, length, enumeration • Approximatesearch • Pragma • RDF Graph as Query Graph • Queryseveral graphs • DistributedQuery • SPARQL Templates for RDF Pretty Printing • InferenceRuleEngine

  4. Corese API : Create a Graph import fr.inria.edelweiss.kgraph.core.*; Graph g = Graph.create(); // with RDFS entailments: Graph g = Graph.create(true);

  5. Corese API : Load RDF/S & Rule Load ld = Load.create(g); ld.load("/home/kb/schema.rdfs"); ld.load("/home/kb/rule.rul"); ld.load("/home/kb/data.rdf"); ld.load("/home/kb/graph.ttl");

  6. Corese API : Query QueryProcess exec = QueryProcess.create(g); String query = "prefix c: <http://www.inria.fr/schema#> " + "select * where {?x c:name ?n}" ; try { Mappings map = exec.query(query); } catch (EngineException e){}

  7. Corese API : Debug Query String query = "prefix c: <http://www.inria.fr/schema#>" + "select debug * where {?x c:name ?n}" ;

  8. Corese API : Result Mappingsmap = exec.query(q); for (Mapping m : map) { IDatatypedt = (IDatatype) m.getValue("?x"); dt.stringValue(); dt.intValue(); dt.doubleValue(); }

  9. Corese API : Pretty Print Result ResultFormat f = ResultFormat.create(map); System.out.println(f); // XML Result (select where) // RDF Result (construct where)

  10. Corese API : Pretty Print Graph TripleFormat f = TripleFormat.create(g); System.out.println(f); // Triple Format

  11. Inference Rules ld.load("data.rul"); RuleEngine re = ld.getRuleEngine(); re.process();   g.addEngine(re); g.process();

More Related