protected double calculateCoefficient(int position){
  double coefficient;
switch (blenderType) {
case POSITION_LINEAR:
    coefficient=1 - LINEAR_COEF * position;
  break;
case POSITION_RECIPROCAL:
coefficient=1. / (position + 1);
break;
case POSITION_EXPONENTIAL_RECIPROCAL:
coefficient=1. / Math.pow((position + 1.0),exponent);
break;
default :
coefficient=1;
}
return coefficient;
}

protected double calculateCoefficient ( int position ) { double coefficient ; switch ( blenderType ) { case POSITION_LINEAR : coefficient = 1 - LINEAR_COEF * position ; break ; case POSITION_RECIPROCAL : coefficient = 1. / ( position + 1 ) ; break ; case POSITION_EXPONENTIAL_RECIPROCAL : coefficient = 1. / Math . pow ( ( position + 1.0 ) , exponent ) ; break ; default : coefficient = 1 ; } return coefficient ; }
calculate the weight coefficient based on the position of the first matching word . subclass should override it to adapt it to particular needs
