Menu

Hypernyms as words only

Help
2016-01-31
2016-02-02
  • Ahmed Ammar

    Ahmed Ammar - 2016-01-31

    Hello Aliaksander,

    I want to thank you Aliaksander for all the help I recived already, you made coding a bit easier for me when I get stuck.

    I have been trying to get hypernyms of a word, and I was highly succefull with your help in getting all hypernyms in the dictionary, but there is a lot of overhead, when I lookup a hypernym I get something like this:

    Code:
    IndexWordSet set=Dictionary.getDefaultResourceInstance().lookupAllIndexWords(singleWord[k]);

            for (IndexWord word:set.getIndexWordArray()) {
                demonstrateListOperation(word);
    

    I'd rather want to simply be like this:
    Bread
    Bread stuff
    staff of life
    Baked goods
    Food
    Solid Food
    Solid
    Matter
    Physical Entity
    Entity

    So baisically all the hypernyms just in an array or printed, thank you as always!

    Best Regards,
    Ahmed

     
  • Aliaksandr Autayeu

    Ahmed, at some point you'll need to start looking into the documentation and source code. What you ask is a combination of what's already documented in Javadocs, examples and in source code and a few basic programming techniques.

    In the previous example you have PointerTargetTree - look what properties does it have, look how to process it. You'll need to combine few basic steps (accessing properties of a Java class) and few basic statements (how to process a tree-like structure) yourself.

     
    • Ahmed Ammar

      Ahmed Ammar - 2016-02-02

      Actually this was pretty helpful, thank you. I am not a programmer but I commited myself this project to learn programming, sometimes I need to be pointed to the right direction because I would feel completely lost, and sometimes I just need the direct answer, eventhough it hinders my learning. Thanks!

       

Log in to post a comment.