edu.ucdenver.ccp.nlp.biolemmatizer.uima
Class BioLemmatizer_AE

java.lang.Object
  extended by org.apache.uima.analysis_component.AnalysisComponent_ImplBase
      extended by org.apache.uima.analysis_component.Annotator_ImplBase
          extended by org.apache.uima.analysis_component.JCasAnnotator_ImplBase
              extended by org.apache.uima.fit.component.JCasAnnotator_ImplBase
                  extended by edu.ucdenver.ccp.nlp.biolemmatizer.uima.BioLemmatizer_AE
All Implemented Interfaces:
AnalysisComponent

public class BioLemmatizer_AE
extends org.apache.uima.fit.component.JCasAnnotator_ImplBase

This annotator processes tokens in the CAS and inserts corresponding lemmas. This annotator is type-system-independent and relies on implementations of TokenAttributeExtractor, TokenAttributeInserter, and AnnotationDataExtractor in order to function as intended.

Author:
Colorado Computational Pharmacology, UC Denver; ccpsupport@ucdenver.edu

Field Summary
static String PARAM_ANNOTATION_DATA_EXTRACTOR_CLASS
          Parameter name used in the UIMA descriptor file for the annotation data extractor implementation to use
static String PARAM_LEMMA_DECORATOR_CLASS
          Parameter name used in the UIMA descriptor file for the LemmaDecorator implementation to use
static String PARAM_POS_DECORATOR_CLASS
          Parameter name used in the UIMA descriptor file for the PartOfSpeechDecorator implementation to use
static String PARAM_TOKEN_GET_POS_METHOD_NAME
          Parameter name used in the UIMA descriptor file for the name of the method that returns a part-of-speech (as a String) from the token annotation
static String PARAM_TOKEN_TYPE_NAME
          Parameter name used in the UIMA descriptor file for the token type
 
Constructor Summary
BioLemmatizer_AE()
           
 
Method Summary
static AnalysisEngineDescription createAnalysisEngineDescription(TypeSystemDescription tsd, Class<? extends Annotation> tokenClass)
           
static AnalysisEngineDescription createAnalysisEngineDescription(TypeSystemDescription tsd, Class<? extends Annotation> tokenClass, String tokenGetPosMethodName)
           
static AnalysisEngineDescription createAnalysisEngineDescription(TypeSystemDescription tsd, Class<? extends Annotation> tokenClass, String tokenGetPosMethodName, Class<? extends edu.ucdenver.ccp.uima.shims.annotation.AnnotationDataExtractor> annotationDataExtractorClass, Class<? extends edu.ucdenver.ccp.uima.shims.annotation.syntactic.token.LemmaDecorator> lemmaDecoratorClass)
          Initializes an AnalysisEngine that will determine lemmas for tokens that are present in the CAS
static AnalysisEngineDescription createAnalysisEngineDescription(TypeSystemDescription tsd, String tokenType, Class<? extends edu.ucdenver.ccp.uima.shims.annotation.syntactic.token.PartOfSpeechDecorator> partOfSpeechDecoratorClass, Class<? extends edu.ucdenver.ccp.uima.shims.annotation.AnnotationDataExtractor> annotationDataExtractorClass, Class<? extends edu.ucdenver.ccp.uima.shims.annotation.syntactic.token.LemmaDecorator> lemmaDecoratorClass)
           
 void initialize(UimaContext context)
          Initializes the BioLemmatizer that will be used by the process(JCas) method
static Object invokeNoArgsConstructor(String className)
          Returns an instantiation of the class specified by the input String.
 void process(JCas jCas)
          This process(JCas) method cycles through all annotations in the CAS.
 
Methods inherited from class org.apache.uima.fit.component.JCasAnnotator_ImplBase
getLogger
 
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_TOKEN_TYPE_NAME

public static final String PARAM_TOKEN_TYPE_NAME
Parameter name used in the UIMA descriptor file for the token type

See Also:
Constant Field Values

PARAM_TOKEN_GET_POS_METHOD_NAME

public static final String PARAM_TOKEN_GET_POS_METHOD_NAME
Parameter name used in the UIMA descriptor file for the name of the method that returns a part-of-speech (as a String) from the token annotation

See Also:
Constant Field Values

PARAM_POS_DECORATOR_CLASS

public static final String PARAM_POS_DECORATOR_CLASS
Parameter name used in the UIMA descriptor file for the PartOfSpeechDecorator implementation to use

See Also:
Constant Field Values

PARAM_LEMMA_DECORATOR_CLASS

public static final String PARAM_LEMMA_DECORATOR_CLASS
Parameter name used in the UIMA descriptor file for the LemmaDecorator implementation to use

See Also:
Constant Field Values

PARAM_ANNOTATION_DATA_EXTRACTOR_CLASS

public static final String PARAM_ANNOTATION_DATA_EXTRACTOR_CLASS
Parameter name used in the UIMA descriptor file for the annotation data extractor implementation to use

See Also:
Constant Field Values
Constructor Detail

BioLemmatizer_AE

public BioLemmatizer_AE()
Method Detail

initialize

public void initialize(UimaContext context)
                throws ResourceInitializationException
Initializes the BioLemmatizer that will be used by the process(JCas) method

Specified by:
initialize in interface AnalysisComponent
Overrides:
initialize in class org.apache.uima.fit.component.JCasAnnotator_ImplBase
Throws:
ResourceInitializationException
See Also:
org.uimafit.component.JCasAnnotator_ImplBase#initialize(org.apache.uima.UimaContext)

invokeNoArgsConstructor

public static Object invokeNoArgsConstructor(String className)
Returns an instantiation of the class specified by the input String. Assumes default constructor, i.e. no arguments.

Parameters:
className -
arguments -
Returns:

process

public void process(JCas jCas)
             throws AnalysisEngineProcessException
This process(JCas) method cycles through all annotations in the CAS. For those that are identified as tokens by AnnotationDataExtractor implementation being used, an attempt is made to extract part-of-speech information. The covered text for each token is then lemmatized using the BioLemmatizer, using the part-of-speech information if it was available. Results from the BioLemmatizer are added to the CAS via the specified LemmaDecorator implementation.

Specified by:
process in class JCasAnnotator_ImplBase
Throws:
AnalysisEngineProcessException
See Also:
JCasAnnotator_ImplBase.process(org.apache.uima.jcas.JCas)

createAnalysisEngineDescription

public static AnalysisEngineDescription createAnalysisEngineDescription(TypeSystemDescription tsd,
                                                                        Class<? extends Annotation> tokenClass,
                                                                        String tokenGetPosMethodName,
                                                                        Class<? extends edu.ucdenver.ccp.uima.shims.annotation.AnnotationDataExtractor> annotationDataExtractorClass,
                                                                        Class<? extends edu.ucdenver.ccp.uima.shims.annotation.syntactic.token.LemmaDecorator> lemmaDecoratorClass)
                                                                 throws ResourceInitializationException
Initializes an AnalysisEngine that will determine lemmas for tokens that are present in the CAS

Parameters:
tsd -
tokenClass -
tokenGetPosMethodName -
annotationDataExtractorClass -
lemmaDecoratorClass -
Returns:
Throws:
ResourceInitializationException

createAnalysisEngineDescription

public static AnalysisEngineDescription createAnalysisEngineDescription(TypeSystemDescription tsd,
                                                                        String tokenType,
                                                                        Class<? extends edu.ucdenver.ccp.uima.shims.annotation.syntactic.token.PartOfSpeechDecorator> partOfSpeechDecoratorClass,
                                                                        Class<? extends edu.ucdenver.ccp.uima.shims.annotation.AnnotationDataExtractor> annotationDataExtractorClass,
                                                                        Class<? extends edu.ucdenver.ccp.uima.shims.annotation.syntactic.token.LemmaDecorator> lemmaDecoratorClass)
                                                                 throws ResourceInitializationException
Parameters:
tsd -
tokenType -
partOfSpeechDecoratorClass -
annotationDataExtractorClass -
lemmaDecoratorClass -
Returns:
Throws:
ResourceInitializationException

createAnalysisEngineDescription

public static AnalysisEngineDescription createAnalysisEngineDescription(TypeSystemDescription tsd,
                                                                        Class<? extends Annotation> tokenClass)
                                                                 throws ResourceInitializationException
Parameters:
tsd -
tokenClass -
Returns:
Throws:
ResourceInitializationException

createAnalysisEngineDescription

public static AnalysisEngineDescription createAnalysisEngineDescription(TypeSystemDescription tsd,
                                                                        Class<? extends Annotation> tokenClass,
                                                                        String tokenGetPosMethodName)
                                                                 throws ResourceInitializationException
Parameters:
tsd -
tokenClass -
tokenGetPosMethodName -
Returns:
Throws:
ResourceInitializationException


Copyright © 2013. All Rights Reserved.