termlist[(*num)++] = words[i];
}
break;
- default: // NOOP
+ default:
break;
}
}
}
}
// Calculate relevance for each document
-
while (1)
{
int t;
break;
for (t = 1; t < rel->vec_len; t++)
{
- float termfreq;
-#if 1
- termfreq = (float) rec->term_frequency_vecf[t];
-#else
- if (rec->term_frequency_vec[0])
- {
- termfreq = (float)
- rec->term_frequency_vec[t] / rec->term_frequency_vec[0] ;
- }
- else
- termfreq = 0.0;
-#endif
+ float termfreq = (float) rec->term_frequency_vecf[t];
relevance += 100000 * (termfreq * idfvec[t] + 0.0000005);
}
rec->relevance_score = relevance;