public float getTokenScore() {position += posIncAtt.getPositionIncrement();String termText = termAtt.toString();WeightedSpanTerm weightedSpanTerm;if ((weightedSpanTerm = fieldWeightedSpanTerms.get(termText)) == null) {return 0;}if (weightedSpanTerm.positionSensitive &&!weightedSpanTerm.checkPosition(position)) {return 0;}float score = weightedSpanTerm.getWeight();if (!foundTerms.contains(termText)) {totalScore += score;foundTerms.add(termText);}return score;}

public virtual float GetTokenScore(){position += posIncAtt.PositionIncrement;string termText = termAtt.ToString();WeightedSpanTerm weightedSpanTerm;if (!fieldWeightedSpanTerms.TryGetValue(termText, out weightedSpanTerm) || weightedSpanTerm == null){return 0;}if (weightedSpanTerm.IsPositionSensitive &&!weightedSpanTerm.CheckPosition(position)){return 0;}float score = weightedSpanTerm.Weight;if (!foundTerms.Contains(termText)){totalScore += score;foundTerms.Add(termText);}return score;}
