Author: buildbot
Date: Wed May 30 11:47:23 2012
New Revision: 819610
Log:
Staging update by buildbot for stanbol
Modified:
websites/staging/stanbol/trunk/content/ (props changed)
websites/staging/stanbol/trunk/content/stanbol/docs/trunk/enhancer/enhancementstructure.html
Propchange: websites/staging/stanbol/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Wed May 30 11:47:23 2012
@@ -1 +1 @@
-1344203
+1344206
Modified:
websites/staging/stanbol/trunk/content/stanbol/docs/trunk/enhancer/enhancementstructure.html
==============================================================================
---
websites/staging/stanbol/trunk/content/stanbol/docs/trunk/enhancer/enhancementstructure.html
(original)
+++
websites/staging/stanbol/trunk/content/stanbol/docs/trunk/enhancer/enhancementstructure.html
Wed May 30 11:47:23 2012
@@ -204,9 +204,10 @@
<h2 id="occurrence-based-annotation">Occurrence based Annotation</h2>
<p>This describes a user interface similar to one of a spell/grammar checker.
But instead of marking misspelled words entities recognized within the text are
suggested to the user. The following figure shows such an interface as
implemented by the <a href="http://hallojs.org">hallo.js</a> combined with the
<a href="https://github.com/szabyg/annotate.js">annotate.js</a> plugin (see the
<a href="http://hallojs.org/annotate.html">Demo here</a> <small>(last accessed
2012-05-30)</small> - click in the Text and press the "annotate" button).</p>
<p><img alt="Occurrence based Annotation UI"
src="hallo-annotate_scrrenshot.png" title="hallo.js with the annotate.js plugin
used to implement an text occurrence based annotation UI" /></p>
-<p>To implement user interfaces like that one needs to acquire the following
information form the enhancements returned by the Stanbol Enhancer.</p>
-<p><strong>Showing the Occurrences within the Text</strong></p>
-<p>This described how to obtain the necessary information needed to visualize
extracted Entities within the text.</p>
+<p>To implement user interfaces like that one needs to (1) show occurrences of
extracted features within the text and (2) let the user interact with suggested
entities.</p>
+<h3 id="visualise-occurrences-of-extracted-features">Visualise Occurrences of
extracted features</h3>
+<p>The occurrence of extracted features are represented by instances of the
concept 'fise:TextAnnotation'. However not all TextAnnotations are of interest
for this use case as they are also used for other things (e.g. annotating the
language of the parsed content).</p>
+<p>Typically the following steps are required to correctly show extracted
features within the content.</p>
<ol>
<li>Query for/iterate over 'fise:TextAnnotation's of the enhancement
results.<ul>
<li>it is important to only use TextAnnotations that define a
'fise:selected-text' property. TextAnnotations that do not define this property
usually select whole sections or even the document as a whole. Those are not of
interest for this use case.</li>
@@ -217,29 +218,30 @@
<li>in case the content includes additional markup the char indexes of
'fise:start'/'fise:end' will not match. In such cases the preferred way is to
first search the occurrence of'fise:selection-context' and thann the occurrence
of 'fise:selected-text' within.</li>
</ul>
</li>
-<li>Retrieve suggested Entities for a given TextAnnotation. For that one needs
to search for "?suggestion dc:relation {text-annotation}" where
'{text-annotation}' refers to the URI of the current TextAnnotation.<ul>
-<li>Note that there will be TextAnnotations with no suggestions.</li>
+<li>Retrieve the suggestions ('fise:TextAnnoation' instances) for a given
TextAnnotation. For that one needs to search for "?suggestion dc:relation
{text-annotation}" where '{text-annotation}' refers to the URI of the current
TextAnnotation. Note that:<ul>
+<li>Not every TextAnnotation will have suggestions</li>
+<li>One and the same suggestion might be linked with several
TextAnnotations.</li>
</ul>
</li>
</ol>
<p>The following SPARQL query could be used to select all the required
information. However the use of SPARQL is optional as the required information
can be also easily retrieved by other means (e.g. the filtered Iteratros as
typically provided by RDF frameworks). </p>
-<div class="codehilite"><pre><span class="nb">select</span> <span
class="o">*</span>
-<span class="n">from</span> <span class="p">{</span>
- <span class="p">?</span><span class="n">textAnnotation</span> <span
class="n">rdfs:type</span> <span class="n">fise:TextAnnotation</span>
- <span class="p">?</span><span class="n">textAnnotation</span> <span
class="n">fise:selected</span><span class="o">-</span><span
class="n">text</span> <span class="p">?</span><span class="n">selected</span>
- <span class="p">?</span><span class="n">textAnnotation</span> <span
class="n">fise:selection</span><span class="o">-</span><span
class="n">context</span> <span class="p">?</span><span class="n">context</span>
- <span class="p">?</span><span class="n">textAnnotation</span> <span
class="n">fise:start</span> <span class="p">?</span><span
class="n">startIndex</span>
- <span class="p">?</span><span class="n">textAnnotation</span> <span
class="n">fise:end</span> <span class="p">?</span><span
class="n">endIndex</span>
- <span class="p">?</span><span class="n">textAnnotation</span> <span
class="n">dc:type</span> <span class="p">?</span><span class="n">nature</span>
-<span class="n">optional</span> <span class="p">{</span> <span
class="p">?</span><span class="n">suggestions</span> <span
class="n">dc:relation</span> <span class="p">?</span><span
class="n">textAnnotation</span> <span class="p">}</span>
-<span class="p">}</span>
+<div class="codehilite"><pre><span class="k">select</span> <span
class="o">*</span>
+<span class="k">from</span> <span class="err">{</span>
+ <span class="o">?</span><span class="n">textAnnotation</span> <span
class="n">rdfs</span><span class="p">:</span><span class="k">type</span> <span
class="n">fise</span><span class="p">:</span><span
class="n">TextAnnotation</span>
+ <span class="o">?</span><span class="n">textAnnotation</span> <span
class="n">fise</span><span class="p">:</span><span
class="n">selected</span><span class="o">-</span><span class="nb">text</span>
<span class="o">?</span><span class="n">selected</span>
+ <span class="o">?</span><span class="n">textAnnotation</span> <span
class="n">fise</span><span class="p">:</span><span
class="n">selection</span><span class="o">-</span><span
class="n">context</span> <span class="o">?</span><span class="n">context</span>
+ <span class="o">?</span><span class="n">textAnnotation</span> <span
class="n">fise</span><span class="p">:</span><span class="k">start</span> <span
class="o">?</span><span class="n">startIndex</span>
+ <span class="o">?</span><span class="n">textAnnotation</span> <span
class="n">fise</span><span class="p">:</span><span class="k">end</span> <span
class="o">?</span><span class="n">endIndex</span>
+ <span class="o">?</span><span class="n">textAnnotation</span> <span
class="n">dc</span><span class="p">:</span><span class="k">type</span> <span
class="o">?</span><span class="n">nature</span>
+<span class="n">optional</span> <span class="err">{</span> <span
class="o">?</span><span class="n">suggestions</span> <span
class="n">dc</span><span class="p">:</span><span class="n">relation</span>
<span class="o">?</span><span class="n">textAnnotation</span> <span
class="err">}</span>
+<span class="err">}</span>
</pre></div>
<p>Additionally:</p>
<ul>
<li>The value of the 'dc:type' is well suited to select different style
sheets. See the section for <a
href="#fisetextannotation">fise:TextAnnotation</a> for detailed
information.</li>
-<li>The UI might need to differentiate between TextAnnotations with/without
suggestions.</li>
+<li>Note hat one </li>
</ul>
<p><strong>Processing Suggested Entities</strong></p>
<p>In principle there are three different cases</p>