本文整理了Java中net.sf.extjwnl.data.Word.getSenseKeyWithAdjClass()
方法的一些代码示例,展示了Word.getSenseKeyWithAdjClass()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Word.getSenseKeyWithAdjClass()
方法的具体详情如下:
包路径:net.sf.extjwnl.data.Word
类名称:Word
方法名:getSenseKeyWithAdjClass
[英]Returns the sense key of a lemma, taking into account adjective class (position).
[中]返回引理的意义键,考虑形容词类(位置)。
代码示例来源:origin: extjwnl/extjwnl
private ArrayList<Word> collectWordsToRender() throws JWNLException {
ArrayList<Word> result = new ArrayList<>();
Set<String> renderedKeys = new HashSet<>();
for (POS pos : POS.getAllPOS()) {
Iterator<IndexWord> ii = dictionary.getIndexWordIterator(pos);
while (ii.hasNext()) {
IndexWord iw = ii.next();
for (int i = 0; i < iw.getSenses().size(); i++) {
for (Word w : iw.getSenses().get(i).getWords()) {
if (0 < w.getUseCount()) {
String key = w.getSenseKeyWithAdjClass();
if (!renderedKeys.contains(key)) {
result.add(w);
renderedKeys.add(key);
}
}
}
}
}
}
return result;
}
代码示例来源:origin: net.sf.extjwnl/extjwnl
private ArrayList<Word> collectWordsToRender() throws JWNLException {
ArrayList<Word> result = new ArrayList<>();
Set<String> renderedKeys = new HashSet<>();
for (POS pos : POS.getAllPOS()) {
Iterator<IndexWord> ii = dictionary.getIndexWordIterator(pos);
while (ii.hasNext()) {
IndexWord iw = ii.next();
for (int i = 0; i < iw.getSenses().size(); i++) {
for (Word w : iw.getSenses().get(i).getWords()) {
if (0 < w.getUseCount()) {
String key = w.getSenseKeyWithAdjClass();
if (!renderedKeys.contains(key)) {
result.add(w);
renderedKeys.add(key);
}
}
}
}
}
}
return result;
}
代码示例来源:origin: net.sf.extjwnl/extjwnl
private Synset parseAndCacheSynset(POS pos, PointedCharSequence line) throws JWNLException {
Synset result = null;
if (null != line) {
result = factory.createSynset(pos, line);
for (Word w : result.getWords()) {
w.setUseCount(fileManager.getUseCount(w.getSenseKeyWithAdjClass()));
}
cacheSynset(result);
}
return result;
}
}
代码示例来源:origin: extjwnl/extjwnl
private Synset parseAndCacheSynset(POS pos, PointedCharSequence line) throws JWNLException {
Synset result = null;
if (null != line) {
result = factory.createSynset(pos, line);
for (Word w : result.getWords()) {
w.setUseCount(fileManager.getUseCount(w.getSenseKeyWithAdjClass()));
}
cacheSynset(result);
}
return result;
}
}
代码示例来源:origin: net.sf.extjwnl/extjwnl
return o1.getSenseKeyWithAdjClass().compareTo(o2.getSenseKeyWithAdjClass());
} catch (JWNLException e) {
throw new JWNLRuntimeException(e);
s.append(word.getSenseKeyWithAdjClass()).
append(' ').append(word.getSenseNumber()).
append(' ').append(word.getUseCount());
if (0 == result) {
try {
result = o2.getSenseKeyWithAdjClass().compareTo(o1.getSenseKeyWithAdjClass());
} catch (JWNLException e) {
throw new JWNLRuntimeException(e);
append(' ').append(word.getSenseKeyWithAdjClass()).
append(' ').append(word.getSenseNumber());
代码示例来源:origin: extjwnl/extjwnl
return o1.getSenseKeyWithAdjClass().compareTo(o2.getSenseKeyWithAdjClass());
} catch (JWNLException e) {
throw new JWNLRuntimeException(e);
s.append(word.getSenseKeyWithAdjClass()).
append(' ').append(word.getSenseNumber()).
append(' ').append(word.getUseCount());
if (0 == result) {
try {
result = o2.getSenseKeyWithAdjClass().compareTo(o1.getSenseKeyWithAdjClass());
} catch (JWNLException e) {
throw new JWNLRuntimeException(e);
append(' ').append(word.getSenseKeyWithAdjClass()).
append(' ').append(word.getSenseNumber());
代码示例来源:origin: de.tudarmstadt.ukp.uby/de.tudarmstadt.ukp.uby.integration.wordnet-gpl
if(lePOS.equals(EPartOfSpeech.adjective) && (synMarker = lexeme.getSenseKeyWithAdjClass()).contains("(")){
int start = synMarker.indexOf("(");
String adjFrameCode = synMarker.substring(start+1, synMarker.indexOf(")"));
内容来源于网络,如有侵权,请联系作者删除!