Class AbstractTokenizer

java.lang.Object
org.apache.uima.analysis_component.AnalysisComponent_ImplBase
org.apache.uima.analysis_component.Annotator_ImplBase
org.apache.uima.analysis_component.CasAnnotator_ImplBase
opennlp.uima.tokenize.AbstractTokenizer
All Implemented Interfaces:
org.apache.uima.analysis_component.AnalysisComponent
Direct Known Subclasses:
SimpleTokenizer, Tokenizer, WhitespaceTokenizer

public abstract class AbstractTokenizer extends org.apache.uima.analysis_component.CasAnnotator_ImplBase
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.apache.uima.UimaContext
     
    private Boolean
     
    protected org.apache.uima.util.Logger
     
    protected final String
     
    protected org.apache.uima.cas.Type
    Type of the sentence containing the tokens.
    protected org.apache.uima.cas.Type
    Type of the tokens to be created.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    initialize(org.apache.uima.UimaContext context)
     
    protected abstract void
    postProcessAnnotations(Span[] tokens, org.apache.uima.cas.text.AnnotationFS[] tokenAnnotations)
     
    void
    process(org.apache.uima.cas.CAS cas)
     
    protected abstract Span[]
    tokenize(org.apache.uima.cas.CAS cas, org.apache.uima.cas.text.AnnotationFS sentence)
     
    void
    typeSystemInit(org.apache.uima.cas.TypeSystem typeSystem)
     

    Methods inherited from class org.apache.uima.analysis_component.CasAnnotator_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, getLogger, getResultSpecification, reconfigure, setResultSpecification

    Methods inherited from class Object

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

    • name

      protected final String name
    • context

      protected org.apache.uima.UimaContext context
    • logger

      protected org.apache.uima.util.Logger logger
    • sentenceType

      protected org.apache.uima.cas.Type sentenceType
      Type of the sentence containing the tokens.
    • tokenType

      protected org.apache.uima.cas.Type tokenType
      Type of the tokens to be created.
    • isRemoveExistingAnnotations

      private Boolean isRemoveExistingAnnotations
  • Constructor Details

    • AbstractTokenizer

      protected AbstractTokenizer(String name)
  • Method Details

    • initialize

      public void initialize(org.apache.uima.UimaContext context) throws org.apache.uima.resource.ResourceInitializationException
      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
    • typeSystemInit

      public void typeSystemInit(org.apache.uima.cas.TypeSystem typeSystem) throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
      Overrides:
      typeSystemInit in class org.apache.uima.analysis_component.CasAnnotator_ImplBase
      Throws:
      org.apache.uima.analysis_engine.AnalysisEngineProcessException
    • postProcessAnnotations

      protected abstract void postProcessAnnotations(Span[] tokens, org.apache.uima.cas.text.AnnotationFS[] tokenAnnotations)
    • tokenize

      protected abstract Span[] tokenize(org.apache.uima.cas.CAS cas, org.apache.uima.cas.text.AnnotationFS sentence)
    • process

      public void process(org.apache.uima.cas.CAS cas) throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
      Specified by:
      process in class org.apache.uima.analysis_component.CasAnnotator_ImplBase
      Throws:
      org.apache.uima.analysis_engine.AnalysisEngineProcessException