public class ConceptMapper
extends org.apache.uima.analysis_component.JCasAnnotator_ImplBase
| 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}
|
Logger |
logger |
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.UimaContext uimaContext)
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.jcas.JCas jCas)
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.
|
getRequiredCasInterface, processgetCasInstancesRequired, hasNext, nextpublic 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 Logger logger
public void initialize(org.apache.uima.UimaContext uimaContext)
throws org.apache.uima.resource.ResourceInitializationException
initialize in interface org.apache.uima.analysis_component.AnalysisComponentinitialize in class org.apache.uima.analysis_component.AnalysisComponent_ImplBaseorg.apache.uima.resource.ResourceInitializationExceptionpublic void typeSystemInit(org.apache.uima.cas.TypeSystem typeSystem)
throws org.apache.uima.analysis_engine.annotator.AnnotatorConfigurationException,
org.apache.uima.analysis_engine.annotator.AnnotatorInitializationException
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.jcas.JCas jCas)
throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
process in class org.apache.uima.analysis_component.JCasAnnotator_ImplBasejCas - the current CAS to process.org.apache.uima.analysis_engine.AnalysisEngineProcessException - -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 - -findAllMatches - true to find all matchestcas - the Castokens - -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)
tcas - -start - -end - -properties - -spanAnnotation - -matchedText - -matched - -log - -Copyright © 2006–2018 The Apache Software Foundation. All rights reserved.