public OkapiBM25(double k1,double b){
  if (Double.isNaN(k1) || Double.isInfinite(k1) || k1 < 0)   throw new IllegalArgumentException("coefficient k1 must be a non negative constant, not " + k1);
  this.k1=k1;
  if (Double.isNaN(b) || b < 0 || b > 1)   throw new IllegalArgumentException("coefficient b must be in the range [0,1], not " + b);
  this.b=b;
}

public OkapiBM25 ( double k1 , double b ) { if ( Double . isNaN ( k1 ) || Double . isInfinite ( k1 ) || k1 < 0 ) throw new IllegalArgumentException ( "coefficient k1 must be a non negative constant, not " + k1 ) ; this . k1 = k1 ; if ( Double . isNaN ( b ) || b < 0 || b > 1 ) throw new IllegalArgumentException ( "coefficient b must be in the range [0,1], not " + b ) ; this . b = b ; }
creates a new okapi object
