/** * Returns a set of <code>IndexWord</code>s, with each element in the set * corresponding to a part-of-speech of <var>word</var>. * * @param lemma the word for which to lookup senses * @return An array of IndexWords, each of which is a sense of <var>word</var> * @throws JWNLException JWNLException */ public IndexWordSet lookupAllIndexWords(String lemma) throws JWNLException { lemma = prepareQueryString(lemma); IndexWordSet set = new IndexWordSet(lemma); for (POS pos : POS.getAllPOS()) { IndexWord current = lookupIndexWord(pos, lemma); if (current != null) { set.add(current); } } return set; }
/** * Returns a set of <code>IndexWord</code>s, with each element in the set * corresponding to a part-of-speech of <var>word</var>. * * @param lemma the word for which to lookup senses * @return An array of IndexWords, each of which is a sense of <var>word</var> * @throws JWNLException JWNLException */ public IndexWordSet lookupAllIndexWords(String lemma) throws JWNLException { lemma = prepareQueryString(lemma); IndexWordSet set = new IndexWordSet(lemma); for (POS pos : POS.getAllPOS()) { IndexWord current = lookupIndexWord(pos, lemma); if (current != null) { set.add(current); } } return set; }