Oliver Steele
-
2004-07-19
- status: open --> closed-fixed
If the word you are looking up is lexically greater
than the entire index file then the binarySearchFile
method goes into an infinite loop.
Trying Wordnet.ADV.has_key('zoo')
the last adverb in the index is zigzag
THe fix is simply to change the test in
binarySearchFile from
while start < end:
to
while start+1 < end:
because in that case where the key < all entries you
end up with start = end -1 NOT start = end