Author: buildbot
Date: Mon Jun 2 07:12:41 2014
New Revision: 910861
Log:
Staging update by buildbot for stanbol
Added:
websites/staging/stanbol/trunk/content/presentations/Topic-Classification.pdf
(with props)
Modified:
websites/staging/stanbol/trunk/content/ (props changed)
websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/engines/dereference.html
websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/engines/entityhubdereference.html
websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/engines/index.html
websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/enhancementproperties.html
Propchange: websites/staging/stanbol/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Mon Jun 2 07:12:41 2014
@@ -1 +1 @@
-1597033
+1599100
Modified:
websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/engines/dereference.html
==============================================================================
---
websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/engines/dereference.html
(original)
+++
websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/engines/dereference.html
Mon Jun 2 07:12:41 2014
@@ -131,6 +131,7 @@ referenced by the Enhancement Results an
<li>In settings where a partial local cache for an otherwise slow data source
exists. In this case one can configure two Entity Dereference Engines for the
same data source. First one with <em>Fallback Mode</em> deactivated for the
partial cache and a second with enabled <em>Fallback Mode</em> for the original
but slower datasource.</li>
</ol>
</li>
+<li><strong>Dereference Properties</strong>
<em>(enhancer.engines.dereference.references)</em>: The list of properties that
reference Entities. By default <code>fise:entity-reference</code> is used. A
Triple pattern <code>(null,{entity-reference},null)</code> is used for all
configured property URIs. All unique objects of type URI are considered as
entities to be dereferenced. <em>NOTE</em> that configured <em>URI Prefix</em>
and/or an <em>URI Pattern</em> are also applied to the list of entity uris.
</li>
<li><strong>Dereference Languages</strong>
<em>(enhancer.engines.dereference.languages)</em>: A set of languages that are
dereferenced. Even if <em>'Dereference only Content Language Literals'</em> is
active explicitly configured languages will still get dereferenced. If not
present and <em>'Dereference only Content Language Literals'</em> is
deactivated literals of any language will get dereferenced.</li>
<li><strong>Dereference only Content Language Literals</strong>
<em>(enhancer.engine.dereference.filterContentlanguages)</em>: If enabled only
Literals with the same language as the language detected for the Content will
get dereferenced. Literals with no language tag will always get
dereferenced.</li>
<li><strong>Dereferenced Fields</strong>
<em>(enhancer.engines.dereference.fields)</em>: The dereferenced fields - in
RDF terminology 'properties' - to be dereferenced. Typically QNames (e.g.
<code>rdf:label</code>) can be used for the configuration. However support for
QNames is optional. Some Implementations might also support wildcards and
exclusions.</li>
@@ -177,6 +178,23 @@ referenced by the Enhancement Results an
</pre></div>
+<p>For the initialization of the custom <code>DereferenceContext</code> one
need to use the <code>initialise</code> callback</p>
+<div class="codehilite"><pre><span class="kd">public</span> <span
class="kd">class</span> <span class="nc">MyDereferenceContext</span> <span
class="kd">extends</span> <span class="n">DereferenceContext</span> <span
class="o">{</span>
+
+ <span class="kd">protected</span> <span
class="nf">MyDereferenceContext</span><span class="o">(</span><span
class="n">MyDereferenceEngine</span> <span class="n">engine</span><span
class="o">,</span>
+ <span class="n">Map</span><span class="o"><</span><span
class="n">String</span><span class="o">,</span><span
class="n">Object</span><span class="o">></span> <span
class="n">enhancementProps</span><span class="o">)</span> <span
class="kd">throws</span> <span
class="n">DereferenceConfigurationException</span> <span class="o">{</span>
+ <span class="kd">super</span><span class="o">(</span><span
class="n">engine</span><span class="o">,</span> <span
class="n">enhancementProps</span><span class="o">);</span>
+ <span class="o">}</span>
+
+ <span class="nd">@Override</span>
+ <span class="kd">protected</span> <span class="kt">void</span> <span
class="nf">initialise</span><span class="o">()</span> <span
class="kd">throws</span> <span
class="n">DereferenceConfigurationException</span> <span class="o">{</span>
+ <span class="c1">//do your custom initialisation here</span>
+ <span class="o">}</span>
+
+<span class="o">}</span>
+</pre></div>
+
+
<p>If you apply this code all calls to
<code>EntityDereferencer#dereference(..)</code> will parse an instance of the
custom <code>DereferenceContext</code> implementation.</p>
<p>The custom <a
href="http://svn.apache.org/repos/asf/stanbol/trunk/enhancement-engines/dereference/entityhub/src/main/java/org/apache/stanbol/enhancer/engines/dereference/entityhub/EntityhubDereferenceContext.java">DereferenceContext</a>
implementation of the Entityhub Dereference Engine is a good example to start
from.</p>
<h3 id="osgi-component">OSGI Component</h3>
Modified:
websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/engines/entityhubdereference.html
==============================================================================
---
websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/engines/entityhubdereference.html
(original)
+++
websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/engines/entityhubdereference.html
Mon Jun 2 07:12:41 2014
@@ -113,6 +113,7 @@
</ul>
<p>Additional Supported Properties that are not included in the configuration
form:</p>
<ul>
+<li><strong>Dereference Properties</strong>
<em>(enhancer.engines.dereference.references)</em>: The list of properties that
reference Entities. By default <code>fise:entity-reference</code> is used. A
Triple pattern <code>(null,{entity-reference},null)</code> is used for all
configured property URIs. All unique objects of type URI are considered as
entities to be dereferenced. <em>NOTE</em> that configured <em>URI Prefix</em>
and/or an <em>URI Pattern</em> are also applied to the list of entity uris.
</li>
<li><strong>Dereference Languages</strong>
<em>(enhancer.engines.dereference.languages)</em>: A set of languages that are
dereferenced. Even if <em>'Dereference only Content Language Literals'</em> is
active explicitly configured languages will still get dereferenced. If not
present and <em>'Dereference only Content Language Literals'</em> is
deactivated literals of any language will get dereferenced.</li>
<li><strong>Service Ranking</strong> <em>(service.ranking)</em>: The OSGI
service ranking. Will only have an effect if their are two engines with the
same name. In such cases the one with the higher service ranking will get
called.</li>
</ul>
@@ -153,6 +154,7 @@ enhancer.engines.dereference.ldpath=[&qu
<p><strong>since version <code>0.12.1</code></strong> with <a
href="https://issues.apache.org/jira/browse/STANBOL-1287">STANBOL-1287</a></p>
<p>The following Enhancement Properties are supported by the Entityhub
Dereference Engine</p>
<ul>
+<li><strong>Dereference Properties</strong>
<em>(enhancer.engines.dereference.references)</em>: a collection of properties
that reference Entities. Parsed values will me merged (union) to those
statically configured for the Engine. </li>
<li><strong>Dereference Languages</strong>
<em>(enhancer.engines.dereference.languages)</em>: A set of languages that are
dereferenced. Even if <em>'Dereference only Content Language Literals'</em> is
active explicitly configured languages will still get dereferenced. *
<strong>Dereferenced Fields</strong>
<em>(enhancer.engines.dereference.fields)</em>: The dereferenced fields - in
RDF terminology 'properties' - to be dereferenced. QNames (e.g.
<code>rdf:label</code>) can be used for the configuration. This Engine supports
the use of FieldMappings for the configuration. Dereferenced Fields parsed as
EnhancementProperty will override values configured for the Engine.</li>
<li><strong>Dereference LD Path</strong>
<em>(enhancer.engines.dereference.ldpath)</em>: The <a
href="http://marmotta.apache.org/ldpath/language.html">LD Path Language</a>
allows to define powerful selectors for dereferenced Entities. An LD Path
program parsed as EnhancementProperty will be executed in addition to those
configured for the engine.</li>
</ul>
Modified:
websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/engines/index.html
==============================================================================
---
websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/engines/index.html
(original)
+++
websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/engines/index.html
Mon Jun 2 07:12:41 2014
@@ -157,12 +157,53 @@
<li><strong>ORDERING_CONTENT_EXTRACTION</strong>: This range includes values
form < 200 and >= 100 and shall be used by enhancement engines that need
to analyze the parsed content to extract additional metadata. Examples would be
Language detection, Natural Language Processing, Named Entity Recognition, Face
Detection in Images, Speech to text â¦</li>
<li><strong>ORDERING_EXTRACTION_ENHANCEMENT</strong>: This range includes
values from < 100 and >= 1 and shall be used by enhancement engines to
provide semantic lifting of preexisting enhancement such as linking named
entities extracted by an NER engine with entities defines in a controlled
vocabulary or lifting artist names, song titles ... extracted from mp3 files
with the according Entities defined in an music database.</li>
<li><strong>ORDERING_DEFAULT</strong>: This represents the value 0 and shall
be used as default value for all enhancement engines that do not provide
ordering information or do not implement the ServicesProperties interface.</li>
-<li><strong>ORDERING_POST_PROCESSING</strong>: This range includes valued form
< 0 and >= -100 and is intended to be used by all enhancement engines
that do post processing of enhancement results such as schema translation,
filtering of Enhancements ...<br />
-</li>
+<li><strong>ORDERING_POST_PROCESSING</strong>: This range includes valued form
< 0 and >= -100 and is intended to be used by all enhancement engines
that do post processing of enhancement results such as schema translation,
filtering of Enhancements ... </li>
</ul>
<p>The engine ordering information as described here are used by the <a
href="../chains/defaultchain.html">Default Chain</a> and the <a
href="../chains/weightedchain.html">Weighted Chain</a> to calculate the <a
href="../chains/executionplan.html">Execution Plan</a>.</p>
<p>Basically this features allows the implementor of an enhancement engine to
define the correct position of his engine within an typical enhancement chain
and therefore ensure that users who add this engine to an enhancer installation
to immediately use this engine with the <a
href="../chains/defaultchain.html">Default Chain</a>.</p>
<p>However, the engine ordering is not the only possibility for users to
control the execution order. Enhancement chain implementations such as the <a
href="../chains/listchain.html">List Chain</a> and the <a
href="../chains/graphchain.html">Graph Chain</a> do also allow to directly
define the oder of execution. For these chains the ordering information
provided by enhancement engines are ignored.</p>
+<h3 id="enhancement-properties-support">Enhancement Properties support</h3>
+<p><strong>since version <code>0.12.1</code></strong></p>
+<p><a href="../enhancementproperties">Enhancement Properties</a> can be used
to parameterize <a href="../chains">Enhancement Chains</a> and/or the
enhancement of single <a href="../contentitem">Content Item</a>s. Support by
EnhancementEngines is optional. Engines that do support EnhancementProperties
<em>SHOULD</em> list the keys of supported properties in their
documentation.</p>
+<p>In version <code>0.12.1</code> and <code>1.*</code> EnhancementProperties
are contained in the <a href="contentitem">ContentItem</a> parsed to the
EnhancementEngine. The <code>EnhancementEngineHeloer</code> utility has methods
to access them. The following listing shows the code necessary to get the
Enhancement Properties from the parsed ContentItem.</p>
+<div class="codehilite"><pre><span class="nd">@Override</span>
+<span class="kd">public</span> <span class="kd">final</span> <span
class="kt">void</span> <span class="nf">computeEnhancements</span><span
class="o">(</span><span class="n">ContentItem</span> <span
class="n">ci</span><span class="o">)</span> <span class="kd">throws</span>
<span class="n">EngineException</span> <span class="o">{</span>
+ <span class="n">Map</span><span class="o"><</span><span
class="n">String</span><span class="o">,</span><span
class="n">Object</span><span class="o">></span> <span
class="n">enhancemntProps</span> <span class="o">=</span> <span
class="n">EnhancementEngineHelper</span><span class="o">.</span><span
class="na">getEnhancementProperties</span><span class="o">(</span><span
class="k">this</span><span class="o">,</span> <span class="n">ci</span><span
class="o">);</span>
+ <span class="o">[..]</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>With <code>2.0.0</code> the EnhancementEngine API will be changed so that
the EnhancementProperties are parsed as an additional parameter.</p>
+<div class="codehilite"><pre><span class="nd">@Override</span>
+<span class="kd">public</span> <span class="kd">final</span> <span
class="kt">void</span> <span class="nf">computeEnhancements</span><span
class="o">(</span><span class="n">ContentItem</span> <span
class="n">ci</span><span class="o">,</span>
+ <span class="n">Map</span><span class="o"><</span><span
class="n">String</span><span class="o">,</span><span
class="n">Object</span><span class="o">></span> <span
class="n">enhancemntProps</span><span class="o">)</span> <span
class="kd">throws</span> <span class="n">EngineException</span> <span
class="o">{</span>
+ <span class="o">[..]</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>The <code>Map<String,Object></code> containing the
EnhancementProperties is a read/write-able copy of the EnhancementProperties
parsed with the ContentItem. That mean that EnhancementEngine implementations
are free to change the contents of that map. Those changes will not affect the
state of the ContentItem.</p>
+<p>The keys of in the map are the string keys of the parsed Enhancement
Properties (e.g. <code>enhancer.max-suggestion</code> or
<code>enhancer.engines.dereference.fields</code>). Values can be any Object.
Arrays and Collections may be used for multi value properties. The
<code>EnhancementEngineHelper</code> utility provides methods to convert values
to expected. </p>
+<div class="codehilite"><pre><span class="c1">//define supported enhancement
properties as constants</span>
+<span class="kd">public</span> <span class="kd">static</span> <span
class="kd">final</span> <span class="n">String</span> <span
class="n">MAX_SUGGESTIONS</span> <span class="o">=</span> <span
class="s">"enhancer.max-suggestions"</span><span class="o">;</span>
+<span class="kd">public</span> <span class="kd">static</span> <span
class="kd">final</span> <span class="n">String</span> <span
class="n">DEREFERENCED_FIELDS</span> <span class="o">=</span> <span
class="s">"enhancer.engines.dereference.fields"</span><span
class="o">;</span>
+
+<span class="o">[..]</span>
+
+<span class="nd">@Override</span>
+<span class="kd">public</span> <span class="kd">final</span> <span
class="kt">void</span> <span class="nf">computeEnhancements</span><span
class="o">(</span><span class="n">ContentItem</span> <span
class="n">ci</span><span class="o">)</span> <span class="kd">throws</span>
<span class="n">EngineException</span> <span class="o">{</span>
+ <span class="n">Map</span><span class="o"><</span><span
class="n">String</span><span class="o">,</span><span
class="n">Object</span><span class="o">></span> <span
class="n">enhProp</span> <span class="o">=</span> <span
class="n">EnhancementEngineHelper</span><span class="o">.</span><span
class="na">getEnhancementProperties</span><span class="o">(</span><span
class="k">this</span><span class="o">,</span> <span class="n">ci</span><span
class="o">);</span>
+ <span class="n">Integer</span> <span class="n">maxSuggestions</span> <span
class="o">=</span> <span class="n">EnhancementEngineHelper</span><span
class="o">.</span><span class="na">getFirstConfigValue</span><span
class="o">(</span><span class="k">this</span><span class="o">,</span> <span
class="n">ci</span><span class="o">,</span>
+ <span class="n">enhProp</span><span class="o">,</span> <span
class="n">MAX_SUGGESTIONS</span><span class="o">,</span> <span
class="n">Integer</span><span class="o">.</span><span
class="na">class</span><span class="o">);</span>
+
+ <span class="n">Collection</span><span class="o"><</span><span
class="n">String</span><span class="o">></span> <span
class="n">fields</span> <span class="o">=</span> <span
class="n">EnhancementEngineHelper</span><span class="o">.</span><span
class="na">getConfigValues</span><span class="o">(</span><span
class="k">this</span><span class="o">,</span> <span class="n">ci</span><span
class="o">,</span>
+ <span class="n">enhProp</span><span class="o">,</span> <span
class="n">DEREFERENCED_FIELDS</span><span class="o">,</span> <span
class="n">String</span><span class="o">.</span><span
class="na">class</span><span class="o">);</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>There are also <code>parseConfig*(..)</code> methods where one can directly
parse the object value. Those methods do also not throw an
<code>EnhancementPropertyException</code>. Note also the
<code>get*ConfigValue(Dictionary<String,Object>, ...)</code> methods that
can be used to parsed the OSGI component configuration.</p>
<h2 id="enhancement-engine-management">Enhancement Engine Management</h2>
<p>This section describes how enhancement engines are managed by the Apache
Stanbol Enhancer and how they can be selected/accessed through the <a
href="../enhancementjobmanager.html">Enhancement Job Manager</a> and executed
in an <a href="../chains">Enhancement Chain</a>.</p>
<p>Enhancement engines are registered as OSGi services and managed by using
the following service properties:</p>
Modified:
websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/enhancementproperties.html
==============================================================================
---
websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/enhancementproperties.html
(original)
+++
websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/enhancementproperties.html
Mon Jun 2 07:12:41 2014
@@ -156,16 +156,16 @@ expected values. </p>
<span class="nd">@Override</span>
<span class="kd">public</span> <span class="kd">final</span> <span
class="kt">void</span> <span class="nf">computeEnhancements</span><span
class="o">(</span><span class="n">ContentItem</span> <span
class="n">ci</span><span class="o">)</span> <span class="kd">throws</span>
<span class="n">EngineException</span> <span class="o">{</span>
<span class="n">Map</span><span class="o"><</span><span
class="n">String</span><span class="o">,</span><span
class="n">Object</span><span class="o">></span> <span
class="n">enhProp</span> <span class="o">=</span> <span
class="n">EnhancementEngineHelper</span><span class="o">.</span><span
class="na">getEnhancementProperties</span><span class="o">(</span><span
class="k">this</span><span class="o">,</span> <span class="n">ci</span><span
class="o">);</span>
- <span class="n">Integer</span> <span class="n">maxSuggestions</span> <span
class="o">=</span> <span class="n">EnhancementEngineHelper</span><span
class="o">.</span><span class="na">getFirstConfigValue</span><span
class="o">(</span>
- <span class="n">enhProp</span><span class="o">.</span><span
class="na">get</span><span class="o">(</span><span
class="n">MAX_SUGGESTIONS</span><span class="o">),</span> <span
class="n">Integer</span><span class="o">.</span><span
class="na">class</span><span class="o">);</span>
+ <span class="n">Integer</span> <span class="n">maxSuggestions</span> <span
class="o">=</span> <span class="n">EnhancementEngineHelper</span><span
class="o">.</span><span class="na">getFirstConfigValue</span><span
class="o">(</span><span class="k">this</span><span class="o">,</span> <span
class="n">ci</span><span class="o">,</span>
+ <span class="n">enhProp</span><span class="o">,</span> <span
class="n">MAX_SUGGESTIONS</span><span class="o">,</span> <span
class="n">Integer</span><span class="o">.</span><span
class="na">class</span><span class="o">);</span>
- <span class="n">Collection</span><span class="o"><</span><span
class="n">String</span><span class="o">></span> <span
class="n">fields</span> <span class="o">=</span> <span
class="n">EnhancementEngineHelper</span><span class="o">.</span><span
class="na">getConfigValues</span><span class="o">(</span>
- <span class="n">enhProp</span><span class="o">.</span><span
class="na">get</span><span class="o">(</span><span
class="n">DEREFERENCED_FIELDS</span><span class="o">),</span> <span
class="n">String</span><span class="o">.</span><span
class="na">class</span><span class="o">);</span>
+ <span class="n">Collection</span><span class="o"><</span><span
class="n">String</span><span class="o">></span> <span
class="n">fields</span> <span class="o">=</span> <span
class="n">EnhancementEngineHelper</span><span class="o">.</span><span
class="na">getConfigValues</span><span class="o">(</span><span
class="k">this</span><span class="o">,</span> <span class="n">ci</span><span
class="o">,</span>
+ <span class="n">enhProp</span><span class="o">,</span> <span
class="n">DEREFERENCED_FIELDS</span><span class="o">,</span> <span
class="n">String</span><span class="o">.</span><span
class="na">class</span><span class="o">);</span>
<span class="o">}</span>
</pre></div>
-<p><em>TIP</em> the same methods can also be used to process the configuration
parsed by OSGI.</p>
+<p>There are also <code>parseConfig*(..)</code> methods where one can directly
parse the object value. Those methods do also not throw an
<code>EnhancementPropertyException</code>. Note also the
<code>get*ConfigValue(Dictionary<String,Object>, ...)</code> methods that
can be used to parsed the OSGI component configuration.</p>
<h2 id="definition-ofchain-scoped-enhancement-properties">Definition ofChain
scoped Enhancement Properties</h2>
<p>Chain scoped EnhancementProperties are represented by RDF in the
ExecutionPlan. As in <code>0.12.1</code> and <code>1.*</code> the
ExecutionPlan is provided by the <code>Chain#getExecutionPlan()</code> method
most currently used Chain implementations where extended to support the the
configuration of <em>chain</em> scoped Enhancement Properties.</p>
<p>Starting from <code>0.12.1</code> the <a
href="chains/listchain">ListChain</a>, <a
href="chains/weightedchain">WeightedChain</a> and <a
href="chains/graphchain">GraphChain</a> allow the configuration of
EnhancementProperties:</p>
Added:
websites/staging/stanbol/trunk/content/presentations/Topic-Classification.pdf
==============================================================================
Binary file - no diff available.
Propchange:
websites/staging/stanbol/trunk/content/presentations/Topic-Classification.pdf
------------------------------------------------------------------------------
svn:mime-type = application/pdf