public class Quantifier extends Annotator
Modifier and Type | Field and Description |
---|---|
Normalizer |
normalizer |
static TextAnnotationBuilder |
taBuilder |
static Pattern[] |
wordSplitPat |
config, isInitialized, requiredViews, viewName
Constructor and Description |
---|
Quantifier() |
Quantifier(boolean lazilyInitialize)
Constructor allowing choice whether or not to lazily initialize.
|
Modifier and Type | Method and Description |
---|---|
void |
addView(TextAnnotation ta)
create and add the view named by getViewName() to the TextAnnotation argument.
|
String |
getAnnotatedString(String text,
boolean standardized) |
List<QuantSpan> |
getSpans(String text,
boolean standardized,
TextAnnotation inputTA) |
void |
initialize(ResourceManager resourceManager)
Derived classes use this to load memory- or time-consuming resources.
|
static void |
main(String[] args) |
void |
test() |
void |
train() |
void |
trainOnAll() |
static String |
wordsplitSentence(String sentence) |
doInitialize, getRequiredViews, getTagValues, getView, getViewName, isInitialized, isSentenceLevel
public Normalizer normalizer
public static Pattern[] wordSplitPat
public static TextAnnotationBuilder taBuilder
public Quantifier()
public Quantifier(boolean lazilyInitialize)
lazilyInitialize
- if 'true', load models only on first call to
Annotator.getView(TextAnnotation)
public List<QuantSpan> getSpans(String text, boolean standardized, TextAnnotation inputTA) throws AnnotatorException
inputTA
- the tokenized annotation of text input. If this parameter is not available,
the user can pass null, in which case we will tokenize it ourselves.AnnotatorException
public String getAnnotatedString(String text, boolean standardized) throws Exception
Exception
public void initialize(ResourceManager resourceManager)
Annotator
initialize
in class Annotator
resourceManager
- configuration parameterspublic void addView(TextAnnotation ta) throws AnnotatorException
Annotator
addView
in class Annotator
ta
- the TextAnnotation to modify.AnnotatorException
public void trainOnAll()
public void train()
public void test()
Copyright © 2017. All rights reserved.