docs: public int generateAt(Instance instance, IFeatureAlphabet features, int pos,
  			int... numLabels) throws Exception {
  		assert (numLabels.length == 1);
  
  		String[][] data = (String[][]) instance.getData();
  		int len = data[0].length;
  
  		if(order>0&& len==1) //对于长度为1的序列，不考虑1阶以上特征
  			return -1;
  		
  		if(isForceTrain){
  			if(len<minLen && order>0 )//训练时，对于长度过小的句子，不考虑开始、结束特征
  				return -1;
  		}
  		StringBuffer sb = new StringBuffer();
  		sb.append(id);
  		sb.append(':');
  		for (int i = 0; i < dims.length; i++) {
  			String rp = "";
  			int j = dims[i][0]; //行号
  			int k = dims[i][1]; //列号
  			if (pos + j < 0 || pos + j >= len) {
  				if(isForceTrain){
  					if(len<minLen )//对于长度过小的句子，不考虑开始、结束特征
  						return -1;
  				}
  				if (pos + j < 0)
  					rp = "B_" + String.valueOf(-(pos + j) - 1);
  				if (pos + j >= len)
  					rp = "E_" + String.valueOf(pos + j - len);
  
  			} else {
  				rp = data[k][pos + j]; //这里数据行列和模板中行列相反
  			}
  			
  			sb.append(rp);
  			sb.append("/");
  		}
  		for (int i = 0; i < dims_t.length; i++) {
  			String rp = "";
  			int j = dims_t[i][0]; //行号
  			int k = dims_t[i][1]; //列号
  			if (pos + j < 0 || pos + j >= len) {
  				if(isForceTrain){
  					if(len<minLen )//对于长度过小的句子，不考虑开始、结束特征
  						return -1;
  				}
  				if (pos + j < 0)
  					rp = "Bt_" + String.valueOf(-(pos + j) - 1);
  				if (pos + j >= len)
  					rp = "Et_" + String.valueOf(pos + j - len);
  
  			} else {
  				rp = Chars.getStringType(data[k][pos + j]).toString(); //这里数据行列和模板中行列相反
  			}
  			
  			sb.append(rp);
  			sb.append("/");
  		}
  		for (int i = 0; i < dims_p.length; i++) {
  			String rp = "";
  			int j = dims_p[i][0]; //行号
  			int k = dims_p[i][1]; //列号
  			if (pos + j < 0 || pos + j >= len) {
  				if(isForceTrain){
  					if(len<minLen )//对于长度过小的句子，不考虑开始、结束特征
  						return -1;
  				}
  				if (pos + j < 0)
  					rp = "Bp_" + String.valueOf(-(pos + j) - 1);
  				if (pos + j >= len)
  					rp = "Ep_" + String.valueOf(pos + j - len);
  
  			} else {
  				rp = String.valueOf(Chars.isPunc(data[k][pos + j])); //这里数据行列和模板中行列相反
  			}
  			
  			sb.append(rp);
  			sb.append("/");
  		}
  //		System.out.println("feature: " + sb.toString());
  		int index = features.lookupIndex(sb.toString(), (int) Math.pow(numLabels[0], order + 1));
  		return index;
  	}