本文整理了Java中com.chenlb.mmseg4j.Word.setDegree()
方法的一些代码示例,展示了Word.setDegree()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Word.setDegree()
方法的具体详情如下:
包路径:com.chenlb.mmseg4j.Word
类名称:Word
方法名:setDegree
暂无
代码示例来源:origin: medcl/elasticsearch-analysis-mmseg
private Chunk createChunk(Sentence sen, char[] chs, int[] tailLen, int[] offsets, CharNode[] cns/*, char[][] cks*/) {
Chunk ck = new Chunk();
for(int i=0; i<3; i++) {
if(offsets[i] < chs.length) {
ck.words[i] = new Word(chs, sen.getStartOffset(), offsets[i], tailLen[i]+1);//new Word(cks[i], sen.getStartOffset()+offsets[i]);
if(tailLen[i] == 0) { //单字的要取得"字频计算出自由度"
CharNode cn = cns[i]; //dic.head(chs[offsets[i]]);
if(cn !=null) {
ck.words[i].setDegree(cn.getFreq());
}
}
}
}
return ck;
}
代码示例来源:origin: com.chenlb.mmseg4j/mmseg4j-core
private Chunk createChunk(Sentence sen, char[] chs, int[] tailLen, int[] offsets, CharNode[] cns/*, char[][] cks*/) {
Chunk ck = new Chunk();
for(int i=0; i<3; i++) {
if(offsets[i] < chs.length) {
ck.words[i] = new Word(chs, sen.getStartOffset(), offsets[i], tailLen[i]+1);//new Word(cks[i], sen.getStartOffset()+offsets[i]);
if(tailLen[i] == 0) { //单字的要取得"字频计算出自由度"
CharNode cn = cns[i]; //dic.head(chs[offsets[i]]);
if(cn !=null) {
ck.words[i].setDegree(cn.getFreq());
}
}
}
}
return ck;
}
代码示例来源:origin: chenlb/mmseg4j-core
private Chunk createChunk(Sentence sen, char[] chs, int[] tailLen, int[] offsets, CharNode[] cns/*, char[][] cks*/) {
Chunk ck = new Chunk();
for(int i=0; i<3; i++) {
if(offsets[i] < chs.length) {
ck.words[i] = new Word(chs, sen.getStartOffset(), offsets[i], tailLen[i]+1);//new Word(cks[i], sen.getStartOffset()+offsets[i]);
if(tailLen[i] == 0) { //单字的要取得"字频计算出自由度"
CharNode cn = cns[i]; //dic.head(chs[offsets[i]]);
if(cn !=null) {
ck.words[i].setDegree(cn.getFreq());
}
}
}
}
return ck;
}
内容来源于网络,如有侵权,请联系作者删除!