public class MedExtAnnotator
extends org.apache.uima.analysis_component.JCasAnnotator_ImplBase
| Modifier and Type | Field and Description |
|---|---|
static int |
SENT_WINDOW_SPAN |
static int |
SENT_WINDOW_SPAN_DUR |
| Constructor and Description |
|---|
MedExtAnnotator() |
| Modifier and Type | Method and Description |
|---|---|
protected int |
contains(int b1,
int e1,
int b2,
int e2)
Returns 1 if 1 contains or equal to 2
Returns 2 if 2 contains or equal to 1
Returns 0 otherwise
|
void |
initialize(org.apache.uima.UimaContext uimaContext) |
protected boolean |
isFalseMed1(String med)
Check if the given drug is true or not
|
void |
process(org.apache.uima.jcas.JCas jcas) |
protected int[] |
setWindow(org.apache.uima.jcas.JCas jcas,
Medication drug,
int nextDrugBegin,
int prevDrugEnd,
int windowSpan)
NOTE THAT THIS IS SPECIFIC FOR MAYO DATA
return the offsets: begin of the given drug and the smaller
of 1) the end of +2 sentences or 2) begin of the next drug
Mayo specific:
"BUT if there is newline and it does not start with Instruction
or Indication, the end becomes newline"
|
getRequiredCasInterface, processgetCasInstancesRequired, hasNext, nextpublic static final int SENT_WINDOW_SPAN
public static final int SENT_WINDOW_SPAN_DUR
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 int[] setWindow(org.apache.uima.jcas.JCas jcas,
Medication drug,
int nextDrugBegin,
int prevDrugEnd,
int windowSpan)
jcas - drug - nextDrugBegin - protected boolean isFalseMed1(String med)
md - protected int contains(int b1,
int e1,
int b2,
int e2)
Copyright © 2018 JULIE Lab, Germany. All rights reserved.