11# Think Pudding
2- A minimal proof of concept reasoner example.
2+ A minimal proof of concept reasoner and ontology example.
33
44## Description
5- The minimal.owl ontology is rdf/xml formatted, and contains a single SWRL rule/
6- That rule specifies that a Candidate that hasColor(Red) is an acceptable Candidate.
5+ The minimal.owl ontology is rdf/xml formatted, and contains a single SWRL rule.
6+ That rule specifies that a Candidate that hasColor(Red) is an AcceptableCandidate.
7+ ```
8+ Candidate(?c) ^ hasColor(?c, Red) -> AcceptableCandidate(?c)
9+ ```
710There is a named individual Color "Red".
811The named individual candidate "Foo".
912Foo hasColor Red in this ontology, and reasoners should infer that Foo is an AcceptableCandidate.
1013
1114## Use
1215
13- ### OwlTools Command Line
14-
15- ```
16- owltools minimal.owl --reasoner hermit --run-reasoner --assert-implied
17- ```
18-
1916### StarDog Command Line
20-
2117Start up & demonstrate
2218```
2319# Start server and create database
2420stardog-admin server start
2521stardog-admin db create -n 'mydb' minimal.owl
2622
27- # Query without reasoning
28- stardog query mydb "select distinct * where { ?s ?p ?o } limit 10"
23+ # Query without reasoning will return no results
24+ stardog query mydb acceptable.sparql
2925
30- # Query with reasoning
31- stardog query mydb "select distinct * where { ?s ?p ?o } limit 10"
26+ # +---------+
27+ # | subject |
28+ # +---------+
29+ # +---------+
30+
31+ # Query with reasoning will return single result, :Foo
32+ stardog query --reasoning acceptable.sparql
33+
34+ # +---------+
35+ # | subject |
36+ # +---------+
37+ # | :Foo |
38+ # +---------+
3239```
3340
3441Cleanup & shutdown
@@ -37,6 +44,14 @@ stardog-admin db drop mydb
3744stardog-admin server stop
3845```
3946
47+ ### OwlTools Command Line
48+ The owltools does not make the inference that Foo is an AcceptableCandidate.
49+
50+ ```
51+ owltools minimal.owl --reasoner hermit --run-reasoner --assert-implied
52+ ```
53+
54+
4055## Requirements
4156- owltools
4257- StarDog Community
0 commit comments