Class SentenceAnnotator

  • All Implemented Interfaces:
    org.apache.uima.analysis_component.AnalysisComponent

    public class SentenceAnnotator
    extends org.apache.uima.analysis_component.JCasAnnotator_ImplBase
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void initialize​(org.apache.uima.UimaContext aContext)
      initiaziation of JSBD: load the model, set post processing
      void process​(org.apache.uima.jcas.JCas aJCas)
      process method is in charge of doing the sentence splitting.
      • Methods inherited from class org.apache.uima.analysis_component.JCasAnnotator_ImplBase

        getRequiredCasInterface, process
      • Methods inherited from class org.apache.uima.analysis_component.Annotator_ImplBase

        getCasInstancesRequired, hasNext, next
      • Methods inherited from class org.apache.uima.analysis_component.AnalysisComponent_ImplBase

        batchProcessComplete, collectionProcessComplete, destroy, getContext, getResultSpecification, reconfigure, setResultSpecification
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • PARAM_MODEL_FILE

        public static final java.lang.String PARAM_MODEL_FILE
        See Also:
        Constant Field Values
      • PARAM_POSTPROCESSING

        public static final java.lang.String PARAM_POSTPROCESSING
        See Also:
        Constant Field Values
      • PARAM_SENTENCE_DELIMITER_TYPES

        public static final java.lang.String PARAM_SENTENCE_DELIMITER_TYPES
        See Also:
        Constant Field Values
      • PARAM_CUT_AWAY_TYPES

        public static final java.lang.String PARAM_CUT_AWAY_TYPES
        See Also:
        Constant Field Values
    • Constructor Detail

      • SentenceAnnotator

        public SentenceAnnotator()
    • Method Detail

      • initialize

        public void initialize​(org.apache.uima.UimaContext aContext)
                        throws org.apache.uima.resource.ResourceInitializationException
        initiaziation of JSBD: load the model, set post processing
        Specified by:
        initialize in interface org.apache.uima.analysis_component.AnalysisComponent
        Overrides:
        initialize in class org.apache.uima.analysis_component.AnalysisComponent_ImplBase
        Throws:
        org.apache.uima.resource.ResourceInitializationException
      • process

        public void process​(org.apache.uima.jcas.JCas aJCas)
                     throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
        process method is in charge of doing the sentence splitting. If processingScope is set, we iterate over Annotation objects of this type and do the sentence splitting within this scope. Otherwise, the whole document text is considered.
        Specified by:
        process in class org.apache.uima.analysis_component.JCasAnnotator_ImplBase
        Throws:
        org.apache.uima.analysis_engine.AnalysisEngineProcessException