public class FirstTokenPermutationImpl extends Object implements LookupAlgorithm
Modifier and Type | Field and Description |
---|---|
static String |
CTX_KEY_WINDOW_ANNOTATIONS
Key value for context map.
|
static String |
LT_KEY_USE_FOR_LOOKUP
Key value for LookupToken attribute.
|
Constructor and Description |
---|
FirstTokenPermutationImpl(DictionaryEngine firstTokenDictEngine,
PhraseBuilder phraseBuilder,
String[] textMetaFieldNames,
int maxPermutationLevel)
Constructor
|
Modifier and Type | Method and Description |
---|---|
Collection<LookupHit> |
lookup(List<LookupToken> lookupTokenList,
Map<String,List<LookupAnnotation>> contextMap)
Lookup the given text specified via LookupToken objects.
|
public static final String CTX_KEY_WINDOW_ANNOTATIONS
public static final String LT_KEY_USE_FOR_LOOKUP
public FirstTokenPermutationImpl(DictionaryEngine firstTokenDictEngine, PhraseBuilder phraseBuilder, String[] textMetaFieldNames, int maxPermutationLevel)
firstTokenDictEngine
- Dictionary that is indexed against first tokens.phraseBuilder
- Builds phrases to match against Dictionary.textMetaFieldNames
- MetaFieldNames used to extract presentations.maxPermutationLevel
- Max permutation Level allowed.public Collection<LookupHit> lookup(List<LookupToken> lookupTokenList, Map<String,List<LookupAnnotation>> contextMap) throws Exception
lookup
in interface LookupAlgorithm
lookupTokenList
- List of LookupTokens, must be sorted.contextMap
- Map where key=Impl specific String object and value=List of
LookupAnnotation objectsException
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.