OWL Inferencing – don
This presentation is the property of its rightful owner.
Sponsored Links
1 / 7

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


  • 68 Views
  • Uploaded on
  • Presentation posted in: General

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);

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


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);

-- 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'));


Owl inferencing don t copy this demo from a pdf it won t work use the ppt file instead

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;


Owl inferencing don t copy this demo from a pdf it won t work use the ppt file instead

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;

/


Owl inferencing don t copy this demo from a pdf it won t work use the ppt file instead

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.owlhttp://www.example.org/people.owl#CAThttp://www.w3.org/2000/01/rdf-schema#subClassOf

http://www.example.org/people.owl#OBJECT

http://www.example.org/people.owlhttp://www.example.org/people.owl#i5http://www.w3.org/1999/02/22-rdf-syntax-ns#type

http://www.example.org/people.owl#ANIMAL

http://www.example.org/people.owlhttp://www.example.org/people.owl#i5http://www.w3.org/1999/02/22-rdf-syntax-ns#type

http://www.example.org/people.owl#OBJECT


Owl inferencing don t copy this demo from a pdf it won t work use the ppt file instead

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


Owl inferencing don t copy this demo from a pdf it won t work use the ppt file instead

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


Owl inferencing don t copy this demo from a pdf it won t work use the ppt file instead

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


  • Login