Open fortable1999 opened 12 years ago
Original comment by Matt Chaput (Bitbucket: mchaput, GitHub: mchaput).
Sorry for the delay in replying. If the frequency call returns 0, it's a bug, since that would indicate a mis-match between what's in the index and what's in the word graph. In the code in the repo I inserted an "assert" statement for this so at least the error message will be slightly clearer.
Original report by Andrew T (Bitbucket: scyclops, GitHub: scyclops).
when the call to freq returns 0, it causes a divide by zero error in the score calculation
i solved this by taking the max of the freq result and 0.1 but i'm not sure if that's the most appropriate solution