Methods Summary |
---|
void | addToken(org.apache.lucene.analysis.Token token, float score)
if(numTokens < MAX_NUM_TOKENS_PER_GROUP)
{
if(numTokens==0)
{
startOffset=matchStartOffset=token.startOffset();
endOffset=matchEndOffset=token.endOffset();
tot += score;
}
else
{
startOffset=Math.min(startOffset,token.startOffset());
endOffset=Math.max(endOffset,token.endOffset());
if (score>0) {
if (tot==0) {
matchStartOffset=token.startOffset();
matchEndOffset=token.endOffset();
} else {
matchStartOffset=Math.min(matchStartOffset,token.startOffset());
matchEndOffset=Math.max(matchEndOffset,token.endOffset());
}
tot+=score;
}
}
tokens[numTokens]=token;
scores[numTokens]=score;
numTokens++;
}
|
void | clear()
numTokens=0;
tot=0;
|
public int | getEndOffset()
return endOffset;
|
public int | getNumTokens()
return numTokens;
|
public float | getScore(int index)
return scores[index];
|
public int | getStartOffset()
return startOffset;
|
public org.apache.lucene.analysis.Token | getToken(int index)
return tokens[index];
|
public float | getTotalScore()
return tot;
|
boolean | isDistinct(org.apache.lucene.analysis.Token token)
return token.startOffset()>=endOffset;
|