public int[] suffStats(String cand_str,int i){
  int[] stats=new int[suffStatsCount];
  if (!cand_str.equals("")) {
    String[] words=cand_str.split("\\s+");
    set_prec_suffStats(stats,words,i);
    stats[suffStatsCount - 2]=words.length;
    stats[suffStatsCount - 1]=effLength(words.length,i);
  }
 else {
    String[] words=new String[0];
    set_prec_suffStats(stats,words,i);
    stats[suffStatsCount - 2]=0;
    stats[suffStatsCount - 1]=effLength(0,i);
  }
  return stats;
}

public int [ ] suffStats ( String cand_str , int i ) { int [ ] stats = new int [ suffStatsCount ] ; if ( ! cand_str . equals ( "" ) ) { String [ ] words = cand_str . split ( "\\s+" ) ; set_prec_suffStats ( stats , words , i ) ; stats [ suffStatsCount - 2 ] = words . length ; stats [ suffStatsCount - 1 ] = effLength ( words . length , i ) ; } else { String [ ] words = new String [ 0 ] ; set_prec_suffStats ( stats , words , i ) ; stats [ suffStatsCount - 2 ] = 0 ; stats [ suffStatsCount - 1 ] = effLength ( 0 , i ) ; } return stats ; }
computes the bleu sufficient statistics on a hypothesis .
