public static float DecodeNorm(byte b) { return NORM_TABLE[b & 0xFF]; // & 0xFF maps negative bytes to positive above 127 }
public override float Score() { //System.out.println("scoring " + first.doc); float raw = Similarity.Tf(freq) * value_Renamed; // raw score return(norms == null?raw:raw *Similarity.DecodeNorm(norms[first.doc])); // normalize }