/** * Return all {@link Synset}s of a particular POS * @param pos * @return * @throws WordNetException */ public List<Synset> getAllWords(WordNetPartOfSpeech pos) throws WordNetException { List<Synset> synsets = new ArrayList<Synset>(); try { @SuppressWarnings("rawtypes") Iterator iter = jwnlRealDictionary.getIndexWordIterator(JwnlUtils.getJwnlPartOfSpeec(pos)); while (iter.hasNext()) { IndexWord indexWord = (IndexWord) iter.next(); synsets.addAll(indexWordToList(indexWord)); } } catch (JWNLException e) { throw new WordNetException("looking for all <"+pos+">s failed. See nested exception",e); } return synsets; }