2012/5/30 Matt Mahoney <
mattma...@gmail.com>:
> On Tue, May 29, 2012 at 10:20 PM, YKY (Yan King Yin, 甄景贤)
> <
generic.in...@gmail.com> wrote:
>> Hey Jean-Marc (and others):
>>
>> I have a question -- is it possible to use an existing ontology without
>> actually storing the ontology data in Genifer's KB? Would the 3rd-party
>> ontology be served over the net? Or we install it locally at our server, so
>> Genifer talks to it locally? The access speed must be fast because a lot of
>> inference depends on it...
An ontology is not necessarily big, but I cannot imagine how to use it
without having it in the KB.
What I'm doing in my project (EulerGUI) is using generic rules in N3
language for the OWL 2 RL (large) subset of OWL.
These generic rules work by interpreting domain specific ontologies and facts .
Here is a sample of these rules:
{?P @has owl:inverseOf ?Q. ?S ?P ?O} => {?O ?Q ?S}.
{?P @has rdf:type owl:SymmetricProperty. ?S ?P ?O} => {?O ?P ?S}.
{?P @has rdf:type owl:TransitiveProperty. ?X ?P ?O. ?S ?P ?X} => {?S ?P ?O}.
{?R @has owl:onProperty ?P; owl:hasValue ?Y. ?X a ?R} => {?X ?P ?Y}.
{?P @has rdf:type owl:InverseFunctionalProperty. ?X ?P ?O. ?Y ?P ?O}
=> {?X owl:sameAs ?Y}.
{?P @has rdf:type owl:FunctionalProperty. ?S ?P ?X. ?S ?P ?Y} => {?X
owl:sameAs ?Y}.
{?L rdf:first ?A; rdf:rest ?B. ?M rdf:first ?C; rdf:rest ?D. ?A
owl:sameAs ?C. ?B owl:sameAs ?D} => {?L owl:sameAs ?M}.
{?C1 @has owl:equivalentClass ?A. ?A owl:onProperty ?P1;
owl:someValuesFrom ?C3. ?P1 @has rdfs:domain ?C1; @has rdfs:range ?C3;
@has rdf:type owl:FunctionalProperty; owl:inverseOf ?P9. ?C1 @has
owl:equivalentClass ?B. ?B owl:onProperty ?P3; owl:someValuesFrom ?C5.
?P3 @has rdfs:domain ?C1; @has rdfs:range ?C5; @has rdf:type
owl:FunctionalProperty; owl:inverseOf ?P7. ?C5 @has
owl:equivalentClass ?C. ?C owl:onProperty ?P2; owl:someValuesFrom ?C3.
?P2 @has rdfs:domain ?C5; @has rdfs:range ?C3; @has rdf:type
owl:FunctionalProperty; owl:inverseOf ?P8. ?C5 @has
owl:equivalentClass ?D. ?D owl:onProperty ?P7; owl:cardinality ?X1.
?X1 @has owl:sameAs ?Y1. ?C3 @has owl:equivalentClass ?F. ?F
owl:onProperty ?P8; owl:cardinality ?X2. ?X2 @has owl:sameAs ?Y2. ?C3
@has owl:equivalentClass ?G. ?G owl:onProperty ?P9; owl:cardinality
?X3. ?C3 @has owl:oneOf ?E. ?E rdf:first ?Z; rdf:rest rdf:nil. (?Y1
?Y2) math:product ?Z3. ?Z3 math:equalTo ?Y3} => {?X3 owl:sameAs ?Y3}.
{?C1 @has owl:equivalentClass ?A. ?A owl:onProperty ?P1;
owl:someValuesFrom ?C3. ?P1 @has rdfs:domain ?C1; @has rdfs:range ?C3;
@has rdf:type owl:FunctionalProperty; owl:inverseOf ?P9. ?C1 @has
owl:equivalentClass ?B. ?B owl:onProperty ?P3; owl:someValuesFrom ?C5.
?P3 @has rdfs:domain ?C1; @has rdfs:range ?C5; @has rdf:type
owl:FunctionalProperty; owl:inverseOf ?P7. ?C5 @has
owl:equivalentClass ?C. ?C owl:onProperty ?P2; owl:someValuesFrom ?C3.
?P2 @has rdfs:domain ?C5; @has rdfs:range ?C3; @has rdf:type
owl:FunctionalProperty; owl:inverseOf ?P8. ?C5 @has
owl:equivalentClass ?D. ?D owl:onProperty ?P7; owl:cardinality ?X1.
?C3 @has owl:equivalentClass ?F. ?F owl:onProperty ?P8;
owl:cardinality ?X2. ?C3 @has owl:equivalentClass ?G. ?G
owl:onProperty ?P9; owl:cardinality ?X3. ?X3 @has owl:sameAs ?Y3. ?C3
@has owl:oneOf ?E. ?E rdf:first ?Z; rdf:rest rdf:nil. ?O @has
owl:oneOf ?L1. ?L1 :item ?X1, ?X2. ?O @has owl:oneOf ?L2. ?L2 :item
?Z1, ?Z2. (?Y3 ?Y2) math:integerQuotient ?Y1} => {?Z2 owl:sameAs ?Y2}.
{?X log:notEqualTo ?Y. ?A owl:distinctMembers ?L. ?L :item ?X, ?Y} =>
{?X owl:differentFrom ?Y}.
{?A @has owl:disjointWith ?B. ?X a ?A. ?Y a ?B } => {?X owl:differentFrom ?Y}.
{?A rdfs:subPropertyOf ?B. ?B rdfs:subPropertyOf ?A} => {?A
owl:equivalentProperty ?B}.
{?A owl:inverseOf ?C. ?B owl:inverseOf ?C} => {?A rdfs:subPropertyOf ?B}.
The rest is here :
https://eulersharp.svn.sourceforge.net/svnroot/eulersharp/trunk/2003/03swap/owl-rules.n3
> Wouldn't an ontology have to be learned from the environment?
That's a good idea.
On the other hand, the environment today includes data sources coming
with their ontologies, like dbpedia and all the rest in the Linked
Open Data:
http://linkeddata.org/
>
> -- Matt Mahoney,
mattma...@gmail.com