problem with PointerUtils.getSynonyms(synset)

Help
Anonymous
2003-09-01
2003-10-29
  • Anonymous - 2003-09-01

    This is my code:

    IndexWord indexWord = Dictionary.getInstance().getIndexWord(POS.NOUN, "department");

    Synset[] s = indexWord.getSenses();
                   
    for(int i=0; i < s.length; i++){
                       
                        System.out.println("Sense "+ i +" :");
                       
                        System.out.println(s[i].getGloss());
                                                     
                        PointerTargetNodeList synonyms = PointerUtils.getSynonyms(s[i]);
                       
                        System.out.println( " Synonyms of \&quot;" + word.getLemma() + "\&quot;:");
                   
                         synonyms.print();
                       
                        for (Iterator itr = synonyms.iterator(); itr.hasNext();){
                       
                            Word[] w =((PointerTargetNode) itr.next()).getSynset().getWords();
                       
                            for(int j=0; j< w.length; j++)
                               System.out.println(w[j].getLemma());
                        }
                       
                    }           

    I also try some other words beside "department", but always get empty synonyms. why?

     
    • Anonymous - 2003-09-06

      I'm having exactly the same problem as the one you describe.... Surely someone must know the solution to something so common as finding synonyms...

       
    • Anonymous - 2003-10-29

      getSynonyms is meant for adjectives. Synonyms to nouns and verbs are just their hypernyms.

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks