I think it may caused by a illegal word. If w1
or w2
is empty or all whitespace or does not appear in wordnet word list, you will get this exception when you fetch the wordID.
You get the exception in IndexWordID class, so I think this is the most possible problem. You could change the string you put to have a try, or give the code and string argument where you call the method for more information. You can see this doc http://projects.csail.mit.edu/jwi/api/edu/mit/jwi/item/IndexWordID.html