Methods Summary |
---|
void | addToken(org.apache.lucene.analysis.Token token, float score)
if(numTokens < MAX_NUM_TOKENS_PER_GROUP)
{
if(numTokens==0)
{
startOffset=token.startOffset();
endOffset=token.endOffset();
}
else
{
startOffset=Math.min(startOffset,token.startOffset());
endOffset=Math.max(endOffset,token.endOffset());
}
tokens[numTokens]=token;
scores[numTokens]=score;
numTokens++;
}
|
void | clear()
numTokens=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()
float total=0;
for (int i = 0; i < numTokens; i++)
{
total+=scores[i];
}
return total;
|
boolean | isDistinct(org.apache.lucene.analysis.Token token)
return token.startOffset()>=endOffset;
|