Menu

hyponyms.print()

Help
karthik
2004-12-29
2013-04-29
  • karthik

    karthik - 2004-12-29

    Hi

    Was just able to Run the Examples.class ,

    1) The 'hyponyms.print()' in   
        demonstrateTreeOperation
        prints  everything,
      
        Is there anything in the API
        which can either  Filter the Results

    example :- watch

    returned results should contain
    from hyponyms.print()

    watch, ticker
    analog_watch
    digital_watch
    hunting_watch
    pendulum_watch
    pocket_watch
    stem-winder
    wrist_watch

    Only

    2)Also requred  code snippet to convert the same
       Filtered returned results into Array or....,so the
       same can be used for diplay on the JSP Page.

    I browsed thru the Form and could not find any thing similar..

    Please Reply ASAP

    Thx in advance

     
    • devilspawn

      devilspawn - 2007-06-28

      There isn't anything in the API that filters. A PointerTargetTree object is composed of PointerTargetTreeNode objects through the PointerUtils.makePointerTargetTreeList() function. These nodes  are extension of PointerTargetNode which made of both the PointerTarget object (i.e. Synset object) and the PointerType, in this case PointerType.HYPONYM and the information related to it.

      I have tried to modify the PointerUtils.makePointerTargetTreeList() function but I have been unable to make it work for Word only. I think the best option is to create a new PointerTarget object which only hold information about the lemma rather than using the Synset object.

      I have also tried to use an ArrayList instead of PointerTargetNodeList to create the hypernym/hyponym tree but have so far failed to make it work.

      I hope this helps.

       

Log in to post a comment.