You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by rw...@apache.org on 2012/11/23 14:14:53 UTC
svn commit: r1412874 -
/stanbol/site/trunk/content/docs/trunk/components/enhancer/nlp/analyzedtext.mdtext
Author: rwesten
Date: Fri Nov 23 13:14:52 2012
New Revision: 1412874
URL: http://svn.apache.org/viewvc?rev=1412874&view=rev
Log:
STANBOL-733 - minor
Modified:
stanbol/site/trunk/content/docs/trunk/components/enhancer/nlp/analyzedtext.mdtext
Modified: stanbol/site/trunk/content/docs/trunk/components/enhancer/nlp/analyzedtext.mdtext
URL: http://svn.apache.org/viewvc/stanbol/site/trunk/content/docs/trunk/components/enhancer/nlp/analyzedtext.mdtext?rev=1412874&r1=1412873&r2=1412874&view=diff
==============================================================================
--- stanbol/site/trunk/content/docs/trunk/components/enhancer/nlp/analyzedtext.mdtext (original)
+++ stanbol/site/trunk/content/docs/trunk/components/enhancer/nlp/analyzedtext.mdtext Fri Nov 23 13:14:52 2012
@@ -130,12 +130,14 @@ The following example shows the intended
"stanbol.enhancer.nlp.pos", PosTag.class);
...
}
+
2. Defined _Annotation_ are used to add information to an _Annotated_ 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.
:::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);
+
3. For consuming annotations there are two options. First the possibility to use the _Annotation_ 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 _Annotation_ in the classpath. The following examples show both options
:::java