I am trying to work on finding Synsets
in WordNet (which is Lexical database for English)
using python.
Here is the code which I am trying to find synsets and example of that synsets (passed as parameter):
from nltk.corpus import wordnet
synonynm=wordnet.synsets('friend')[2]#? wt does[0] mean
synonynm.name() #related synonyms wrds
synonynm.definition() #definition of passed words
wordnet.synsets('friend')[0].examples()
When I use index wordnet.synsets('friend')[0]
or wordnet.synsets('friend')[1]
or wordnet.synsets('friend')[2]
it gives me same output that can be viewed here
['he was my best friend at the university']
but if did place braces empty it showed error []
so i just want to know is the difference in uasge between
synonynm=wordnet.synsets('friend')[0]
and this
wordnet.synsets('friend')[1]
I would be grateful for your guidance