Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Word.getIndex()

Help
Peter
2007-05-19
2013-04-29
  • Peter
    Peter
    2007-05-19

    Hi,

    I'm trying to turn a Synset into a string "lemma%n" based on it's first word, and the synser index for that word. So the first sense of the word color would be represented by color%1. I can get the lemma with Synset.getWord(0), but if I try to get the index with Synset.getWord(0).getIndex(0), it returns the index of the word in the synset (which is obviously always zero). Is there any way to get a word's (or Synset's) index in the IndexWord?

    I now realize I could try iterating over IndexWord.getSynsets() to find my synset (assuming that that array is ordered correctly), but that's not very pretty.

    Thank you,
    Peter