Loading ...
Sorry, an error occurred while loading the content.

Fwd: WordNet::Querydata 1.35 bug?

Expand Messages
  • Jason Rennie
    Anyone know what s going on here? I haven t had a chance to take a good look at the code. My first thought is that querySense should be returning the correct
    Message 1 of 5 , Nov 2, 2004
    • 0 Attachment
      Anyone know what's going on here? I haven't had a chance to take a
      good look at the code. My first thought is that querySense should be
      returning the correct antonyms and that queryWord should not accept
      type 3 arguments (e.g. "float#v#2"), but I don't recall the last state
      of this code and the man page isn't very clear.

      Thoughts?

      Jason

      ----- Forwarded message from Timothy Chklovski <timc@...> -----

      From: Timothy Chklovski <timc@...>
      To: jrennie@...
      CC: timc@...
      Subject: WordNet::Querydata 1.35 bug?
      Delivery-Date: Mon Nov 1 09:52:19 EST 2004

      queryWord and querySense behave differently on a type 3:

      print "Antonyms: ", join(", ", $wn->querySense("dark#n#1", "ants")), "\n";
      Antonyms:
      print "Antonyms: ", join(", ", $wn->queryWord("dark#n#1", "ants")), "\n";
      Antonyms: light#n#10
      print "Antonyms: ", join(", ", $wn->querySense("float#v#2", "ants")), "\n";
      Antonyms:
      print "Antonyms: ", join(", ", $wn->queryWord("float#v#2", "ants")), "\n";
      Antonyms: sink#v#4

      I'm running perl 5.8.4, on a win box with wn 2.0,
      # $Id: QueryData.pm,v 1.35 2004/08/25 20:15:26 jrennie Exp $

      Thanks,

      --Tim

      ----- End forwarded message -----
    • Siddharth Patwardhan
      As far as I remember the separate queryWord and querySense functions came into being to distinguish between the lexical (word to word) and semantic (sense to
      Message 2 of 5 , Nov 2, 2004
      • 0 Attachment
        As far as I remember the separate queryWord and querySense functions
        came into being to distinguish between the lexical (word to word) and
        semantic (sense to sense) relations of WordNet.

        Both functions should return a word#pos#sense output when given a
        word#pos#sense input. However, the returned word#pos#sense are
        interpreted differently. A word#pos#sense returned by the querySense
        function refers to the entire synset, while the word#pos#sense returned
        by queryWord refers to the specific sense of the specific 'word'.

        For example, according to WordNet, the specific sense of light
        (light#n#10) is the antonym of the specific sense of dark (dark#n#1),
        while the remaining words in these two synsets are not antonyms. In case
        of semantic relations (such as hypernymy, hyponymy, etc.), on the other
        hand, the entire synset containing "motor_vehicle#n#1" is the hypernym
        of the entire synset containing "car#n#1".

        Since "ants" is a lexical relation, it should be handled correctly by
        queryWord, while I'm not sure what querySense would do with it (my guess
        is querySense wouldn't return anything).

        I looked through the wn-perl archives and I found a note by Jason that
        described these different types of relations rather nicely (message 79
        http://groups.yahoo.com/group/wn-perl/message/79 )

        However, I found a note later on (message 145
        http://groups.yahoo.com/group/wn-perl/message/145 ) that says that the
        queryWord function is broken and needs to be fixed. Some fixes were made
        to queryWord by Jason Michelizzi (messages 169, 170, 171 and 172). I
        also found a warning message embedded in the queryWord function... so I
        am not certain of the state of queryWord at this point.

        In my opinion, the output obtained in Tim's examples (below) are as
        should be expected.

        -- Sid.

        On Tue, 2004-11-02 at 11:27 -0500, Jason Rennie wrote:
        > Anyone know what's going on here? I haven't had a chance to take a
        > good look at the code. My first thought is that querySense should be
        > returning the correct antonyms and that queryWord should not accept
        > type 3 arguments (e.g. "float#v#2"), but I don't recall the last state
        > of this code and the man page isn't very clear.
        >
        > Thoughts?
        >
        > Jason
        >
        > ----- Forwarded message from Timothy Chklovski <timc@...> -----
        >
        > From: Timothy Chklovski <timc@...>
        > To: jrennie@...
        > CC: timc@...
        > Subject: WordNet::Querydata 1.35 bug?
        > Delivery-Date: Mon Nov 1 09:52:19 EST 2004
        >
        > queryWord and querySense behave differently on a type 3:
        >
        > print "Antonyms: ", join(", ", $wn->querySense("dark#n#1", "ants")), "\n";
        > Antonyms:
        > print "Antonyms: ", join(", ", $wn->queryWord("dark#n#1", "ants")), "\n";
        > Antonyms: light#n#10
        > print "Antonyms: ", join(", ", $wn->querySense("float#v#2", "ants")), "\n";
        > Antonyms:
        > print "Antonyms: ", join(", ", $wn->queryWord("float#v#2", "ants")), "\n";
        > Antonyms: sink#v#4
        >
        > I'm running perl 5.8.4, on a win box with wn 2.0,
        > # $Id: QueryData.pm,v 1.35 2004/08/25 20:15:26 jrennie Exp $
        >
        > Thanks,
        >
        > --Tim
        >
        > ----- End forwarded message -----
        >
        >
        >
        > WordNet::QueryData web page: http://people.csail.mit.edu/~jrennie/WordNet/
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
        >
        >
        >
      • Jason Rennie
        ... Yes. That s an excellent way of stating the difference. Hope you don t mind if I liberally lift some of your comments into the man page :) ... Okay. I
        Message 3 of 5 , Nov 2, 2004
        • 0 Attachment
          On Tue, Nov 02, 2004 at 12:57:39PM -0700, Siddharth Patwardhan wrote:
          > As far as I remember the separate queryWord and querySense functions
          > came into being to distinguish between the lexical (word to word) and
          > semantic (sense to sense) relations of WordNet.

          Yes. That's an excellent way of stating the difference. Hope you
          don't mind if I liberally lift some of your comments into the man page :)

          > Both functions should return a word#pos#sense output when given a
          > word#pos#sense input. However, the returned word#pos#sense are
          > interpreted differently. A word#pos#sense returned by the querySense
          > function refers to the entire synset, while the word#pos#sense returned
          > by queryWord refers to the specific sense of the specific 'word'.

          Okay. I had forgotten this subtlety. I need to give the man page a
          good update...

          > For example, according to WordNet, the specific sense of light
          > (light#n#10) is the antonym of the specific sense of dark (dark#n#1),
          > while the remaining words in these two synsets are not antonyms. In case
          > of semantic relations (such as hypernymy, hyponymy, etc.), on the other
          > hand, the entire synset containing "motor_vehicle#n#1" is the hypernym
          > of the entire synset containing "car#n#1".

          Can the relations be divided into "lexical" and "semantic"? If so, I
          should make this clear in the man page.

          > Since "ants" is a lexical relation, it should be handled correctly by
          > queryWord, while I'm not sure what querySense would do with it (my guess
          > is querySense wouldn't return anything).
          >
          > I looked through the wn-perl archives and I found a note by Jason that
          > described these different types of relations rather nicely (message 79
          > http://groups.yahoo.com/group/wn-perl/message/79 )
          >
          > However, I found a note later on (message 145
          > http://groups.yahoo.com/group/wn-perl/message/145 ) that says that the
          > queryWord function is broken and needs to be fixed. Some fixes were made
          > to queryWord by Jason Michelizzi (messages 169, 170, 171 and 172). I
          > also found a warning message embedded in the queryWord function... so I
          > am not certain of the state of queryWord at this point.

          This jives with my recollection: we realized that queryWord was broken
          a while back; Jason M. helped me fix things. From what I remember,
          queryWord works as it is supposed to. The (mich0212) in the
          commented-out "warn" line in queryWord was a note to myself that Jason
          M. provided the fixes to make queryWord work again.

          > In my opinion, the output obtained in Tim's examples (below) are as
          > should be expected.

          Good. Given your discussion, I agree---QueryData is giving the right
          output :)

          Jason
        • Siddharth Patwardhan
          ... I don t mind at all. :-) ... I can t remember the WordNet documentation that mentions the difference, but all the relations are categorized as either
          Message 4 of 5 , Nov 2, 2004
          • 0 Attachment
            On Tue, 2004-11-02 at 15:52 -0500, Jason Rennie wrote:
            > On Tue, Nov 02, 2004 at 12:57:39PM -0700, Siddharth Patwardhan wrote:
            > > As far as I remember the separate queryWord and querySense functions
            > > came into being to distinguish between the lexical (word to word) and
            > > semantic (sense to sense) relations of WordNet.
            >
            > Yes. That's an excellent way of stating the difference. Hope you
            > don't mind if I liberally lift some of your comments into the man page :)

            I don't mind at all. :-)

            > > Both functions should return a word#pos#sense output when given a
            > > word#pos#sense input. However, the returned word#pos#sense are
            > > interpreted differently. A word#pos#sense returned by the querySense
            > > function refers to the entire synset, while the word#pos#sense returned
            > > by queryWord refers to the specific sense of the specific 'word'.
            >
            > Okay. I had forgotten this subtlety. I need to give the man page a
            > good update...
            >
            > > For example, according to WordNet, the specific sense of light
            > > (light#n#10) is the antonym of the specific sense of dark (dark#n#1),
            > > while the remaining words in these two synsets are not antonyms. In case
            > > of semantic relations (such as hypernymy, hyponymy, etc.), on the other
            > > hand, the entire synset containing "motor_vehicle#n#1" is the hypernym
            > > of the entire synset containing "car#n#1".
            >
            > Can the relations be divided into "lexical" and "semantic"? If so, I
            > should make this clear in the man page.

            I can't remember the WordNet documentation that mentions the difference,
            but all the relations are categorized as either semantic or lexical.

            Most relations are semantic,... except for antonymy, also-see, verb
            group, pertains, which are lexical. (There may be more relations on the
            lexical list. These are the ones I can remember off the top of my head.)

            -- Sid.
          • Ben Haskell
            The grind software doesn t actually limit pointers to being either lexical or semantic. (Thanks to running this report, I found a verb troponym that was
            Message 5 of 5 , Nov 2, 2004
            • 0 Attachment
              The 'grind' software doesn't actually limit pointers to being either
              lexical or semantic. (Thanks to running this report, I found a verb
              troponym that was incorrectly listed as a lexical pointer)

              The closest thing I can find to documentation of which pointers are
              typically what-type is:
              http://wordnet.princeton.edu/man/wninput.5WN#sect3
              (which, as the results below indicate, is inaccurate for the "See Alsos")



              Here are the numbers from (what will become) 2.1:
              (Auto-reflected pointers omitted)

              Only lexical:
              ants antonym ! lexical 8031
              deri derivationally related form + lexical 69263
              part participle < lexical 129
              pert pertainym \ lexical 8072

              Only semantic:
              attr attribute = semantic 1288
              caus cause > semantic 219
              enta entailment * semantic 409
              inst instance @i semantic 8504
              hype hypernym @ semantic 88062
              hmem member holonym #m semantic 12260
              hprt part holonym #p semantic 8854
              hsub substance holonym #s semantic 790
              sim similar to & semantic 22875
              vgrp verb group $ semantic 1748

              Mixed:
              dmnc domain category ;c lexical 7
              dmnc domain category ;c semantic 6482

              dmnr domain region ;r lexical 2
              dmnr domain region ;r semantic 1321

              dmnu domain usage ;u lexical 51
              dmnu domain usage ;u semantic 1133

              also see also ^ lexical 583
              also see also ^ semantic 2690


              The mixed category is mainly because we're undecided as to whether we
              should alter the 'grinder' to allow pointers from Words to Synsets. But,
              we'll probably leave it an open question until we implement our new
              development system.

              An example of a current ";r" lexical pointer (not in 2.0, but in 2.1):
              scallion#n#2 points to USA#n#1, but green_onion#n#1 does not.
              A ";c" lexical pointer (again, not in 2.0, but in 2.1):
              Bufferin#n#1 points to trade_name#n#1, but buffered_aspirin#n#1 does not.

              (Keep in mind that this is work in progress.)

              Observant readers may also have noticed the 8,504 "instance" pointers.
              (George_W_Bush#n#1 is an instance of a President, not a type of) Note
              the pointer symbol "@i"'s similarity to "@". I'm hoping that we'll also
              add roles ("father" is not a "type" of person, but a "role" for a
              person), but that's a long way off.

              -- Ben Haskell
              -- WordNet Technical Support Specialist

              Siddharth Patwardhan wrote:
              > On Tue, 2004-11-02 at 15:52 -0500, Jason Rennie wrote:
              > > On Tue, Nov 02, 2004 at 12:57:39PM -0700, Siddharth Patwardhan wrote:
              > > > As far as I remember the separate queryWord and querySense functions
              > > > came into being to distinguish between the lexical (word to word) and
              > > > semantic (sense to sense) relations of WordNet.
              > >
              > > Yes. That's an excellent way of stating the difference. Hope you
              > > don't mind if I liberally lift some of your comments into the man page :)
              >
              > I don't mind at all. :-)
              >
              > > > Both functions should return a word#pos#sense output when given a
              > > > word#pos#sense input. However, the returned word#pos#sense are
              > > > interpreted differently. A word#pos#sense returned by the querySense
              > > > function refers to the entire synset, while the word#pos#sense returned
              > > > by queryWord refers to the specific sense of the specific 'word'.
              > >
              > > Okay. I had forgotten this subtlety. I need to give the man page a
              > > good update...
              > >
              > > > For example, according to WordNet, the specific sense of light
              > > > (light#n#10) is the antonym of the specific sense of dark (dark#n#1),
              > > > while the remaining words in these two synsets are not antonyms. In
              > case
              > > > of semantic relations (such as hypernymy, hyponymy, etc.), on the other
              > > > hand, the entire synset containing "motor_vehicle#n#1" is the hypernym
              > > > of the entire synset containing "car#n#1".
              > >
              > > Can the relations be divided into "lexical" and "semantic"? If so, I
              > > should make this clear in the man page.
              >
              > I can't remember the WordNet documentation that mentions the difference,
              > but all the relations are categorized as either semantic or lexical.
              >
              > Most relations are semantic,... except for antonymy, also-see, verb
              > group, pertains, which are lexical. (There may be more relations on the
              > lexical list. These are the ones I can remember off the top of my head.)
              >
              > -- Sid.
              >
              >
              >
              >
              > WordNet::QueryData web page: http://people.csail.mit.edu/~jrennie/WordNet/
            Your message has been successfully submitted and would be delivered to recipients shortly.