How to get a Synset using its OFFSET

326 views
Skip to first unread message

Malik

unread,
Feb 27, 2009, 7:22:12 PM2/27/09
to wn-...@googlegroups.com
Hi Gurus


Can anybody tell me how can I get a Synset from Wordnet if I have its offset..

Thanks in Advance

Also if someone can tell in simple few words that what contains the data.noun file of WordNet.

Thanks

ashwin

unread,
Apr 18, 2009, 6:06:19 PM4/18/09
to wn-perl
Hi Malik
I think you can find the answer to the contents of WordNet at
http://wordnet.princeton.edu/doc


I am also stuck with the issue of trying to get synset from its
offset. Does anybody have any advice?
I have used other libraries that have this method, but processing is
much simpler and requires much less overhead with a perl script

ashwin

Jason Rennie

unread,
Apr 18, 2009, 7:22:52 PM4/18/09
to wn-...@googlegroups.com
Have you tried getSense?  It looks like it takes an offset and part-of-speech and returns a word#pos#sense string (which could be used with querySense to get information about the synset).

Jason
--
Jason Rennie
Research Scientist, ITA Software
http://www.itasoftware.com/

ashwin

unread,
Apr 19, 2009, 6:43:13 AM4/19/09
to wn-perl
Thanks Jason. getSense() does the trick: i was simply trying to get
synsetids of the unique beginners:

@uniqBegNames = ("entity#n#1", "psychological feature#n#1",
"abstraction#n#6",
"state#n#4", "event#n#1","human
activity#n#1","group#n#1","possession#n#2",
"phenomenon#n#1");

foreach (@uniqBegNames){
print $offset = $wn->offset($_).".....getting back ";
print $w = $wn->getSense($offset, "n")."\n"; #test
}#end foreach

ashwin
Reply all
Reply to author
Forward
0 new messages