public static final void setup() throws IOException {
ci = ciFactory.createContentItem(new StringSource(text));
textBlob = ContentItemHelper.getBlob(ci, Collections.singleton("text/plain"));
analysedTextWithData = createAnalysedText();
int sentence = text.indexOf('.')+1;
Sentence sent1 = analysedTextWithData.addSentence(0, sentence);
expectedSentences.put(sent1, "The Stanbol enhancer can detect famous " +
"cities such as Paris and people such as Bob Marley.");
Token the = sent1.addToken(0, 3);
expectedTokens.put(the, "The");
the.addAnnotation(NlpAnnotations.POS_ANNOTATION, Value.value(
new PosTag("PREP",Pos.Preposition), 0.85));
Token stanbol = sent1.addToken(4,11);
expectedTokens.put(stanbol, "Stanbol");
stanbol.addAnnotation(NlpAnnotations.POS_ANNOTATION, Value.value(
new PosTag("PN", Pos.ProperNoun),0.95));
stanbol.addAnnotation(NlpAnnotations.SENTIMENT_ANNOTATION, Value.value(
0.5));
//use index to create Tokens
int enhancerStart = sent1.getSpan().toString().indexOf("enhancer");
Token enhancer = sent1.addToken(enhancerStart,enhancerStart+"enhancer".length());
expectedTokens.put(enhancer, "enhancer");
enhancer.addAnnotation(NlpAnnotations.POS_ANNOTATION, Value.value(
new PosTag("PN", Pos.ProperNoun),0.95));
enhancer.addAnnotation(NlpAnnotations.POS_ANNOTATION, Value.value(
new PosTag("N", LexicalCategory.Noun),0.87));