public String getGloss() throws WordNetException { return this.realSynset.getGloss(); }
public static void main(String args[]) { WordNetUtils utils = WordNetUtils.getInstance(); System.out.println(utils.mapWordSenseToIWord("mouse.n.4")); System.out.println(utils.getSynsetFromOffset("15300051-n").getGloss()); }
newWords.add(new WordBuilder(old, oldWord)); return new Synset(old.getID(), old.getLexicalFile(), old.isAdjectiveSatellite(), old.isAdjectiveHead(), old.getGloss(), newWords, newIDs);
public void getAllSemanticRelations(String lemma) { //for each stem, for each sense in stemn\,print lemma, sensem, probability, sr and lr List<String> stems = wstem.findStems(lemma, null); for(String s: stems){ for (POS pos : POS.values()) { IIndexWord idxWord = dict.getIndexWord(lemma, pos) ; if(idxWord==null) continue; List<IWordID> senses = idxWord.getWordIDs(); // 1 st meaning for(IWordID iw : senses) { ISynset is = dict.getSynset(iw.getSynsetID()); System.out.println(is.getGloss()); getAllSemanticRelations(is); } } } }
public void getAllSemanticRelations(String lemma) { // for each stem, for each sense in stemn\,print lemma, sensem, // probability, sr and lr List<String> stems = wstem.findStems(lemma, null); for (String s : stems) { for (POS pos : POS.values()) { IIndexWord idxWord = dict.getIndexWord(lemma, pos); if (idxWord == null) continue; List<IWordID> senses = idxWord.getWordIDs(); // 1 st meaning for (IWordID iw : senses) { ISynset is = dict.getSynset(iw.getSynsetID()); System.out.println(is.getGloss()); getAllSemanticRelations(is); } } } }
public void getAllLexicalRelations(String lemma) { //for each stem, for each sense in stemn\,print lemma, sensem, probability, sr and lr List<String> stems = wstem.findStems(lemma, null); for(String s: stems){ for (POS pos : POS.values()) { IIndexWord idxWord = dict.getIndexWord(lemma, pos) ; if(idxWord==null) continue; List<IWordID> senses = idxWord.getWordIDs(); // 1 st meaning for(IWordID iw : senses) { ISynset is = dict.getSynset(iw.getSynsetID()); System.out.println(is.getGloss()); getAllLexicalRelations(dict.getWord(iw)); } } } }
public void getAllLexicalRelations(String lemma) { // for each stem, for each sense in stemn\,print lemma, sensem, // probability, sr and lr List<String> stems = wstem.findStems(lemma, null); for (String s : stems) { for (POS pos : POS.values()) { IIndexWord idxWord = dict.getIndexWord(lemma, pos); if (idxWord == null) continue; List<IWordID> senses = idxWord.getWordIDs(); // 1 st meaning for (IWordID iw : senses) { ISynset is = dict.getSynset(iw.getSynsetID()); System.out.println(is.getGloss()); getAllLexicalRelations(dict.getWord(iw)); } } } }