I would like to use WordNet-Affect with NLTK. I downloaded WordNet Domains (3.2), which contains the file binding (I thought) that the shifts in WordNet are biased with the category of emotions. Example:
<noun-syn id="n#05574157" categ="weakness"/>
I thought the id property is a synchronization offset. Then I tried this code:
from nltk.corpus import wordnet as wn idToSynset = {s.offset():s for s in wn.all_synsets()} idToSynset[5574157]
But I got a key error ... WordNet-Affect was created for WordNet 1.6, but the current version of WordNet 3.0. Perhaps the reason synchronization offsets no longer match, is it? Can I use an old version of WordNet in NLTK?
source share