public synchronized Synset getSynset(POS pos, long offset) throws JWNLException { return wordnet.getSynsetAt(pos, offset); }
public synchronized Synset getSynset(POS pos, long offset) throws JWNLException { return wordnet.getSynsetAt(pos, offset); }
private void loadSynset(int i) throws JWNLException { if (_synsets[i] == null) { _synsets[i] = Dictionary.getInstance().getSynsetAt(_pos, _synsetOffsets[i]); } }
/** Get the actual target of this pointer. */ public PointerTarget getTarget() throws JWNLException { if (_target == null) { Dictionary dic = Dictionary.getInstance(); Synset syn = dic.getSynsetAt(_targetIndex._pos, _targetIndex._offset); _target = (_targetIndex._index == 0) ? (PointerTarget) syn : (PointerTarget) syn.getWord(_targetIndex._index - 1); } return _target; }
private static Synset getSynset(final String id) { final POS pos = POS.getPOSForKey(getPOS(id)); final long offset = getOffset(id); try { synchronized (WordNet.class) { return getDictionary().getSynsetAt(pos, offset); } } catch (final JWNLException ex) { throw new Error(ex); } }