net.didion.jwnl.dictionary.Dictionary.getSynsetAt()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(99)

本文整理了Java中net.didion.jwnl.dictionary.Dictionary.getSynsetAt()方法的一些代码示例,展示了Dictionary.getSynsetAt()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Dictionary.getSynsetAt()方法的具体详情如下:
包路径:net.didion.jwnl.dictionary.Dictionary
类名称:Dictionary
方法名:getSynsetAt

Dictionary.getSynsetAt介绍

[英]Return the Synset at offset offset from the database.
[中]从数据库返回偏移量offset处的Synset

代码示例

代码示例来源:origin: CogComp/cogcomp-nlp

public synchronized Synset getSynset(POS pos, long offset) throws JWNLException {
  return wordnet.getSynsetAt(pos, offset);
}

代码示例来源:origin: edu.illinois.cs.cogcomp/illinois-edison

public synchronized Synset getSynset(POS pos, long offset) throws JWNLException {
  return wordnet.getSynsetAt(pos, offset);
}

代码示例来源:origin: net.sf.jwordnet/jwnl

private void loadSynset(int i) throws JWNLException {
  if (_synsets[i] == null) {
    _synsets[i] = Dictionary.getInstance().getSynsetAt(_pos, _synsetOffsets[i]);
  }
}

代码示例来源:origin: net.sf.jwordnet/jwnl

/** 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;
}

代码示例来源:origin: eu.fbk.pikes/pikes-resources

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);
  }
}

相关文章