本文整理了Java中se.lth.cs.srl.corpus.Yield.size()
方法的一些代码示例,展示了Yield.size()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Yield.size()
方法的具体详情如下:
包路径:se.lth.cs.srl.corpus.Yield
类名称:Yield
方法名:size
暂无
代码示例来源:origin: microth/PathLSTM
/**
* Checks whether this yield is continuous, ie they contain all the words in
* the sentence between this.first() and this.last(). Yields with 1 word are
* always continuous
*
* @return true if this yield is continuous, false otherwise
*/
public boolean isContinuous() {
if (this.size() < 2)
return true;
int senIndex = this.first().idx;
for (Word w : this) {
if (w.idx != senIndex++)
return false;
}
return true;
}
代码示例来源:origin: com.googlecode.mate-tools/srl
/**
* Checks whether this yield is continuous, ie they contain all the words in the
* sentence between this.first() and this.last(). Yields with 1 word are always continuous
* @return true if this yield is continuous, false otherwise
*/
public boolean isContinuous(){
if(this.size()<2)
return true;
int senIndex=sen.indexOf(this.first());
for(Word w:this){
if(sen.get(senIndex++)!=w)
return false;
}
return true;
}
内容来源于网络,如有侵权,请联系作者删除!