public class CuratorTextAnnotationBuilder extends Object implements TextAnnotationBuilder
TextAnnotation
builder, that uses CuratorClient
to create a
TextAnnotation and populate it with
ViewNames.TOKENS
and
ViewNames.SENTENCE
views.SPLIT_ON_DASH
Constructor and Description |
---|
CuratorTextAnnotationBuilder(CuratorClient curatorClient) |
Modifier and Type | Method and Description |
---|---|
TextAnnotation |
createTextAnnotation(String text)
A method for creating
TextAnnotation by
tokenizing the given text string. |
TextAnnotation |
createTextAnnotation(String corpusId,
String textId,
String text)
An overloaded version of
TextAnnotationBuilder.createTextAnnotation(String) which takes in a corpus Id and
text Id. |
TextAnnotation |
createTextAnnotation(String corpusId,
String textId,
String text,
Tokenizer.Tokenization tokenization)
A method for creating
TextAnnotation by
respecting the pre-tokenization of text passed as an instance of
Tokenizer.Tokenization . |
String |
getName() |
public CuratorTextAnnotationBuilder(CuratorClient curatorClient)
public TextAnnotation createTextAnnotation(String text) throws IllegalArgumentException
TextAnnotationBuilder
TextAnnotation
by
tokenizing the given text string.createTextAnnotation
in interface TextAnnotationBuilder
text
- Raw text stringIllegalArgumentException
public TextAnnotation createTextAnnotation(String corpusId, String textId, String text) throws IllegalArgumentException
TextAnnotationBuilder
TextAnnotationBuilder.createTextAnnotation(String)
which takes in a corpus Id and
text Id. These strings can be used for bookkeeping.createTextAnnotation
in interface TextAnnotationBuilder
text
- Raw text string.IllegalArgumentException
public TextAnnotation createTextAnnotation(String corpusId, String textId, String text, Tokenizer.Tokenization tokenization) throws IllegalArgumentException
TextAnnotationBuilder
TextAnnotation
by
respecting the pre-tokenization of text passed as an instance of
Tokenizer.Tokenization
.createTextAnnotation
in interface TextAnnotationBuilder
text
- Raw text stringtokenization
- An instance containing tokens, character offsets, and sentence
boundaries.IllegalArgumentException
public String getName()
getName
in interface TextAnnotationBuilder
Copyright © 2017. All rights reserved.