public class FirstTokenPermLookupInitializerImpl extends java.lang.Object implements LookupInitializer
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
CANONICAL_VARIANT_ATTR |
private static java.lang.String |
EXC_TAGS_PRP_KEY |
private static java.lang.String |
FALSE_STRING |
private int[] |
iv_annotTypeArr |
private java.util.Set<java.lang.String> |
iv_exclusionTagSet |
private Logger |
iv_logger |
private java.util.Properties |
iv_props |
private static java.lang.String |
MAX_P_LEVEL_PRP_KEY |
private static java.lang.String |
TEXT_MFS_PRP_KEY |
private static java.lang.String |
TRUE_STRING |
private static java.lang.String |
WINDOW_ANNOT_PRP_KEY |
Constructor and Description |
---|
FirstTokenPermLookupInitializerImpl(UimaContext uimaContext,
java.util.Properties props) |
Modifier and Type | Method and Description |
---|---|
private static java.util.List<LookupAnnotation> |
constrainToWindow(int begin,
int end,
java.util.Iterator<Annotation> annotItr)
Gets a list of LookupAnnotation objects within the specified window.
|
java.util.Map<java.lang.String,java.util.List<LookupAnnotation>> |
getContextMap(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<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 covering)
Gets a list of tokens that we promise to return in sorted order that are constrained by the
input annotation.
|
private boolean |
isTagExcluded(java.lang.String tag) |
private static final java.lang.String TRUE_STRING
private static final java.lang.String FALSE_STRING
private final Logger iv_logger
private static final java.lang.String TEXT_MFS_PRP_KEY
private static final java.lang.String MAX_P_LEVEL_PRP_KEY
private static final java.lang.String WINDOW_ANNOT_PRP_KEY
private static final java.lang.String EXC_TAGS_PRP_KEY
private static final java.lang.String CANONICAL_VARIANT_ATTR
private final java.util.Properties iv_props
private final int[] iv_annotTypeArr
private final java.util.Set<java.lang.String> iv_exclusionTagSet
public FirstTokenPermLookupInitializerImpl(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
private boolean isTagExcluded(java.lang.String tag)
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) throws AnnotatorInitializationException
getContextMap
in interface LookupInitializer
AnnotatorInitializationException
private static java.util.List<LookupAnnotation> constrainToWindow(int begin, int end, java.util.Iterator<Annotation> annotItr)
annotItr
- -public java.util.List<LookupToken> getSortedLookupTokens(JCas jcas, Annotation covering) throws AnnotatorInitializationException
getSortedLookupTokens
in interface LookupInitializer
AnnotatorInitializationException