It's a bug I guess. When you do wn.synset('delayed.a.0')
the first two lines in the method are:
lemma, pos, synset_index_str = name.lower().rsplit('.', 2)
synset_index = int(synset_index_str) - 1
So in this case the value of synset_index
is -1
which is a valid index in python. And it won't fail when looking up in the array of synsets whose lemma
is delayed
and pos
is a
.
With this behavior you can do tricky things like:
>>> wn.synset('delay.v.-1')
Synset('stay.v.06')