public class FirstTokenPermLookupInitializerImpl extends Object implements LookupInitializer
Modifier and Type | Field and Description |
---|---|
protected Constructor |
lookupTokenAdapterCtor |
Constructor and Description |
---|
FirstTokenPermLookupInitializerImpl(org.apache.uima.UimaContext uimaContext,
Properties props) |
Modifier and Type | Method and Description |
---|---|
Map<String,List<LookupAnnotation>> |
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.
|
Iterator<LookupToken> |
getLookupTokenIterator(org.apache.uima.jcas.JCas jcas)
Gets an iteration of tokens that represent the finest grain used for a
lookup operation.
|
Iterator<org.apache.uima.jcas.tcas.Annotation> |
getLookupWindowIterator(org.apache.uima.jcas.JCas jcas)
Gets an iteration of windows.
|
List<LookupToken> |
getSortedLookupTokens(org.apache.uima.jcas.JCas jcas,
org.apache.uima.jcas.tcas.Annotation covering)
Gets a list of tokens that we promise to return in sorted order that are constrained by the
input annotation.
|
protected Constructor lookupTokenAdapterCtor
public FirstTokenPermLookupInitializerImpl(org.apache.uima.UimaContext uimaContext, Properties props) throws ClassNotFoundException, IllegalAccessException, NoSuchFieldException
public LookupAlgorithm getLookupAlgorithm(DictionaryEngine dictEngine) throws org.apache.uima.analysis_engine.annotator.AnnotatorInitializationException
getLookupAlgorithm
in interface LookupInitializer
dictEngine
- DictionaryEngine that will execute lookup operations.org.apache.uima.analysis_engine.annotator.AnnotatorInitializationException
public Iterator<LookupToken> getLookupTokenIterator(org.apache.uima.jcas.JCas jcas) throws org.apache.uima.analysis_engine.annotator.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.org.apache.uima.analysis_engine.annotator.AnnotatorInitializationException
public Iterator<org.apache.uima.jcas.tcas.Annotation> getLookupWindowIterator(org.apache.uima.jcas.JCas jcas) throws org.apache.uima.analysis_engine.annotator.AnnotatorInitializationException
getLookupWindowIterator
in interface LookupInitializer
jcas
- Use the JCas to pull out pre-existing feature structures to
build LookupAnnotation objects.org.apache.uima.analysis_engine.annotator.AnnotatorInitializationException
public Map<String,List<LookupAnnotation>> getContextMap(org.apache.uima.jcas.JCas jcas, int windowBegin, int windowEnd) throws org.apache.uima.analysis_engine.annotator.AnnotatorInitializationException
getContextMap
in interface LookupInitializer
org.apache.uima.analysis_engine.annotator.AnnotatorInitializationException
public List<LookupToken> getSortedLookupTokens(org.apache.uima.jcas.JCas jcas, org.apache.uima.jcas.tcas.Annotation covering) throws org.apache.uima.analysis_engine.annotator.AnnotatorInitializationException
getSortedLookupTokens
in interface LookupInitializer
org.apache.uima.analysis_engine.annotator.AnnotatorInitializationException
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.