use of de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity in project webanno by webanno.
the class WebAnnoTsv3WriterTestBase method testTokenBoundedStackedLookAlike.
@Test
public void testTokenBoundedStackedLookAlike() throws Exception {
JCas jcas = makeJCasOneSentence();
int n = 0;
for (Token t : select(jcas, Token.class)) {
NamedEntity ne = new NamedEntity(jcas, t.getBegin(), t.getEnd());
ne.setValue("NOTSTACKED[" + n + "]");
ne.addToIndexes();
n++;
}
writeAndAssertEquals(jcas, WebannoTsv3Writer.PARAM_SPAN_LAYERS, asList(NamedEntity.class));
}
use of de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity in project webanno by webanno.
the class WebAnnoTsv3WriterTestBase method testCrossSentenceSpanWithFeatureValue.
@Test
public void testCrossSentenceSpanWithFeatureValue() throws Exception {
JCas jcas = makeJCasTwoSentences();
NamedEntity ne = new NamedEntity(jcas, 0, jcas.getDocumentText().length());
ne.setValue("PERSON");
ne.addToIndexes();
writeAndAssertEquals(jcas, WebannoTsv3Writer.PARAM_SPAN_LAYERS, asList(NamedEntity.class));
}
use of de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity in project webanno by webanno.
the class WebAnnoTsv3WriterTestBase method testSingleTokenWithoutFeatureValue.
@Test
public void testSingleTokenWithoutFeatureValue() throws Exception {
JCas jCas = makeJCasOneSentence();
NamedEntity neToken = new NamedEntity(jCas, 0, 4);
neToken.addToIndexes();
writeAndAssertEquals(jCas, WebannoTsv3Writer.PARAM_SPAN_LAYERS, asList(NamedEntity.class));
}
use of de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity in project webanno by webanno.
the class WebAnnoTsv3WriterTestBase method testSentenceWithTab.
@Test
public void testSentenceWithTab() throws Exception {
JCas jcas = makeJCasOneSentence("This is\ta test .");
NamedEntity neToken = new NamedEntity(jcas, 0, 4);
neToken.addToIndexes();
writeAndAssertEquals(jcas, WebannoTsv3Writer.PARAM_SPAN_LAYERS, asList(NamedEntity.class));
}
use of de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity in project webanno by webanno.
the class WebAnnoTsv3WriterTestBase method testSentenceWithEmoji.
@Test
public void testSentenceWithEmoji() throws Exception {
JCas jcas = makeJCasOneSentence("I like it 😊 .");
NamedEntity neToken = new NamedEntity(jcas, 10, 12);
neToken.addToIndexes();
writeAndAssertEquals(jcas, WebannoTsv3Writer.PARAM_SPAN_LAYERS, asList(NamedEntity.class));
}
Aggregations