public class NERAnnotator extends Annotator
config, isInitialized, requiredViews, viewName
Constructor and Description |
---|
NERAnnotator(ResourceManager nonDefaultRm,
String viewName)
Default behavior is to use lazy initialization; override with ResourceManager entry per the
Configurator property
AnnotatorConfigurator.IS_LAZILY_INITIALIZED |
NERAnnotator(String viewName)
default constructor -- NER_CONLL models will be loaded.
|
NERAnnotator(String nonDefaultConfigValues,
String viewName) |
Modifier and Type | Method and Description |
---|---|
void |
addView(TextAnnotation ta)
Generate the view representing the list of extracted entities and adds it the
TextAnnotation . |
Set<String> |
getTagValues()
Return possible tag values that the NERAnnotator can produce.
|
void |
initialize(ResourceManager nerRm)
Superclass calls this method either on instantiation or at first call to getView().
|
doInitialize, getRequiredViews, getView, getViewName, isInitialized, isSentenceLevel
public NERAnnotator(String nonDefaultConfigValues, String viewName) throws IOException
nonDefaultConfigValues
- a configuration file specifying non-default parameters for the
NER model to useviewName
- indicates the view name, and hence the model, that you wish to use. If you
specify ViewNames.NER_CONLL
or ViewNames.NER_ONTONOTES
, This name will
be used when creating Views in TextAnnotation objects.IOException
public NERAnnotator(String viewName) throws IOException
viewName
- name of view this annotator will add.IOException
public NERAnnotator(ResourceManager nonDefaultRm, String viewName)
AnnotatorConfigurator.IS_LAZILY_INITIALIZED
nonDefaultRm
- specify properties to override defaults, including lazy initializationviewName
- name of the view to add to the TextAnnotation (and for client to request)public void initialize(ResourceManager nerRm)
initialize
in class Annotator
nerRm
- configuration parameters passed to constructorpublic void addView(TextAnnotation ta)
TextAnnotation
.public Set<String> getTagValues()
getTagValues
in class Annotator
Copyright © 2017. All rights reserved.