@Test public void testLookupWord() throws JWNLException { final IndexWord word = wnr.lookupWord(POS.VERB, "employing").get(); Assert.assertEquals("employ", word.getLemma()); }
public Optional<IndexWord> lookupWord(final POS pos, final String word) { try { return Optional.ofNullable(dictionary.lookupIndexWord(pos, word)); } catch (final JWNLException e) { getMonitor().warn("Lookup word failed", e); return Optional.empty(); } }
SharedWordNetResource extends BaleenResource { public Optional<IndexWord> lookupWord(final POS pos, final String word) { try { return Optional.ofNullable(dictionary.lookupIndexWord(pos, word)); } catch (final JWNLException e) { getMonitor().warn("Lookup word failed", e); return Optional.empty(); } } }
SharedWordNetResource extends BaleenResource { public Optional<IndexWord> lookupWord(final POS pos, final String word) { try { return Optional.ofNullable(dictionary.lookupIndexWord(pos, word)); } catch (final JWNLException e) { getMonitor().warn("Lookup word failed", e); return Optional.empty(); } }  }
SharedWordNetResource extends BaleenResource { public Optional<IndexWord> lookupWord(final POS pos, final String word) { try { return Optional.ofNullable(dictionary.lookupIndexWord(pos, word)); } catch (final JWNLException e) { getMonitor().warn("Lookup word failed", e); return Optional.empty(); } }  Dictionary getDictionary(); Optional<IndexWord> lookupWord(final POS pos, final String word); Optional<IndexWord> getWord(final POS pos, final String lemma); Stream<String> getSuperSenses(POS pos, String word); Optional<String> getBestSuperSense(POS pos, String word); }
SharedWordNetResource extends BaleenResource { public Optional<IndexWord> lookupWord(final POS pos, final String word) { try { return Optional.ofNullable(dictionary.lookupIndexWord(pos, word)); } catch (final JWNLException e) { getMonitor().warn("Lookup word failed", e); return Optional.empty(); } }  Dictionary getDictionary(); Optional<IndexWord> lookupWord(final POS pos, final String word); Optional<IndexWord> getWord(final POS pos, final String lemma); Stream<String> getSuperSenses(POS pos, String word); Optional<String> getBestSuperSense(POS pos, String word);  }