public class MedAttrAnnotator
extends org.apache.uima.analysis_component.JCasAnnotator_ImplBase
| Modifier and Type | Field and Description |
|---|---|
static String |
ALLOW_MULT_ANNO |
static String |
REGEX_FILE |
| Constructor and Description |
|---|
MedAttrAnnotator() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addToJCas2(org.apache.uima.jcas.JCas jcas,
List<org.ohnlp.ae.medxn.MedAttrAnnotator.Attribute> annot) |
protected List<org.ohnlp.ae.medxn.MedAttrAnnotator.Attribute> |
getAttribute2(String text)
Find and return medication attributes in text
|
protected Map<String,List<String>> |
getRegEx(InputStream input)
Return regular expression patterns for med attributes
|
void |
initialize(org.apache.uima.UimaContext uimaContext) |
void |
process(org.apache.uima.jcas.JCas jcas) |
protected List<org.ohnlp.ae.medxn.MedAttrAnnotator.Attribute> |
removeOverlap(List<org.ohnlp.ae.medxn.MedAttrAnnotator.Attribute> attr)
Remove duplicates or take a longer attribute if subsumed
and return the updated list of Attribute
|
getRequiredCasInterface, processgetCasInstancesRequired, hasNext, nextpublic static final String REGEX_FILE
public static final String ALLOW_MULT_ANNO
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 process(org.apache.uima.jcas.JCas jcas)
throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
process in class org.apache.uima.analysis_component.JCasAnnotator_ImplBaseorg.apache.uima.analysis_engine.AnalysisEngineProcessExceptionprotected void addToJCas2(org.apache.uima.jcas.JCas jcas,
List<org.ohnlp.ae.medxn.MedAttrAnnotator.Attribute> annot)
protected List<org.ohnlp.ae.medxn.MedAttrAnnotator.Attribute> getAttribute2(String text)
text - String to extract attributesprotected List<org.ohnlp.ae.medxn.MedAttrAnnotator.Attribute> removeOverlap(List<org.ohnlp.ae.medxn.MedAttrAnnotator.Attribute> attr)
attr - List of Attribute classprotected Map<String,List<String>> getRegEx(InputStream input)
input - file name of the regEx fileCopyright © 2018 JULIE Lab, Germany. All rights reserved.