/** * Get an exact lemma from the dictionary, . * * @param pos the pos * @param lemma the lemma * @return the WordNet word (as an optional) */ public Optional<IndexWord> getWord(final POS pos, final String lemma) { try { return Optional.ofNullable(dictionary.getIndexWord(pos, lemma)); } catch (final JWNLException e) { getMonitor().warn("Get word failed", e); return Optional.empty(); } }
/** * Lookup the word from the dictionary, performing lemmisation if required. * * @param pos the pos * @param word the word * @return the WordNet word, (as an optional) */ 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(); } }
/** * Lookup the word from the dictionary, performing lemmisation if required. * * @param pos the pos * @param word the word * @return the WordNet word, (as an optional) */ 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(); } }
/** * Get an exact lemma from the dictionary, . * * @param pos the pos * @param lemma the lemma * @return the WordNet word (as an optional) */ public Optional<IndexWord> getWord(final POS pos, final String lemma) { try { return Optional.ofNullable(dictionary.getIndexWord(pos, lemma)); } catch (final JWNLException e) { getMonitor().warn("Get word failed", e); return Optional.empty(); } }