You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by bu...@apache.org on 2012/11/23 14:14:31 UTC

svn commit: r839313 - in /websites/staging/stanbol/trunk/content: ./ docs/trunk/components/enhancer/nlp/analyzedtext.html

Author: buildbot
Date: Fri Nov 23 13:14:30 2012
New Revision: 839313

Log:
Staging update by buildbot for stanbol

Modified:
    websites/staging/stanbol/trunk/content/   (props changed)
    websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/nlp/analyzedtext.html

Propchange: websites/staging/stanbol/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Fri Nov 23 13:14:30 2012
@@ -1 +1 @@
-1412872
+1412873

Modified: websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/nlp/analyzedtext.html
==============================================================================
--- websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/nlp/analyzedtext.html (original)
+++ websites/staging/stanbol/trunk/content/docs/trunk/components/enhancer/nlp/analyzedtext.html Fri Nov 23 13:14:30 2012
@@ -201,16 +201,14 @@
 </pre></div>
 
 
-</li>
+<ol>
 <li>
 <p>Defined <em>Annotation</em> are used to add information to an <em>Annotated</em> instance (like a Span). For adding annotations the use of _Annotation_s is required to ensure type safety. The following code snippet shows how to add an PosTag with the probability 0.95.</p>
 <p>:::java
 PosTag tag = new PosTag("N"); //a simple POS tag
 Token token; //The Token we want to add the tag
-token.addAnnotations(POS_ANNOTATION,Value.value(tag),0.95);</p>
-</li>
-<li>
-<p>For consuming annotations there are two options. First the possibility to use the <em>Annotation</em> object and second by directly using the key. While the 2nd option is not as nicely to use (as it does not provide type safety) it allows consuming annotations without the need to have the used <em>Annotation</em> in the classpath. The following examples show both options</p>
+token.addAnnotations(POS_ANNOTATION,Value.value(tag),0.95);
+3. For consuming annotations there are two options. First the possibility to use the <em>Annotation</em> object and second by directly using the key. While the 2nd option is not as nicely to use (as it does not provide type safety) it allows consuming annotations without the need to have the used <em>Annotation</em> in the classpath. The following examples show both options</p>
 <p>:::java
 Iterator<Token> tokens = sentence.getTokens();
 while(tokens.hasNext){
@@ -232,6 +230,8 @@ while(tokens.hasNext){
 }</p>
 </li>
 </ol>
+</li>
+</ol>
 <p>The <em>Annotated</em> interface supports multi valued annotations. For that it defines methods for adding/setting and getting multiple values. Values are sorted first by the probability (unknown probability last) and secondly by the insert order (first in first out). So calling the single value getAnnotation() method on a multi valued field will return the first item (highest probability and first added in case of multiple items with the same/no probabilities)</p>
   </div>