public class AnnotatorPool extends Object
| Constructor and Description |
|---|
AnnotatorPool()
Create an empty AnnotatorPool.
|
| Modifier and Type | Method and Description |
|---|---|
Annotator |
get(String name)
Retrieve an Annotator from the pool.
|
boolean |
register(String name,
AnnotatorFactory factory)
Register an Annotator that can be created by the pool.
|
public boolean register(String name, AnnotatorFactory factory)
name - The name to be associated with the Annotator.factory - A factory that creates an instance of the desired Annotator.public Annotator get(String name)
name - The annotator to retrieve from the poolIllegalArgumentException - If the annotator cannot be created