|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.uima.analysis_engine.annotator.Annotator_ImplBase
org.apache.uima.conceptMapper.ConceptMapper
public class ConceptMapper
Field Summary | |
---|---|
protected java.lang.String[] |
attributeNames
Array of attribute names for the XML dictionary token element, obtained as a configuration parameter. |
protected java.lang.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 java.lang.String |
PARAM_ANNOTATION_NAME
Configuration parameter key/label for the annotation name |
static java.lang.String |
PARAM_ATTRIBUTE_LIST
Configuration parameter key/label for the attribute list |
static java.lang.String |
PARAM_DICT_FILE
Configuration parameter key/label for the dictionary file to load |
static java.lang.String |
PARAM_ENCLOSINGSPAN
Configuration parameter key/label for the name of the feature that contains the resulting term's span, i.e. |
static java.lang.String |
PARAM_FEATURE_LIST
Configuration parameter key/label for the feature list |
static java.lang.String |
PARAM_FINDALLMATCHES
|
static java.lang.String |
PARAM_MATCHEDFEATURE
Configuration parameter feature in resulting annotation to store text matched in successful dict lookup |
static java.lang.String |
PARAM_MATCHEDTOKENSFEATURENAME
Configuration parameter for name of feature in result annotations to contain list of matched tokens |
static java.lang.String |
PARAM_ORDERINDEPENDENTLOOKUP
Configuration parameter key/label to indicate if order-independent lookup is to be performed. |
static java.lang.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 java.lang.String |
PARAM_TOKENANNOTATION
Configuration parameter giving type of tokens |
static java.lang.String |
PARAM_TOKENCLASSFEATURENAME
Configuration parameter for name of token class feature of token annotations, to distinguish classes of tokens to skip during lookups. |
static java.lang.String |
PARAM_TOKENCLASSWRITEBACKFEATURENAMES
array of features of the token annotation which should be written back to the token from the resulting entry. |
static java.lang.String |
PARAM_TOKENTEXTFEATURENAME
Configuration parameter specifying name of token's feature containing text. |
static java.lang.String |
PARAM_TOKENTYPEFEATURENAME
Configuration parameter for name of token type feature of token annotations, to distinguish types of tokens to skip during lookups. |
static java.lang.String |
PARAMVALUE_CONTIGUOUSMATCH
|
static java.lang.String |
PARAMVALUE_SKIPANYMATCH
|
static java.lang.String |
PARAMVALUE_SKIPANYMATCHALLOWOVERLAP
|
protected java.lang.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 Summary | |
---|---|
ConceptMapper()
|
Method Summary | |
---|---|
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,
java.lang.String matchedText,
java.util.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,
java.util.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. |
Methods inherited from class org.apache.uima.analysis_engine.annotator.Annotator_ImplBase |
---|
destroy, finalize, getContext, getTypeSystem, reconfigure |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.uima.analysis_engine.annotator.BaseAnnotator |
---|
destroy, reconfigure |
Field Detail |
---|
public static final java.lang.String PARAM_DICT_FILE
public static final java.lang.String PARAM_TOKENCLASSFEATURENAME
public static final java.lang.String PARAM_TOKENTYPEFEATURENAME
public static final java.lang.String PARAM_ANNOTATION_NAME
public static final java.lang.String PARAM_ENCLOSINGSPAN
public static final java.lang.String PARAM_MATCHEDFEATURE
public static final java.lang.String PARAM_ATTRIBUTE_LIST
public static final java.lang.String PARAM_FEATURE_LIST
public static final java.lang.String PARAM_TOKENANNOTATION
public static final java.lang.String PARAM_TOKENTEXTFEATURENAME
public static final java.lang.String PARAM_TOKENCLASSWRITEBACKFEATURENAMES
public static final java.lang.String PARAM_MATCHEDTOKENSFEATURENAME
public static final java.lang.String PARAM_ORDERINDEPENDENTLOOKUP
public static final java.lang.String PARAMVALUE_CONTIGUOUSMATCH
public static final java.lang.String PARAMVALUE_SKIPANYMATCH
public static final java.lang.String PARAMVALUE_SKIPANYMATCHALLOWOVERLAP
public static final java.lang.String PARAM_SEARCHSTRATEGY
public static final java.lang.String PARAM_FINDALLMATCHES
protected java.lang.String resultAnnotationName
protected org.apache.uima.cas.Type resultAnnotationType
protected org.apache.uima.cas.Type tokenType
protected org.apache.uima.cas.Feature[] features
protected java.lang.String[] featureNames
protected java.lang.String[] attributeNames
Constructor Detail |
---|
public ConceptMapper()
Method Detail |
---|
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 annotator
org.apache.uima.analysis_engine.annotator.AnnotatorProcessException
TextAnnotator.process(CAS,ResultSpecification)
protected void processTokenList(int searchStrategy, boolean findAllMatches, org.apache.uima.cas.CAS tcas, java.util.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, java.lang.String matchedText, java.util.Collection<org.apache.uima.cas.text.AnnotationFS> matched, Logger log)
start
- end
- properties
- matched
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |