1 / 7

OWL Inferencing – don ’ t copy this demo from a PDF, it won ’ t work – use the PPT file instead

OWL Inferencing – don ’ t copy this demo from a PDF, it won ’ t work – use the PPT file instead. -- If you don ’ t have an RDS_DATA_TABLE in your user account, uncomment the following two lines the first time you run this. -- CREATE TABLE RDF_DATA_TABLE( id NUMBER, triple SDO_RDF_TRIPLE_S);

archer
Download Presentation

OWL Inferencing – don ’ t copy this demo from a PDF, it won ’ t work – use the PPT file instead

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. OWL Inferencing – don’t copy this demo from a PDF, it won’t work – use the PPT file instead -- If you don’t have an RDS_DATA_TABLE in your user account, uncomment the following two lines the first time you run this. -- CREATE TABLE RDF_DATA_TABLE( id NUMBER, triple SDO_RDF_TRIPLE_S); -- EXEC SEM_APIS.CREATE_RDF_MODEL('RDF_MODEL_CS345_UTEId', 'RDF_DATA_TABLE', 'triple'); TRUNCATE TABLE "RDF_DATA_TABLE" drop storage; DROP SEQUENCE RDF_DATA_TABLE_SQNC; CREATE SEQUENCE RDF_DATA_TABLE_SQNC START WITH 1 NOCACHE; INSERT INTO RDF_DATA_TABLE VALUES ( RDF_DATA_TABLE_SQNC.nextval, SDO_RDF_TRIPLE_S('RDF_MODEL_CS345_PROF1:<http://www.example.org/people.owl>', '<http://www.example.org/people.owl#OBJECT>', 'rdf:type', 'rdfs:Class')); INSERT INTO RDF_DATA_TABLE VALUES ( RDF_DATA_TABLE_SQNC.nextval, SDO_RDF_TRIPLE_S('RDF_MODEL_CS345_PROF1:<http://www.example.org/people.owl>', '<http://www.example.org/people.owl#ANIMAL>', 'rdf:type', 'rdfs:Class'));

  2. OWL Inferencing INSERT INTO RDF_DATA_TABLE VALUES ( RDF_DATA_TABLE_SQNC.nextval, SDO_RDF_TRIPLE_S('RDF_MODEL_CS345_PROF1:<http://www.example.org/people.owl>', '<http://www.example.org/people.owl#ANIMAL>', 'rdfs:subClassOf', '<http://www.example.org/people.owl#OBJECT>')); INSERT INTO RDF_DATA_TABLE VALUES ( RDF_DATA_TABLE_SQNC.nextval, SDO_RDF_TRIPLE_S('RDF_MODEL_CS345_PROF1:<http://www.example.org/people.owl>', '<http://www.example.org/people.owl#CAT>', 'rdf:type', 'rdfs:Class')); INSERT INTO RDF_DATA_TABLE VALUES ( RDF_DATA_TABLE_SQNC.nextval, SDO_RDF_TRIPLE_S('RDF_MODEL_CS345_PROF1:<http://www.example.org/people.owl>', '<http://www.example.org/people.owl#CAT>', 'rdfs:subClassOf', '<http://www.example.org/people.owl#ANIMAL>')); INSERT INTO RDF_DATA_TABLE VALUES ( RDF_DATA_TABLE_SQNC.nextval, SDO_RDF_TRIPLE_S('RDF_MODEL_CS345_PROF1:<http://www.example.org/people.owl>', '<http://www.example.org/people.owl#i5>', 'rdf:type', '<http://www.example.org/people.owl#CAT>')); INSERT INTO RDF_DATA_TABLE VALUES ( RDF_DATA_TABLE_SQNC.nextval, SDO_RDF_TRIPLE_S('RDF_MODEL_CS345_PROF1:<http://www.example.org/people.owl>', '<http://www.example.org/people.owl#i5>', '<http://www.example.org/people.owl#value>', '"101"^^xsd:integer')); Commit;

  3. OWL Inferencing -- named graph local inference (NGLI) BEGIN sem_apis.create_entailment( 'RDF_ENT_CS345_PROF1', models_in => sem_models('RDF_MODEL_CS345_PROF1'), rulebases_in => sem_rulebases('owl2rl'), passes => SEM_APIS.REACH_CLOSURE, inf_components_in => null, options => 'LOCAL_NG_INF=T' ); END; /

  4. OWL Inferencing select g, s, p, o from table(sem_match('{graph ?g {?s ?p ?o}}', sem_models('RDF_MODEL_CS345_PROF1'),sem_rulebases('owl2rl'),null,null)) MINUS select g, s, p, o from table(sem_match('{graph ?g {?s ?p ?o}}', sem_models('RDF_MODEL_CS345_PROF1'),null,null,null)) Returns: http://www.example.org/people.owl http://www.example.org/people.owl#CAT http://www.w3.org/2000/01/rdf-schema#subClassOf http://www.example.org/people.owl#OBJECT http://www.example.org/people.owl http://www.example.org/people.owl#i5 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.example.org/people.owl#ANIMAL http://www.example.org/people.owl http://www.example.org/people.owl#i5 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.example.org/people.owl#OBJECT

  5. OWL Inferencing SEM_MODELS('RDF_MODEL_CS345_prof1'), null, SEM_ALIASES( SEM_ALIAS('', 'http://www.example.org/people.owl#')), null) ) SELECT value from table( sem_match('select * where { ?indiv rdf:type :CAT. ?indiv :value ?value . }', SEM_MODELS('RDF_MODEL_CS345_prof1'), sem_rulebases('owl2rl'), SEM_ALIASES( SEM_ALIAS('', 'http://www.example.org/people.owl#')), null) ) Returns: Value 101

  6. OWL Inferencing SEM_MODELS('RDF_MODEL_CS345_prof1'), null, SEM_ALIASES( SEM_ALIAS('', 'http://www.example.org/people.owl#')), null) ) SELECT value from table( sem_match('select * where { ?indiv rdf:type :ANIMAL. ?indiv :value ?value . }', SEM_MODELS('RDF_MODEL_CS345_prof1'), sem_rulebases('owl2rl'), SEM_ALIASES( SEM_ALIAS('', 'http://www.example.org/people.owl#')), null) ) Returns: Value 101

  7. OWL Inferencing SEM_MODELS('RDF_MODEL_CS345_prof1'), null, SEM_ALIASES( SEM_ALIAS('', 'http://www.example.org/people.owl#')), null) ) SELECT value from table( sem_match('select * where { ?indiv rdf:type :OBJECT. ?indiv :value ?value . }', SEM_MODELS('RDF_MODEL_CS345_prof1'), sem_rulebases('owl2rl'), SEM_ALIASES( SEM_ALIAS('', 'http://www.example.org/people.owl#')), null) ) Returns: Value 101

More Related