dog_sense = wn.synsets('dog')[0]
jb_sense = wn.synsets('James_Baldwin')[0]
human = wn.synset('person.n.01')
animal = wn.synset('animal.n.01')
if dog_sense.wup_similarity(animal) > dog_sense.wup_similarity(human):
    print('Dog is more of an animal than human')
elif dog_sense.wup_similarity(animal) < dog_sense.wup_similarity(human):
    pass
Wordnet selectional restrictions in NLTK