dupa

Author Topic: Robert Medeksza - Quick Question?  (Read 3308 times)

vonsmith

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Robert Medeksza - Quick Question?
« on: December 16, 2004, 04:34:46 pm »
Robert,
I know the formats for these WordNet methods as implemented in Hal:

WN.GetHypernyms("NOUN", 1, 1)
WN.GetSisters("NOUN", 1)
WN.GetMeronyms(1)
WN.GetSynonyms("NOUN", 1)

I've tried by trial and error to figure out if Hal supports the ones below to no avail. Does Hal currently support these? If so, what is the syntax?

WN.GetHyponyms()
WN.GetHolonyms()

If not, could you add them to the future Hal releases? They would be a big help for the XTF Brain and other new functions.

Thanks,


=vonsmith=
« Last Edit: December 19, 2004, 12:28:26 am by vonsmith »
 

Medeksza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1469
    • View Profile
    • http://www.zabaware.com
Robert Medeksza - Quick Question?
« Reply #1 on: December 19, 2004, 09:54:11 am »
The function for Holonyms is declared as:
Function GetHolonyms(Sense As Variant, SubSet As Variant) As Variant

The values of SubSet can be: MEMBER, PART, SUBSTANCE, or an empty string for whichever is found first.

Unfortunetely there is no built in function to read Hyponyms directly. But if you parse wordnet responses yourself you can get a hyponym list by doing this:

If wn.LookupWord(TheWord) = True Then
  Select Case wn.GuessPartOfSpeech()
    Case "NOUN"
      Hyponym = wn.GetWN(LookupWord & " -antsn")
    Case "VERB"
      Hyponym = wn.GetWN(LookupWord & " -antsv")
    Case "ADJ"
      Hyponym = wn.GetWN(LookupWord & " -antsa")
    Case "ADV"
      Hyponym = wn.GetWN(LookupWord & " -antsr")
  End Select
End If
Robert Medeksza

vonsmith

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Robert Medeksza - Quick Question?
« Reply #2 on: December 19, 2004, 11:06:48 pm »
Robert M,
Thank you very much. You saved me a lot of time. If it works as I expect it will help improve the XTF (eXtended Topic Focus) function's ability to associate topics sooner with less training. I'll use it in the upcoming XTF Brain v1.4 release.


=vonsmith=