}
// iterate over senses
for(IWordID iWordId : iIndexWord.getWordIDs()) {
IWord iWord1 = dict.getWord(iWordId);
ISynset iSynset = iWord1.getSynset();
for(ISynsetID iSynsetId1 : iSynset.getRelatedSynsets(Pointer.HYPERNYM)) {
for(ISynsetID iSynsetId2 : dict.getSynset(iSynsetId1).getRelatedSynsets(Pointer.HYPERNYM)) {
List<IWord> iWords = dict.getSynset(iSynsetId2).getWords();
for(IWord iWord2: iWords) {
String lemma = iWord2.getLemma();
hypernyms.add(lemma.replace(' ', '_')); // also get rid of spaces