Explore WordNet SynsetPtr C structure (explore_WordNet_Synset_struct.txt) The little program I use to see the actual output of findtheinfo_ds() is here: http://wwbota.free.fr/misc/testWN.cpp (see also on the WordNet official site http://www.cogsci.princeton.edu/~wn/man1.7.1/wnsearch.3WN.html) Use WordNet online: http://www.cogsci.princeton.edu/cgi-bin/webwn1.7.1 [jmv@protea floraParse]$ gcc -g -I /mnt/home2/apps/wordnet1.7/include/ -lstdc++ testWN.cpp /mnt/home2/apps/wordnet1.7/lib/libwn.a [jmv@protea floraParse]$ gdb a.out GNU gdb Red Hat Linux (5.2.1-4) Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux"... (gdb) b 22 Breakpoint 1 at 0x8048dde: file testWN.cpp, line 22. (gdb) run Starting program: /home/jmv/wwbota.free.fr/w-cvs/floraParse/a.out Breakpoint 1, main (argc=1, argv=0xbfffefc4) at testWN.cpp:22 22 SynsetPtr s_w = findtheinfo_ds(token, NOUN, HYPERPTR, ALLSENSES); (gdb) next 23 } (gdb) p *s_w $2 = {hereiam = 10859987, sstype = 0, fnum = 20, pos = 0x8094650 "n", wcount = 3, words = 0x8094660, lexid = 0x8094680, wnsns = 0x8094670, whichword = 1, ptrcount = 27, ptrtyp = 0x80946c0, ptroff = 0x8094730, ppos = 0x80947a0, pto = 0x8094810, pfrm = 0x8094880, fcount = 0, frmid = 0x0, frmto = 0x0, defn = 0x80948f0 "(the main organ of photosynthesis and transpiration in higher plants)", nextss = 0x8094c48, nextform = 0x0, searchtype = 2, ptrlist = 0x80949b0, headword = 0x0, headsense = 0} (gdb) p *s_w.words $3 = 0x8094690 "leaf" # This is the first sense of leaf; the next senses are reacheable through the nextss pointer: (gdb) p *s_w.nextss $6 = {hereiam = 5171940, sstype = 0, fnum = 10, pos = 0x8094c38 "n", wcount = 2, words = 0x8094c28, lexid = 0x8094c08, wnsns = 0x8094c18, whichword = 1, ptrcount = 4, ptrtyp = 0x8094988, ptroff = 0x8094cd0, ppos = 0x8094ce8, pto = 0x8094d00, pfrm = 0x8094d18, fcount = 0, frmid = 0x0, frmto = 0x0, defn = 0x8094d30 "(a sheet of any written or printed material (especially in a manuscript or book))", nextss = 0x8094f38, nextform = 0x0, searchtype = 2, ptrlist = 0x8094de0, headword = 0x0, headsense = 0} (gdb) p *s_w.nextss.nextss $7 = {hereiam = 3115965, sstype = 0, fnum = 6, pos = 0x8094fa0 "n", wcount = 1, words = 0x8094fb0, lexid = 0x8094fd0, wnsns = 0x8094fc0, whichword = 1, ptrcount = 3, ptrtyp = 0x8094ff0, ptroff = 0x8095000, ppos = 0x8095010, pto = 0x8095020, pfrm = 0x8095030, fcount = 0, frmid = 0x0, frmto = 0x0, defn = 0x8095040 "(hinged or detachable flat section (as of a table or door))", nextss = 0x0, nextform = 0x0, searchtype = 2, ptrlist = 0x80950f8, headword = 0x0, headsense = 0} # Here is the direct hypernym (i.e. generalization) of "leaf"; # we get this because we called : findtheinfo_ds(token, NOUN, HYPERPTR, ALLSENSES); (gdb) p *s_w.ptrlist $8 = {hereiam = 10800392, sstype = 0, fnum = 20, pos = 0x80949a0 "n", wcount = 1, words = 0x8094978, lexid = 0x8094a18, wnsns = 0x8094968, whichword = 0, ptrcount = 18, ptrtyp = 0x8094a38, ptroff = 0x8094a88, ppos = 0x8094ad8, pto = 0x8094b28, pfrm = 0x8094b78, fcount = 0, frmid = 0x0, frmto = 0x0, defn = 0x8094bc8 "(a functional and structural unit of a plant or fungus)", nextss = 0x0, nextform = 0x0, searchtype = 2, ptrlist = 0x0, headword = 0x0, headsense = 0} # End of pointer chain; we must call findtheinfo_ds() again to get next hypernym (gdb) p *s_w.ptrlist.words $11 = 0x8094a28 "plant_organ"