@Test public void testGetSynonyms() throws JWNLException { assertEquals(Arrays.asList("trial", "trial_run", "test", "tryout", "test", "mental_test", "mental_testing", "psychometric_test", "examination", "exam", "test", "test", "trial", "test", "trial", "run", "test", "test", "prove", "try", "try_out", "examine", "essay", "screen", "test", "quiz", "test", "test", "test", "test", "test"), wordnet.getSynonyms("test", false)); assertEquals(Arrays.asList("trial", "trial_run", "test", "tryout", "test", "prove", "try", "try_out", "examine", "essay"), wordnet.getSynonyms("test", true)); assertEquals(Arrays.asList("trial", "trial_run", "test", "tryout", "test", "mental_test", "mental_testing", "psychometric_test", "examination", "exam", "test", "test", "trial", "test", "trial", "run", "test"), wordnet.getSynonyms("test", POS.NOUN, false)); assertEquals(Arrays.asList("trial", "trial_run", "test", "tryout"), wordnet.getSynonyms("test", POS.NOUN, true)); assertEquals(Arrays.asList("5799212", "1006675", "7197021", "794367", "791078", "1904699", "2531625", "2533109", "786458", "2745713", "1112584", "920778", "669970"), wordnet.getSynsets("test", false)); assertEquals(Arrays.asList("5799212", "2531625"), wordnet.getSynsets("test", true)); assertEquals(Arrays.asList("5799212", "1006675", "7197021", "794367", "791078", "1904699"), wordnet.getSynsets("test", POS.NOUN, false)); assertEquals(Collections.singletonList("5799212"), wordnet.getSynsets("test", POS.NOUN, true)); }
public synchronized List<String> getSynonyms(String word, boolean firstOnly) throws JWNLException { List<String> syns = new ArrayList<>(); for (POS pos : poses) { syns.addAll(getSynonyms(word, pos, firstOnly)); } return syns; }
WordNetManager { public synchronized List<String> getSynonyms(String word, boolean firstOnly) throws JWNLException { List<String> syns = new ArrayList<>(); for (POS pos : poses) { syns.addAll(getSynonyms(word, pos, firstOnly)); } return syns; } }
WordNetManager { public synchronized List<String> getSynonyms(String word, boolean firstOnly) throws JWNLException { List<String> syns = new ArrayList<>(); for (POS pos : poses) { syns.addAll(getSynonyms(word, pos, firstOnly)); } return syns; } protected  WordNetManager(); }
WordNetManager { public synchronized List<String> getSynonyms(String word, boolean firstOnly) throws JWNLException { List<String> syns = new ArrayList<>(); for (POS pos : poses) { syns.addAll(getSynonyms(word, pos, firstOnly)); } return syns; } 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> getSynonyms(String word, boolean firstOnly) throws JWNLException { List<String> syns = new ArrayList<>(); for (POS pos : poses) { syns.addAll(getSynonyms(word, pos, firstOnly)); } return syns; } 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);  }