|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.stanford.nlp.pipeline.AnnotatorPool
public class AnnotatorPool
An object for keeping track of Annotators. Typical use is to allow multiple pipelines to share any Annotators in common. For example, if multiple pipelines exist, and they both need a ParserAnnotator, it would be bad to load two such Annotators into memory. Instead, an AnnotatorPool will only create one Annotator and allow both pipelines to share it.
| Constructor Summary | |
|---|---|
AnnotatorPool()
Create an empty AnnotatorPool. |
|
| Method Summary | |
|---|---|
Annotator |
get(java.lang.String name)
Retrieve an Annotator from the pool. |
boolean |
register(java.lang.String name,
AnnotatorFactory factory)
Register an Annotator that can be created by the pool. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AnnotatorPool()
| Method Detail |
|---|
public boolean register(java.lang.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(java.lang.String name)
name - The annotator to retrieve from the pool
java.lang.IllegalArgumentException - If the annotator cannot be created
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||