gpt4 book ai didi

se.lth.cs.srl.corpus.Yield.size()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-17 05:39:31 25 4
gpt4 key购买 nike

本文整理了Java中se.lth.cs.srl.corpus.Yield.size()方法的一些代码示例,展示了Yield.size()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Yield.size()方法的具体详情如下:
包路径:se.lth.cs.srl.corpus.Yield
类名称:Yield
方法名:size

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;
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com