gpt4 book ai didi

net.didion.jwnl.data.Word.getPOS()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-23 17:43:05 28 4
gpt4 key购买 nike

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

Word.getPOS介绍

暂无

代码示例

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

public String toString() {
  if (_cachedToString == null) {
    Object[] params = new Object[]{getPOS(), getLemma(), getSynset(), new Integer(getIndex())};
    _cachedToString = JWNL.resolveMessage("DATA_TOSTRING_005", params);
  }
  return _cachedToString;
}

代码示例来源:origin: hltfbk/Excitement-Open-Platform

/**
 * Ctor
 * @param synset
 * @param strWord
 * @throws WordNetException 
 */
public JwnlSensedWord(JwnlSynset synset, String strWord) throws WordNetException {
  this.synset = synset;
  this.word = strWord;
  
  String wordToLookup = strWord.replace(' ', '_');	// mimic jwnl, which replaces underscores with spaces when looking up
   Word[] words = synset.realSynset.getWords();
   Word wordObj = lookupWordInWords(words, wordToLookup);
   if (wordObj == null)
     throw new WordNetException("\""+ strWord + "\" is not a memeber of the given synset " + synset);
   this.wordObj = wordObj;
   dictionary = synset.jwnlDictionary;
   this.pos = JwnlUtils.getWordNetPartOfSpeech( wordObj.getPOS());
}

代码示例来源:origin: hltfbk/Excitement-Open-Platform

/**
 * Ctor with an {@link Word} and a dictionary
 * This Ctor is quicker than the other.
 * @param jwiDictionary 
 * @throws WordNetException 
 */
JwnlSensedWord(Word objWord, JwnlDictionary jwnlDictionary) throws WordNetException {
  this.wordObj = objWord;
  this.synset = new JwnlSynset(jwnlDictionary, objWord.getSynset());
  this.word = objWord.getLemma();
  this.dictionary = jwnlDictionary;
  this.pos = JwnlUtils.getWordNetPartOfSpeech( wordObj.getPOS());
}

代码示例来源:origin: Noahs-ARK/semafor

w = words[i];
syn = w.getLemma();
pos = w.getPOS();
        w = words[j];
        lemma = w.getLemma();
        pos = w.getPOS();
        if(lemma.contains("_")){
          String[] parts = lemma.split("_");
      w = pTargetNode.getWord();
      lemma = w.getLemma();
      pos = w.getPOS();
      if(lemma.contains("_")){
        String[] parts = lemma.split("_");

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com