Interface BaseAnnotator

    • Method Detail

      • initialize

        void initialize​(AnnotatorContext aContext)
                 throws AnnotatorInitializationException,
                        AnnotatorConfigurationException
        Performs any startup tasks required by this annotator. The Analysis Engine calls this method only once, just after an Annotator has been instantiated.

        The Analysis Engine supplies this annotator with a reference to the AnnotatorContext that it will use. This annotator should store a reference to its this object for later use.

        Parameters:
        aContext - Provides access to external resources that may be used by this annotator. This includes configuration parameters, logging and instrumentation services, and access to external analysis resources.
        Throws:
        AnnotatorInitializationException - if the annotator cannot initialize itself.
        AnnotatorConfigurationException - if the configuration specified for this annotator is invalid.
      • reconfigure

        void reconfigure()
                  throws AnnotatorConfigurationException,
                         AnnotatorInitializationException
        Alerts this annotator that the values of its configuration parameters or external resources have changed. This annotator should take appropriate action to reconfigure itself.

        It is suggested that annotators implement this efficiently, but it is not required. Annotators may implement a "dumb" reconfigure by calling destroy followed by initialize and typeSystemInit.

        Throws:
        AnnotatorConfigurationException - if the configuration specified for this annotator is invalid.
        AnnotatorInitializationException - if the annotator fails to reinitialize itself based on the new configuration.
      • destroy

        void destroy()
        Frees all resources held by this annotator. The Analysis Engine calls this method only once, when it is finished using this annotator.