本文整理了Java中net.sf.extjwnl.data.Word.getLexId()
方法的一些代码示例,展示了Word.getLexId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Word.getLexId()
方法的具体详情如下:
包路径:net.sf.extjwnl.data.Word
类名称:Word
方法名:getLexId
[英]Returns the lexicographer id that identifies this lemma
[中]返回识别此引理的词典编纂器id
代码示例来源:origin: net.sf.extjwnl/extjwnl
/**
* Returns the sense key of a lemma.
*
* @return sense key
* @throws JWNLException JWNLException
*/
public String getSenseKey() throws JWNLException {
int ss_type = getSynsetType();
final StringBuilder senseKey = startBuildingSenseKey(ss_type);
if (POS.ADJECTIVE_SATELLITE_ID == ss_type) {
List<Pointer> p = synset.getPointers(PointerType.SIMILAR_TO);
if (0 < p.size()) {
Pointer headWord = p.get(0);
List<Word> words = headWord.getTargetSynset().getWords();
if (0 < words.size()) {
Word word = words.get(0);
senseKey.append(word.getLemma().toLowerCase().replace(' ', '_')).append(":");
if (word.getLexId() < 10) {
senseKey.append("0");
}
senseKey.append(word.getLexId());
}
}
} else {
senseKey.append(":");
}
return senseKey.toString();
}
代码示例来源:origin: extjwnl/extjwnl
/**
* Returns the sense key of a lemma.
*
* @return sense key
* @throws JWNLException JWNLException
*/
public String getSenseKey() throws JWNLException {
int ss_type = getSynsetType();
final StringBuilder senseKey = startBuildingSenseKey(ss_type);
if (POS.ADJECTIVE_SATELLITE_ID == ss_type) {
List<Pointer> p = synset.getPointers(PointerType.SIMILAR_TO);
if (0 < p.size()) {
Pointer headWord = p.get(0);
List<Word> words = headWord.getTargetSynset().getWords();
if (0 < words.size()) {
Word word = words.get(0);
senseKey.append(word.getLemma().toLowerCase().replace(' ', '_')).append(":");
if (word.getLexId() < 10) {
senseKey.append("0");
}
senseKey.append(word.getLexId());
}
}
} else {
senseKey.append(":");
}
return senseKey.toString();
}
代码示例来源:origin: extjwnl/extjwnl
final Word word = words.get(i);
System.out.print(word.getLemma());
if (needLex && 0 < word.getLexId()) {
System.out.print(word.getLexId());
代码示例来源:origin: net.sf.extjwnl/extjwnl-utilities
final Word word = words.get(i);
System.out.print(word.getLemma());
if (needLex && 0 < word.getLexId()) {
System.out.print(word.getLexId());
代码示例来源:origin: net.sf.extjwnl/extjwnl
if (word.getLexId() < 10) {
senseKey.append("0");
senseKey.append(word.getLexId());
代码示例来源:origin: extjwnl/extjwnl
if (word.getLexId() < 10) {
senseKey.append("0");
senseKey.append(word.getLexId());
代码示例来源:origin: net.sf.extjwnl/extjwnl
int maxId = -1;
for (Word word : list) {
if (maxId < word.getLexId()) {
maxId = word.getLexId();
if (-1 == word.getLexId()) {
maxId++;
word.setLexId(maxId);
代码示例来源:origin: extjwnl/extjwnl
int maxId = -1;
for (Word word : list) {
if (maxId < word.getLexId()) {
maxId = word.getLexId();
if (-1 == word.getLexId()) {
maxId++;
word.setLexId(maxId);
代码示例来源:origin: net.sf.extjwnl/extjwnl-utilities
synsetWordStmt.setInt(4, word.getIndex());
synsetWordStmt.setInt(5, word.getUseCount());
synsetWordStmt.setLong(6, word.getLexId());
代码示例来源:origin: extjwnl/extjwnl
synsetWordStmt.setInt(4, word.getIndex());
synsetWordStmt.setInt(5, word.getUseCount());
synsetWordStmt.setLong(6, word.getLexId());
代码示例来源:origin: net.sf.extjwnl/extjwnl
if (checkLexIdLimit && log.isWarnEnabled() && (0xF < w.getLexId())) {
log.warn(dictionary.getMessages().resolveMessage("PRINCETON_WARN_005",
new Object[]{synset.getOffset(), w.getLemma(), w.getLexId()}));
result.append(Long.toHexString(w.getLexId())).append(' ');
代码示例来源:origin: extjwnl/extjwnl
if (checkLexIdLimit && log.isWarnEnabled() && (0xF < w.getLexId())) {
log.warn(dictionary.getMessages().resolveMessage("PRINCETON_WARN_005",
new Object[]{synset.getOffset(), w.getLemma(), w.getLexId()}));
result.append(Long.toHexString(w.getLexId())).append(' ');
内容来源于网络,如有侵权,请联系作者删除!