instance not hypernym

  • Vanessa Lopez

    Vanessa Lopez - 2010-04-08

    Hi, I use this function to get the hypernyms of a word:

    But how can I differentiate words that are instances and therefore between hypernyms and types?

    e.g. "city" is given as an hypernym of "Odessa", however, "Odessa" is an INSTANCE of "city", not an hypernym. Is there any way to know when a word is an instance as it is shown in the WordNet online interface?

    Thanks a lot

  • Vanessa Lopez

    Vanessa Lopez - 2010-04-08

    Or in other words, how can you distinguish between instances-classes or individual-concepts?

  • Maccanzy

    Maccanzy - 2010-10-20

    Hi, to solve that I simply check if there are any Pointer where PointerType is "INSTANCE_HYPERNYM":

    for(Synset s :idw.getSenses()) {
    //ignore instances!!!
    if(s.getPointers(PointerType.INSTANCE_HYPERNYM).length != 0) { // this is an intance!
    //your code here



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

Sign up for the SourceForge newsletter:

No, thanks