I am reading input from a file and calculating wordnet-based similarity/relatedness measures like LIN, Banerjee and Pedersen Measure(BNP), Jiang and Conrath Measure (JNC) for the words in each line. I am using the following code to get the synsets:
synsets=[]
for entry in line1:
synsets.append(wn.synsets(entry)[0])
But this would get me only the first sense in the synset of the correspong word. But in some cases i may want 2nd or 3rd or maybe some other sense depending on the word. Eg: for water the first sense is H2O, but i want to select the second one, ie "body of water". How to make the code more adpaptive without user prompt?