|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ctakes.necontexts.ContextAnalyzerAdapter
public class ContextAnalyzerAdapter
| Constructor Summary | |
|---|---|
ContextAnalyzerAdapter()
|
|
| Method Summary | |
|---|---|
ContextHit |
analyzeContext(List<? extends org.apache.uima.jcas.tcas.Annotation> tokenList,
int scope)
This method is called by the ContextAnnotator. |
void |
initialize(org.apache.uima.UimaContext annotatorContext)
This will be called by the ContextAnnotator during its initialize method |
boolean |
isBoundary(org.apache.uima.jcas.tcas.Annotation tokenAnnot,
int scope)
This method is called by the ContextAnnotator. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ContextAnalyzerAdapter()
| Method Detail |
|---|
public ContextHit analyzeContext(List<? extends org.apache.uima.jcas.tcas.Annotation> tokenList,
int scope)
throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
ContextAnalyzerThis method analyzes a list of context annotations to determine if there is a "context hit" - some event that we are looking for in the context.
analyzeContext in interface ContextAnalyzertokenList - the annotations to be analyzedscope - the scope of the context annotator. The value will be the
left, right, middle, or "all" context.
org.apache.uima.analysis_engine.AnalysisEngineProcessExceptionNegationContextAnalyzer.analyzeContext(List, int),
ContextAnnotator.LEFT_SCOPE,
ContextAnnotator.RIGHT_SCOPE,
ContextAnnotator.MIDDLE_SCOPE,
ContextAnnotator.ALL_SCOPE
public void initialize(org.apache.uima.UimaContext annotatorContext)
throws org.apache.uima.resource.ResourceInitializationException
ContextAnalyzer
initialize in interface ContextAnalyzerorg.apache.uima.resource.ResourceInitializationException
public boolean isBoundary(org.apache.uima.jcas.tcas.Annotation tokenAnnot,
int scope)
throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
ContextAnalyzerFor the left and right scopes, the context annotator will collect a number of annotations up to the maximum specified by the appropriate parameter unless it comes to the edge of the window annotation or a boundary condition is met as specified by this method. For example, you may specify that the scope is LEFT, the maximum left scope size is 10, the context annotation is a token of some sort, and the window annotation is a sentence. The context annotator will collect the annotations to the left of the focus annotation such that there will be no more than 10 context annotations, they will all be inside the sentence, and no context annotations will be collected to the left of a boundary condition as specified by this method.
isBoundary in interface ContextAnalyzertokenAnnot - the context annotation that may or may not satisfy a boundary
conditionscope - the scope of the context annotator. The value will be the left
or right scope.
org.apache.uima.analysis_engine.AnalysisEngineProcessExceptionContextAnnotator.LEFT_SCOPE,
ContextAnnotator.RIGHT_SCOPE,
NamedEntityContextAnalyzer.isBoundary(Annotation, int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||