@Test public void testGetHolonyms() throws JWNLException { assertEquals(wordnet.getRelatedWords("bread", PointerType.PART_HOLONYM, false).toString(), "[sandwich]"); assertEquals(wordnet.getRelatedWords("bread", PointerType.PART_HOLONYM, true).toString(), "[sandwich]"); assertEquals(wordnet.getRelatedWords("bread", POS.NOUN, PointerType.PART_HOLONYM, false).toString(), "[sandwich]"); assertEquals(wordnet.getRelatedWords("bread", POS.NOUN, PointerType.PART_HOLONYM, true).toString(), "[sandwich]"); assertEquals(wordnet.getRelatedWords("human", PointerType.MEMBER_HOLONYM, false).toString(), "[genus_Homo]"); assertEquals(wordnet.getRelatedWords("dog", PointerType.MEMBER_HOLONYM, true).toString(), "[Canis, genus_Canis, pack]"); assertEquals(wordnet.getRelatedWords("dog", POS.NOUN, PointerType.MEMBER_HOLONYM, false).toString(), "[Canis, genus_Canis, pack]"); assertEquals(wordnet.getRelatedWords("dog", POS.NOUN, PointerType.MEMBER_HOLONYM, true).toString(), "[Canis, genus_Canis, pack]"); assertEquals(wordnet.getRelatedWords("water", PointerType.SUBSTANCE_HOLONYM, false).toString(), "[tear, teardrop, perspiration, sweat, sudor, snowflake, flake, ice, water_ice, ice_crystal, snow_mist, diamond_dust, poudrin, ice_needle, frost_snow, frost_mist, body_of_water, water]"); assertEquals(wordnet.getRelatedWords("water", PointerType.SUBSTANCE_HOLONYM, true).toString(), "[tear, teardrop, perspiration, sweat, sudor, snowflake, flake, ice, water_ice, ice_crystal, snow_mist, diamond_dust, poudrin, ice_needle, frost_snow, frost_mist, body_of_water, water]"); assertEquals(wordnet.getRelatedWords("water", POS.NOUN, PointerType.SUBSTANCE_HOLONYM, false).toString(), "[tear, teardrop, perspiration, sweat, sudor, snowflake, flake, ice, water_ice, ice_crystal, snow_mist, diamond_dust, poudrin, ice_needle, frost_snow, frost_mist, body_of_water, water]"); assertEquals(wordnet.getRelatedWords("water", POS.NOUN, PointerType.SUBSTANCE_HOLONYM, true).toString(), "[tear, teardrop, perspiration, sweat, sudor, snowflake, flake, ice, water_ice, ice_crystal, snow_mist, diamond_dust, poudrin, ice_needle, frost_snow, frost_mist, body_of_water, water]"); }
public synchronized List<String> getRelatedWords(String word, PointerType type, boolean firstOnly) throws JWNLException { List<String> hyps = new ArrayList<>(); for (POS pos : poses) { hyps.addAll(getRelatedWords(word, pos, type, firstOnly)); } return hyps; }
WordNetManager { public synchronized List<String> getRelatedWords(String word, PointerType type, boolean firstOnly) throws JWNLException { List<String> hyps = new ArrayList<>(); for (POS pos : poses) { hyps.addAll(getRelatedWords(word, pos, type, firstOnly)); } return hyps; } }
WordNetManager { public synchronized List<String> getRelatedWords(String word, PointerType type, boolean firstOnly) throws JWNLException { List<String> hyps = new ArrayList<>(); for (POS pos : poses) { hyps.addAll(getRelatedWords(word, pos, type, firstOnly)); } return hyps; } protected  WordNetManager(); }
WordNetManager { public synchronized List<String> getRelatedWords(String word, PointerType type, boolean firstOnly) throws JWNLException { List<String> hyps = new ArrayList<>(); for (POS pos : poses) { hyps.addAll(getRelatedWords(word, pos, type, firstOnly)); } return hyps; } protected  WordNetManager(); synchronized static void loadConfigAsClasspathResource(boolean loadAsResource); static WordNetManager getInstance(); synchronized boolean existsEntry(String word, POS pos); synchronized Synset[] getAllSenses(String word, POS pos); synchronized List<String> getGlosses(String word, boolean firstOnly); synchronized List<String> getGlosses(String word, POS pos, boolean firstOnly); synchronized IndexWord getIndexWord(POS pos, String s); synchronized Synset getSynset(POS pos, long offset); synchronized String getLemma(String word, POS pos); synchronized Set<String> getLemmaAllPOS(String word); synchronized List<String> getLexicographerFileNames(String word, boolean firstOnly); synchronized List<String> getLexicographerFileNames(String word, POS pos,
            boolean firstOnly); synchronized Set<String> getPointers(String word, boolean firstOnly); synchronized Set<String> getPointers(String word, POS pos, boolean firstOnly); synchronized ArrayList<String> getMorphs(POS pos, String lexicalForm); synchronized Set<String> getMorphsAllPOS(String word); synchronized POS[] getPOS(String s); synchronized List<Synset> getRelated(String word, PointerType type, boolean firstOnly); synchronized List<Synset> getRelated(String word, POS pos, PointerType type,
            boolean firstOnly); synchronized List<String> getRelatedWords(String word, PointerType type,
            boolean firstOnly); synchronized List<String> getRelatedWords(String word, POS pos, PointerType type,
            boolean firstOnly); synchronized List<String> getHyponyms(String word, boolean firstOnly); synchronized List<String> getHyponyms(String word, POS pos, boolean firstOnly); synchronized List<String> getHypernyms(String word, boolean firstOnly); synchronized List<String> getHypernyms(String word, POS pos, boolean firstOnly); synchronized List<String> getSynsets(String word, boolean firstOnly); synchronized List<String> getSynsets(String word, POS pos, boolean firstOnly); synchronized List<String> getSynonyms(String word, boolean firstOnly); synchronized List<String> getSynonyms(String word, POS pos, boolean firstOnly); synchronized Set<String> getVerbFrames(String word, boolean firstOnly); }
WordNetManager { public synchronized List<String> getRelatedWords(String word, PointerType type, boolean firstOnly) throws JWNLException { List<String> hyps = new ArrayList<>(); for (POS pos : poses) { hyps.addAll(getRelatedWords(word, pos, type, firstOnly)); } return hyps; } protected  WordNetManager(); synchronized static void loadConfigAsClasspathResource(boolean loadAsResource); static WordNetManager getInstance(); synchronized boolean existsEntry(String word, POS pos); synchronized Synset[] getAllSenses(String word, POS pos); synchronized List<String> getGlosses(String word, boolean firstOnly); synchronized List<String> getGlosses(String word, POS pos, boolean firstOnly); synchronized IndexWord getIndexWord(POS pos, String s); synchronized Synset getSynset(POS pos, long offset); synchronized String getLemma(String word, POS pos); synchronized Set<String> getLemmaAllPOS(String word); synchronized List<String> getLexicographerFileNames(String word, boolean firstOnly); synchronized List<String> getLexicographerFileNames(String word, POS pos,
            boolean firstOnly); synchronized Set<String> getPointers(String word, boolean firstOnly); synchronized Set<String> getPointers(String word, POS pos, boolean firstOnly); synchronized ArrayList<String> getMorphs(POS pos, String lexicalForm); synchronized Set<String> getMorphsAllPOS(String word); synchronized POS[] getPOS(String s); synchronized List<Synset> getRelated(String word, PointerType type, boolean firstOnly); synchronized List<Synset> getRelated(String word, POS pos, PointerType type,
            boolean firstOnly); synchronized List<String> getRelatedWords(String word, PointerType type,
            boolean firstOnly); synchronized List<String> getRelatedWords(String word, POS pos, PointerType type,
            boolean firstOnly); synchronized List<String> getHyponyms(String word, boolean firstOnly); synchronized List<String> getHyponyms(String word, POS pos, boolean firstOnly); synchronized List<String> getHypernyms(String word, boolean firstOnly); synchronized List<String> getHypernyms(String word, POS pos, boolean firstOnly); synchronized List<String> getSynsets(String word, boolean firstOnly); synchronized List<String> getSynsets(String word, POS pos, boolean firstOnly); synchronized List<String> getSynonyms(String word, boolean firstOnly); synchronized List<String> getSynonyms(String word, POS pos, boolean firstOnly); synchronized Set<String> getVerbFrames(String word, boolean firstOnly);  }