Using NLTK is there a way of getting the word and its POS given the Synset ID?
I have a set if Synset ID and their corresponding domains, I need a way to extract label using the SynsetID Thanks
Ankit
Using NLTK is there a way of getting the word and its POS given the Synset ID?
I have a set if Synset ID and their corresponding domains, I need a way to extract label using the SynsetID Thanks
Ankit
Now with nltk 3.2.4 (and probably already a bit before), you can simply use the method synset_from_pos_and_offset(pos, offset) from the nltk.corpus.reader.wordnet module
import nltk
from nltk.corpus import wordnet
wordnet.synset_from_pos_and_offset('n',2403454)