Author: enridaga
Date: Tue Nov 8 12:24:49 2011
New Revision: 798291
Log:
Added documentation for the reasoners module (STANBOL-373)
Modified:
websites/production/stanbol/ (props changed)
websites/production/stanbol/content/stanbol/docs/trunk/reasoners.html
Propchange: websites/production/stanbol/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Nov 8 12:24:49 2011
@@ -1 +1 @@
-/websites/staging/stanbol/trunk:779452-798235
+/websites/staging/stanbol/trunk:779452-798290
Modified: websites/production/stanbol/content/stanbol/docs/trunk/reasoners.html
==============================================================================
--- websites/production/stanbol/content/stanbol/docs/trunk/reasoners.html
(original)
+++ websites/production/stanbol/content/stanbol/docs/trunk/reasoners.html Tue
Nov 8 12:24:49 2011
@@ -48,7 +48,7 @@
<h1 class="title">Reasoners</h1>
<p>The Stanbol Reasoners component provides a set of services that take
advantage of automatic inference engines.</p>
<p>The module implements a common api for reasoning services, providing the
possibility to plug different reasoners and configurations in parallel.</p>
-<p>Actually the module includes OWLApi and Jena based abstract services, with
concrete implementations for Jena RDFS, OWL, OWLMini and HermiT reasoning
service.</p>
+<p>Actually the module includes <a href="http://owlapi.sourceforge.net/"
target="_blank">OWLApi</a> and <a href="http://jena.sourceforge.net/"
target="_blank">Jena</a> based abstract services, with concrete implementations
for Jena RDFS, OWL, OWLMini and HermiT reasoning service.</p>
<p>The Reasoners module expose a REST endpoint at the following location:</p>
<div class="codehilite"><pre><span class="n">http:</span><span
class="sr">//</span><span class="n">localhost:8080</span><span
class="o">/</span><span class="n">reasoners</span>
</pre></div>
@@ -56,15 +56,15 @@
<p>with the following preloaded services:</p>
<ul>
-<li>/rdfs, which is based on Jena RDFS reasoner and supports almost all of the
RDFS entailments.</li>
-<li>/owl, a Jena reasoner configured to support OWL (with some
limitations)</li>
-<li>/owlmini, another Jena configuration that partially supports OWL</li>
+<li><tt>/rdfs</tt>, which is based on Jena RDFS reasoner and supports almost
all of the RDFS <a href="#ref1">[1]</a> entailments.</li>
+<li><tt>/owl</tt>, a Jena reasoner configured to support OWL <a
href="#ref2">[2]</a> (with some limitations, <a href="#ref4">[4]</a>)</li>
+<li><tt>/owlmini</tt>, another Jena configuration that partially supports OWL
(see <a href="#ref5">[5]</a>)</li>
</ul>
-<p>In addition, it is also available a service which uses the HermiT reasoner
to exploit the full OWL2 specification.</p>
+<p>In addition, it is also available a service which uses the HermiT <a
href="#ref6">[6]</a> reasoner to exploit the full OWL 2 <a href="#ref3">[3]</a>
specification.</p>
<p>Each reasoner can be accessed with one of three tasks:</p>
<ul>
-<li>check: to perform a consistency check. This service returns HTTP Status
200 if data is consistent, 204 otherwise (at the current state of
implementation the service does not include an explanation about why the input
is inconsistent. This feature is in our �todo� list, by the way)</li>
-<li>classify: to materialize all inferred rdf:type statements.</li>
+<li>check: to perform a consistency check. This service returns HTTP Status
<tt>200</tt> if data is consistent, <tt>204</tt> otherwise (at the current
state of implementation the service does not include an explanation about why
the input is inconsistent. This feature is in our todo list, by the way)</li>
+<li>classify: to materialize all inferred <tt>rdf:type</tt> statements.</li>
<li>enrich: to materialize all inferred statements.</li>
</ul>
<p>For example:</p>
@@ -139,9 +139,7 @@ We will obtain, in this case, that both
<ex:Developer rdf:about="#enridaga" />
<ex:Developer rdf:about="#ogrisel" />
<ex:Developer rdf:about="#alexdma" /></p>
-<p><!-- We know:</p>
-<h1 id="alexdma_workedtogheter_enridaga_and_ogrisel">alexdma #workedTogheter
#enridaga and #ogrisel</h1>
-<p>-->
+<p><!-- We know: #alexdma #workedTogheter #enridaga and #ogrisel -->
<rdf:Description rdf:about="#alexdma">
<workedTogheter rdf:resource="#ogrisel"/>
<workedTogheter rdf:resource="#enridaga"/>
@@ -210,7 +208,7 @@ The <tt>/owlmini</tt> implements the OWL
</owl:Class>
</pre>
<a
href="https://raw.github.com/enridaga/reasoners.examples/master/enridaga.reasoners.examples/owl/some-values-from.xml"
target="_blank">download it</a></p>
-<p>We expect an OWL reasoner to state that John is an <tt>Employee</tt>. This
example does not work with <tt>/rdfs</tt> (it ignores the OWL semantics), and
does not work with <tt>/owlmini</tt>, because the Jena OWL(mini) reasoner omits
the forward entailments for <tt>owl:someValuesFrom restrictions</tt> (see [<a
href="#ref4">4</a>]). It works correctly if we use the service
<tt>/owl</tt>.</p>
+<p>We expect an OWL reasoner to state that John is an <tt>Employee</tt>. This
example does not work with <tt>/rdfs</tt> (it ignores the OWL semantics), and
does not work with <tt>/owlmini</tt>, because the Jena OWL(mini) reasoner omits
the forward entailments for <tt>owl:someValuesFrom restrictions</tt> (see <a
href="#ref4">[4]</a>). It works correctly if we use the service
<tt>/owl</tt>.</p>
<p>The <tt>/owl</tt> service support the most of the semantic of OWL. The
HermiT reasoner is based on <a href="http://owlapi.sourceforge.net/">OWLApi</a>
and is an example of a DL reasoner. It fully covers OWL and OWL2, which
introduces lot of interesting features. Here is an example:
<pre style="overflow: auto">
<!-- any Employee must have some features: firstname, familyname, email
@@ -275,24 +273,27 @@ The <tt>/owlmini</tt> implements the OWL
<firstname>Enrico</firstname>
<familyname>Daga</familyname>
<email>[email protected]</email>
- <worksAt rdf:resource="#Catania" /></p>
-<div class="codehilite"><pre><span class="o">&</span><span
class="ow">lt</span><span class="p">;</span><span class="o">!--</span> <span
class="n">If</span> <span class="n">you</span> <span class="n">uncomment</span>
<span class="n">the</span> <span class="n">two</span> <span
class="n">statements</span> <span class="n">below</span> <span
class="n">you</span> <span class="n">will</span> <span class="n">obtain</span>
<span class="n">an</span> <span class="n">inconsistency</span><span
class="p">,</span>
- <span class="n">because</span> <span class="c1">#Moricone is not an
allowed place for developers --&gt;</span>
-<span class="o">&</span><span class="ow">lt</span><span
class="p">;</span><span class="o">!--</span> <span class="o">&</span><span
class="ow">lt</span><span class="p">;</span><span class="n">worksAt</span>
<span class="n">rdf:resource</span><span class="o">=</span><span
class="s">"#Moricone"</span> <span class="o">/&</span><span
class="ow">gt</span><span class="p">;</span> <span class="o">&</span><span
class="ow">lt</span><span class="p">;</span><span class="n">rdf:type</span>
<span class="n">rdf:resource</span><span class="o">=</span><span
class="s">"#Employee"</span>
- <span class="o">/&</span><span class="ow">gt</span><span
class="p">;</span> <span class="o">--&</span><span
class="ow">gt</span><span class="p">;</span>
-</pre></div>
-
-
-<p></Person>
+ <worksAt rdf:resource="#Catania" />
+ <!-- If you uncomment the two statements below you will obtain an
inconsistency,
+ because #Moricone is not an allowed place for developers -->
+ <!-- <worksAt rdf:resource="#Moricone" /> <rdf:type
rdf:resource="#Employee"
+ /> -->
+</Person>
</pre>
<a
href="https://raw.github.com/enridaga/reasoners.examples/master/enridaga.reasoners.examples/owl2/class-restrictions-owl2.xml"
target="_blank">download it</a></p>
<p>The above differences depend on the semantic supported by the specific
reasoner and from the implementation, which limit the power of the system in
favour of a better efficiency (is the case of the <tt>/owlmini</tt>
implementation of Jena, more efficient then the respective <tt>/owl</tt>). If
you need to work with RDFS semantic, and don't need OWL for your inferences,
just use the RDFS one.</p>
<h2 id="build_and_install">Build and install</h2>
<p>Run Stanbol, for example:</p>
-<p>% java -jar -Xmx1g
org.apache.stanbol.launchers.full-0.9.0-incubating-SNAPSHOT.jar</p>
+<div class="codehilite"><pre><span class="nv">$</span> <span
class="nv">java</span> <span class="o">-</span><span class="n">jar</span> <span
class="o">-</span><span class="n">Xmx1g</span> <span class="n">org</span><span
class="o">.</span><span class="n">apache</span><span class="o">.</span><span
class="n">stanbol</span><span class="o">.</span><span
class="n">launchers</span><span class="o">.</span><span
class="n">full</span><span class="o">-</span><span class="mf">0.9.0</span><span
class="o">-</span><span class="n">incubating</span><span
class="o">-</span><span class="n">SNAPSHOT</span><span class="o">.</span><span
class="n">jar</span>
+</pre></div>
+
+
<p>You must have the Ontonet and Rules modules already installed (they are if
you have followed the above example).
-Move to the /reasoners directory, then run</p>
-<p>% mvn install -PinstallBundle -Dsling.url=<the path to your running Felix
administration console></p>
+Move to the <tt>/reasoners</tt> directory, then run</p>
+<div class="codehilite"><pre><span class="nv">$</span> <span
class="nv">mvn</span> <span class="n">install</span> <span
class="o">-</span><span class="n">PinstallBundle</span> <span
class="o">-</span><span class="n">Dsling</span><span class="o">.</span><span
class="n">url</span><span class="o">=&</span><span
class="ow">lt</span><span class="p">;</span><span class="n">the</span> <span
class="n">path</span> <span class="n">to</span> <span class="n">your</span>
<span class="n">running</span> <span class="n">Felix</span> <span
class="n">administration</span> <span class="n">console</span><span
class="o">&</span><span class="ow">gt</span><span class="p">;</span>
+</pre></div>
+
+
<p>for example</p>
<p>% mvn install -PinstallBundle http://localhost:8080/system/console</p>
<h3 id="add_the_hermit_reasoner">Add the HermiT reasoner</h3>
@@ -303,6 +304,15 @@ Move to the /reasoners directory, then r
</pre></div>
+<h2 id="references">References:</h2>
+<ul>
+<li>[1] <a name="ref1" href="http://www.w3.org/TR/rdf-schema/"
target="_blank">RDFS</a></li></li>
+<li>[2] <a name="ref2" href="http://www.w3.org/TR/owl-features/"
target="_blank">OWL</a></li></li>
+<li>[3] <a name="ref3" href="http://www.w3.org/TR/owl2-overview/"
target="_blank">OWL 2</a></li></li>
+<li>[4] <a name="ref4" href="http://jena.sourceforge.net/inference/"
target="_blank">Jena inference support</a></li></li>
+<li>[5] <a name="ref5" href="http://jena.sourceforge.net/inference/#OWLnotes"
target="_blank">Jena OWL notes</a></li></li>
+<li>[6] <a name="ref6" href="http://hermit-reasoner.com/"
target="_blank">HermiT</a></li>
+</ul>
<hr />
<p><em><a href="index.html">Back to index</a></em></p>
</div>