> I'm a kind of desperate.
> It tried the complex way of saving inferred properties in the model for
> reuse ... doesn't seem to work.
>
> And the simple and obvious way doensn't work as well. Minimal example:
>
> - Three Persons - Adam, Berta, Cesar are related via transitive property
> "hasAncestor" - Adam with Berta and Berta with Cesar
> - Adam and Cesar are blond via Datatype property "hasBlondHair"
> - this rule should be able to determine whether there are blond ancestors:
> Person(?p1) ? Person(?p2) ? hasAncestor(?p1, ?p2) ? hasBlondHair(?p1,
> true) ? hasBlondHair(?p2, true) ? BlondAncestor(?p1) ? BlondAncestor(?p2)
>
> ... but only if the inferred relation between Adam and Cesar is detected.
>
> But unfortunately it isn't.
>
> Can anyone confirm this?
>
>
> Turtle code:
>
> default:Person
> rdf:type owl:Class .
>
> default:BlondAncestor
> rdf:type owl:Class .
>
> default:hasAncestor
> rdf:type owl:TransitiveProperty , owl:ObjectProperty ;
> rdfs:domain default:Person ;
> rdfs:range default:Person .
>
> default:hasBlondHair
> rdf:type owl:DatatypeProperty ;
> rdfs:domain default:Person ;
> rdfs:range xsd:boolean .
>
> default:Adam
> rdf:type default:Person ;
> default:hasAncestor default:Berta ;
> default:hasBlondHair
> "true"^^xsd:boolean .
>
> default:Berta
> rdf:type default:Person ;
> default:hasAncestor default:Cesar ;
> default:hasBlondHair
> "false"^^xsd:boolean .
>
> default:Cesar
> rdf:type default:Person ;
> default:hasBlondHair
> "true"^^xsd:boolean .
>
>
>
>
> Michael Lodemann schrieb:
>
>> Too early.
>>
>> Saving inferred knowledge obtained from SWRL rules works that way ...
>> but inferred property knowledge e.g. from transitive properties doesn't
>> appear to be saved with the code lines below. I also have following
>> reasoner code before these lines:
>>
>> ReasonerManager reasonerManager = ReasonerManager.getInstance();
>> ProtegeReasoner reasoner =
>> reasonerManager.createProtegeReasoner(owlModel,
>> ProtegePelletOWLAPIReasoner.class);
>> reasoner.initialize();
>> reasoner.computeInferredHierarchy();
>> reasoner.computeInferredIndividualTypes();
>> reasoner.classifyTaxonomy();
>>
>> So, is there a way to persist inferred property knowledge in the model?
>>
>> Cheers,
>> Michael
>>
>>
>> Michael Lodemann schrieb:
>>
>>
>>> I was able to solve this by myself using following code
>>>
>>> SWRLRuleEngineBridge bridge =
>>> BridgeFactory.createBridge("SWRLJessBridge", owlModel);
>>> bridge.infer();
>>>
>>> String filePath =
>>> owlModel.getOWLFilePath().substring(owlModel.getOWLFilePath().indexOf("file:/")+6);
>>> Collection errors = new ArrayList();
>>> owlModel.save(new File(filePath).toURI(), FileUtils.langXMLAbbrev, errors);
>>> System.out.println("File saved with " + errors.size() + " errors.");
>>>
>>> I'm a bit confused because before I only used SQWRLQueryEngine in order
>>> to run all queries and the subsequent rules but it hasn't the abilty of
>>> persisting the inferences, has it?
>>>
>>> Regards,
>>> Michael
>>>
>>>
>>> Michael Lodemann schrieb:
>>>
>>>
>>>
>>>> Hello,
>>>>
>>>> is there a way to transform infered property values (of transitive
>>>> properties) to asserted knowledge via the protege 3.4.1 gui?
>>>> Or how is it possible to use infered property values in SWRL rules? It
>>>> seems to me infered knowledge by transitive properties is not recognized
>>>> and used in S(Q)WRL. Is this true?
>>>>
>>>> Hoping for help,
>>>> Michael
>>>>
> _______________________________________________
> protege-owl mailing list
>
[hidden email]
>
https://mailman.stanford.edu/mailman/listinfo/protege-owl>
> Instructions for unsubscribing:
http://protege.stanford.edu/doc/faq.html#01a.03
>
>