public class DirectLookupInitializerImpl extends java.lang.Object implements LookupInitializer
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
CANONICAL_VARIANT_ATTR |
private Logger |
iv_logger |
Constructor and Description |
---|
DirectLookupInitializerImpl(UimaContext uimaContext,
java.util.Properties props) |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.util.List<LookupAnnotation>> |
getContextMap(JCas jcas,
int windowBegin,
int windowEnd)
returns an empty map
Gets context for the specified window.
|
LookupAlgorithm |
getLookupAlgorithm(DictionaryEngine dictEngine)
Gets the LookupAlgorithm to be used to perform the lookup operations.
|
java.util.Iterator<LookupToken> |
getLookupTokenIterator(JCas jcas)
Gets an iteration of tokens that represent the finest grain used for a
lookup operation.
|
java.util.Iterator<Annotation> |
getLookupWindowIterator(JCas jcas)
Gets an iteration of windows.
|
java.util.List<LookupToken> |
getSortedLookupTokens(JCas jcas,
Annotation annotation)
Gets a list of tokens that we promise to return in sorted order that are constrained by the
input annotation.
|
private final java.lang.String CANONICAL_VARIANT_ATTR
private final Logger iv_logger
public DirectLookupInitializerImpl(UimaContext uimaContext, java.util.Properties props)
public LookupAlgorithm getLookupAlgorithm(DictionaryEngine dictEngine) throws AnnotatorInitializationException
getLookupAlgorithm
in interface LookupInitializer
dictEngine
- DictionaryEngine that will execute lookup operations.AnnotatorInitializationException
public java.util.Iterator<LookupToken> getLookupTokenIterator(JCas jcas) throws AnnotatorInitializationException
getLookupTokenIterator
in interface LookupInitializer
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.AnnotatorInitializationException
public java.util.Iterator<Annotation> getLookupWindowIterator(JCas jcas) throws AnnotatorInitializationException
getLookupWindowIterator
in interface LookupInitializer
jcas
- Use the JCas to pull out pre-existing feature structures to
build LookupAnnotation objects.AnnotatorInitializationException
public java.util.Map<java.lang.String,java.util.List<LookupAnnotation>> getContextMap(JCas jcas, int windowBegin, int windowEnd)
getContextMap
in interface LookupInitializer
public java.util.List<LookupToken> getSortedLookupTokens(JCas jcas, Annotation annotation) throws AnnotatorInitializationException
getSortedLookupTokens
in interface LookupInitializer
AnnotatorInitializationException