public class ConceptMapper
extends org.apache.uima.analysis_engine.annotator.Annotator_ImplBase
implements org.apache.uima.analysis_engine.annotator.TextAnnotator
Modifier and Type | Field and Description |
---|---|
protected String[] |
attributeNames
Array of attribute names for the XML dictionary token element, obtained as a configuration
parameter.
|
protected String[] |
featureNames
Array of feature names, obtained as a configuration parameter.
|
protected org.apache.uima.cas.Feature[] |
features
Array of Feature objects associated with {link #annotationType annotationType}
|
static String |
PARAM_ANNOTATION_NAME
Configuration parameter key/label for the annotation name
|
static String |
PARAM_ATTRIBUTE_LIST
Configuration parameter key/label for the attribute list
|
static String |
PARAM_DICT_FILE
Configuration parameter key/label for the dictionary file to load
|
static String |
PARAM_ENCLOSINGSPAN
Configuration parameter key/label for the name of the feature that contains the resulting
term's span, i.e.
|
static String |
PARAM_FEATURE_LIST
Configuration parameter key/label for the feature list
|
static String |
PARAM_FINDALLMATCHES |
static String |
PARAM_MATCHEDFEATURE
Configuration parameter feature in resulting annotation to store text matched in successful
dict lookup
|
static String |
PARAM_MATCHEDTOKENSFEATURENAME
Configuration parameter for name of feature in result annotations to contain list of matched
tokens
|
static String |
PARAM_ORDERINDEPENDENTLOOKUP
Configuration parameter key/label to indicate if order-independent lookup is to be performed.
|
static String |
PARAM_SEARCHSTRATEGY
Configuration parameter to indicate search strategy, either: LongestMatch: longest match of
contiguous tokens within enclosing span(taking into account included/excluded items).
|
static String |
PARAM_TOKENANNOTATION
Configuration parameter giving type of tokens
|
static String |
PARAM_TOKENCLASSFEATURENAME
Configuration parameter for name of token class feature of token annotations, to distinguish
classes of tokens to skip during lookups.
|
static String |
PARAM_TOKENCLASSWRITEBACKFEATURENAMES
array of features of the token annotation which should be written back to the token from the
resulting entry.
|
static String |
PARAM_TOKENTEXTFEATURENAME
Configuration parameter specifying name of token's feature containing text.
|
static String |
PARAM_TOKENTYPEFEATURENAME
Configuration parameter for name of token type feature of token annotations, to distinguish
types of tokens to skip during lookups.
|
static String |
PARAMVALUE_CONTIGUOUSMATCH |
static String |
PARAMVALUE_SKIPANYMATCH |
static String |
PARAMVALUE_SKIPANYMATCHALLOWOVERLAP |
protected String |
resultAnnotationName
The name of the annotation type posted to the CAS by this TAE
|
protected org.apache.uima.cas.Type |
resultAnnotationType
The type of annotation posted to the CAS by this TAE
|
protected org.apache.uima.cas.Type |
tokenType
The type of token annotations to consider
|
Constructor and Description |
---|
ConceptMapper() |
Modifier and Type | Method and Description |
---|---|
void |
initialize(org.apache.uima.analysis_engine.annotator.AnnotatorContext annotatorContext)
Initialize the annotator, which includes compilation of regular expressions, fetching
configuration parameters from XML descriptor file, and loading of the dictionary file.
|
protected void |
makeAnnotation(org.apache.uima.cas.CAS tcas,
int start,
int end,
EntryProperties properties,
org.apache.uima.jcas.tcas.Annotation spanAnnotation,
String matchedText,
Collection<org.apache.uima.cas.text.AnnotationFS> matched,
Logger log) |
void |
process(org.apache.uima.cas.CAS tcas,
org.apache.uima.analysis_engine.ResultSpecification aResultSpec)
Perform the actual analysis.
|
protected void |
processTokenList(int searchStrategy,
boolean findAllMatches,
org.apache.uima.cas.CAS tcas,
ArrayList<org.apache.uima.cas.text.AnnotationFS> tokens,
org.apache.uima.jcas.tcas.Annotation spanAnnotation) |
void |
typeSystemInit(org.apache.uima.cas.TypeSystem typeSystem)
Perform local type system initialization.
|
destroy, finalize, getContext, getTypeSystem, reconfigure
public static final String PARAM_DICT_FILE
public static final String PARAM_TOKENCLASSFEATURENAME
public static final String PARAM_TOKENTYPEFEATURENAME
public static final String PARAM_ANNOTATION_NAME
public static final String PARAM_ENCLOSINGSPAN
public static final String PARAM_MATCHEDFEATURE
public static final String PARAM_ATTRIBUTE_LIST
public static final String PARAM_FEATURE_LIST
public static final String PARAM_TOKENANNOTATION
public static final String PARAM_TOKENTEXTFEATURENAME
public static final String PARAM_TOKENCLASSWRITEBACKFEATURENAMES
public static final String PARAM_MATCHEDTOKENSFEATURENAME
public static final String PARAM_ORDERINDEPENDENTLOOKUP
public static final String PARAMVALUE_CONTIGUOUSMATCH
public static final String PARAMVALUE_SKIPANYMATCH
public static final String PARAMVALUE_SKIPANYMATCHALLOWOVERLAP
public static final String PARAM_SEARCHSTRATEGY
public static final String PARAM_FINDALLMATCHES
protected String resultAnnotationName
protected org.apache.uima.cas.Type resultAnnotationType
protected org.apache.uima.cas.Type tokenType
protected org.apache.uima.cas.Feature[] features
protected String[] featureNames
protected String[] attributeNames
public void initialize(org.apache.uima.analysis_engine.annotator.AnnotatorContext annotatorContext) throws org.apache.uima.analysis_engine.annotator.AnnotatorConfigurationException, org.apache.uima.analysis_engine.annotator.AnnotatorInitializationException
initialize
in interface org.apache.uima.analysis_engine.annotator.BaseAnnotator
initialize
in class org.apache.uima.analysis_engine.annotator.Annotator_ImplBase
org.apache.uima.analysis_engine.annotator.AnnotatorConfigurationException
org.apache.uima.analysis_engine.annotator.AnnotatorInitializationException
public void typeSystemInit(org.apache.uima.cas.TypeSystem typeSystem) throws org.apache.uima.analysis_engine.annotator.AnnotatorConfigurationException, org.apache.uima.analysis_engine.annotator.AnnotatorInitializationException
typeSystemInit
in interface org.apache.uima.analysis_engine.annotator.BaseAnnotator
typeSystemInit
in class org.apache.uima.analysis_engine.annotator.Annotator_ImplBase
typeSystem
- the current type system.org.apache.uima.analysis_engine.annotator.AnnotatorConfigurationException
org.apache.uima.analysis_engine.annotator.AnnotatorInitializationException
BaseAnnotator.typeSystemInit(TypeSystem)
public void process(org.apache.uima.cas.CAS tcas, org.apache.uima.analysis_engine.ResultSpecification aResultSpec) throws org.apache.uima.analysis_engine.annotator.AnnotatorProcessException
process
in interface org.apache.uima.analysis_engine.annotator.TextAnnotator
tcas
- the current CAS to process.aResultSpec
- a specification of the result annotation that should be created by this annotatororg.apache.uima.analysis_engine.annotator.AnnotatorProcessException
TextAnnotator.process(CAS,ResultSpecification)
protected void processTokenList(int searchStrategy, boolean findAllMatches, org.apache.uima.cas.CAS tcas, ArrayList<org.apache.uima.cas.text.AnnotationFS> tokens, org.apache.uima.jcas.tcas.Annotation spanAnnotation)
searchStrategy
- tcas
- tokens
- spanAnnotation
- protected void makeAnnotation(org.apache.uima.cas.CAS tcas, int start, int end, EntryProperties properties, org.apache.uima.jcas.tcas.Annotation spanAnnotation, String matchedText, Collection<org.apache.uima.cas.text.AnnotationFS> matched, Logger log)
start
- end
- properties
- matched
- Copyright © 2006–2014 The Apache Software Foundation. All rights reserved.