public static Map<String,String> getSynsetLexemes(Synset synset) { Map<String,String> result = new HashMap<String,String>(); long sense = synset.getOffset(); List<IWord> words = synset.getWords(); for (IWord word : words) { String lexeme = word.getLemma(); lexeme = cleanLexeme(lexeme); result.put(lexeme, new Long(sense).toString()); } return result; }
public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof Synset)) return false; final Synset other = (Synset) obj; if (!id.equals(other.getID())) return false; if (!words.equals(other.getWords())) return false; if (!gloss.equals(other.getGloss())) return false; if (isAdjSat != other.isAdjectiveSatellite()) return false; if (!relatedMap.equals(other.getRelatedMap())) return false; return true; }