org.apache.ctakes.dictionary.lookup.ae
Class DirectLookupInitializerImpl

java.lang.Object
  extended by org.apache.ctakes.dictionary.lookup.ae.DirectLookupInitializerImpl
All Implemented Interfaces:
LookupInitializer

public class DirectLookupInitializerImpl
extends java.lang.Object
implements LookupInitializer

Author:
Mayo Clinic

Constructor Summary
DirectLookupInitializerImpl(org.apache.uima.UimaContext aCtx, java.util.Properties props)
           
 
Method Summary
 java.util.Map getContextMap(org.apache.uima.jcas.JCas jcas, int windowBegin, int windowEnd)
          Gets context for the specified window.
 LookupAlgorithm getLookupAlgorithm(DictionaryEngine dictEngine)
          Gets the LookupAlgorithm to be used to perform the lookup operations.
 java.util.Iterator getLookupTokenIterator(org.apache.uima.jcas.JCas jcas)
          Gets an iteration of tokens that represent the finest grain used for a lookup operation.
 java.util.Iterator getLookupWindowIterator(org.apache.uima.jcas.JCas jcas)
          Gets an iteration of windows.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectLookupInitializerImpl

public DirectLookupInitializerImpl(org.apache.uima.UimaContext aCtx,
                                   java.util.Properties props)
Method Detail

getLookupAlgorithm

public LookupAlgorithm getLookupAlgorithm(DictionaryEngine dictEngine)
                                   throws org.apache.uima.analysis_engine.annotator.AnnotatorInitializationException
Description copied from interface: LookupInitializer
Gets the LookupAlgorithm to be used to perform the lookup operations. Properties specified from the descriptor will be passed in to customize the behavior of the algorithm.

Specified by:
getLookupAlgorithm in interface LookupInitializer
Parameters:
dictEngine - DictionaryEngine that will execute lookup operations.
Returns:
LookupAlgorithm that will be used for lookup operations.
Throws:
org.apache.uima.analysis_engine.annotator.AnnotatorInitializationException

getLookupTokenIterator

public java.util.Iterator getLookupTokenIterator(org.apache.uima.jcas.JCas jcas)
                                          throws org.apache.uima.analysis_engine.annotator.AnnotatorInitializationException
Description copied from interface: LookupInitializer
Gets an iteration of tokens that represent the finest grain used for a lookup operation. These tokens may be as simple as a single word or perhaps an entire phrase.

Specified by:
getLookupTokenIterator in interface LookupInitializer
Parameters:
jcas - Use the JCas to pull out pre-existing feature structures to build the LookupToken objects. Add attributes to the LookupToken objects as you see fit.
Returns:
Iterator over LookupToken objects.
Throws:
org.apache.uima.analysis_engine.annotator.AnnotatorInitializationException

getLookupWindowIterator

public java.util.Iterator getLookupWindowIterator(org.apache.uima.jcas.JCas jcas)
                                           throws org.apache.uima.analysis_engine.annotator.AnnotatorInitializationException
Description copied from interface: LookupInitializer
Gets an iteration of windows. A window is used to scope which LookupToken objects are passed to the LookupAlgorithm.

Specified by:
getLookupWindowIterator in interface LookupInitializer
Parameters:
jcas - Use the JCas to pull out pre-existing feature structures to build LookupAnnotation objects.
Returns:
Iterator over org.apache.uima.jcas.tcas.Annotation objects, each representing a window.
Throws:
org.apache.uima.analysis_engine.annotator.AnnotatorInitializationException

getContextMap

public java.util.Map getContextMap(org.apache.uima.jcas.JCas jcas,
                                   int windowBegin,
                                   int windowEnd)
Description copied from interface: LookupInitializer
Gets context for the specified window.

Specified by:
getContextMap in interface LookupInitializer
Returns: