本文整理了Java中com.chenlb.mmseg4j.Word.getStartOffset()
方法的一些代码示例,展示了Word.getStartOffset()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Word.getStartOffset()
方法的具体详情如下:
包路径:com.chenlb.mmseg4j.Word
类名称:Word
方法名:getStartOffset
[英]此 word 在整个文本中的偏移位置
[中]
代码示例来源:origin: looly/hutool
@Override
public int getStartOffset() {
return this.word.getStartOffset();
}
代码示例来源:origin: looly/hutool
@Override
public int getStartOffset() {
return this.word.getStartOffset();
}
代码示例来源:origin: cn.hutool/hutool-all
@Override
public int getStartOffset() {
return this.word.getStartOffset();
}
代码示例来源:origin: medcl/elasticsearch-analysis-mmseg
public int getEndOffset() {
return getStartOffset() + getLength();
}
public int getDegree() {
代码示例来源:origin: com.chenlb.mmseg4j/mmseg4j-core
public int getEndOffset() {
return getStartOffset() + getLength();
}
public int getDegree() {
代码示例来源:origin: chenlb/mmseg4j-core
public int getEndOffset() {
return getStartOffset() + getLength();
}
public int getDegree() {
代码示例来源:origin: medcl/elasticsearch-analysis-mmseg
char[] chs = word.getSen();
int offset = word.getWordOffset(), n = 0, wordEnd = word.getWordOffset()+word.getLength();
int senStartOffset = word.getStartOffset() - offset; //sen 在文件中的位置
int end = -1; //上一次找到的位置
for(; offset<wordEnd-1; offset++) {
代码示例来源:origin: chenlb/mmseg4j-core
char[] chs = word.getSen();
int offset = word.getWordOffset(), n = 0, wordEnd = word.getWordOffset()+word.getLength();
int senStartOffset = word.getStartOffset() - offset; //sen 在文件中的位置
int end = -1; //上一次找到的位置
for(; offset<wordEnd-1; offset++) {
代码示例来源:origin: com.chenlb.mmseg4j/mmseg4j-core
char[] chs = word.getSen();
int offset = word.getWordOffset(), n = 0, wordEnd = word.getWordOffset()+word.getLength();
int senStartOffset = word.getStartOffset() - offset; //sen 在文件中的位置
int end = -1; //上一次找到的位置
for(; offset<wordEnd-1; offset++) {
代码示例来源:origin: medcl/elasticsearch-analysis-mmseg
@Override
public final boolean incrementToken() throws IOException {
clearAttributes();
Word word = mmSeg.get().next();
if(word != null) {
//lucene 3.0
//termAtt.setTermBuffer(word.getSen(), word.getWordOffset(), word.getLength());
//lucene 3.1
termAtt.copyBuffer(word.getSen(), word.getWordOffset(), word.getLength());
offsetAtt.setOffset(word.getStartOffset(), word.getEndOffset());
typeAtt.setType(word.getType());
return true;
} else {
end();
return false;
}
}
}
代码示例来源:origin: com.chenlb.mmseg4j/mmseg4j-solr
@Override
public final boolean incrementToken() throws IOException {
clearAttributes();
Word word = mmSeg.next();
if(word != null) {
termAtt.copyBuffer(word.getSen(), word.getWordOffset(), word.getLength());
offsetAtt.setOffset(word.getStartOffset(), word.getEndOffset());
typeAtt.setType(word.getType());
return true;
} else {
return false;
}
}
}
代码示例来源:origin: chenlb/mmseg4j-solr
@Override
public final boolean incrementToken() throws IOException {
clearAttributes();
Word word = mmSeg.next();
if(word != null) {
termAtt.copyBuffer(word.getSen(), word.getWordOffset(), word.getLength());
offsetAtt.setOffset(word.getStartOffset(), word.getEndOffset());
typeAtt.setType(word.getType());
return true;
} else {
return false;
}
}
}
代码示例来源:origin: org.tinygroup/org.tinygroup.mmseg4j
@Override
public final boolean incrementToken() throws IOException {
clearAttributes();
Word word = mmSeg.next();
if (word != null) {
//lucene 3.0
//termAtt.setTermBuffer(word.getSen(), word.getWordOffset(), word.getLength());
//lucene 3.1
termAtt.copyBuffer(word.getSen(), word.getWordOffset(), word.getLength());
offsetAtt.setOffset(word.getStartOffset(), word.getEndOffset());
typeAtt.setType(word.getType());
return true;
} else {
end();
return false;
}
}
内容来源于网络,如有侵权,请联系作者删除!