public final class TokenMatchUtil
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
private |
TokenMatchUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isTermMatch(RareWordTerm rareWordHit,
java.util.List<FastLookupToken> allTokens,
int termStartIndex,
int termEndIndex)
Hopefully the jit will inline this method
|
private static boolean |
isTokenMatch(char[] rareWordHitChars,
int hitCharIndex,
char[] tokenChars)
Check the rare word term to see if a given token is at a given index within that term
Hopefully the jit will inline this method
|
public static boolean isTermMatch(RareWordTerm rareWordHit, java.util.List<FastLookupToken> allTokens, int termStartIndex, int termEndIndex)
rareWordHit
- rare word term to check for matchallTokens
- all tokens in a windowtermStartIndex
- index of first token in allTokens to checktermEndIndex
- index of last token in allTokens to checkprivate static boolean isTokenMatch(char[] rareWordHitChars, int hitCharIndex, char[] tokenChars)
rareWordHitChars
- character array of all characters for the entire possible term (all words)hitCharIndex
- character index in rare word term to check for tokentokenChars
- character array of the search token