public void obfuscate(RawCorpus corpus) throws UndefinedException{
		ArrayList<ArrayList<String>> ret = new ArrayList<ArrayList<String>>();
		System.out.println("obfuscating corpus ...");
		if(corpus==null || corpus.getData()==null || corpus.getSize()==0){
			System.err.println("non-input corpus...");
			return ;
		}

		ret = new ArrayList<ArrayList<String>>();
		int error_line = 0;
		
		for(ArrayList<String> sample : corpus.getData()){ //取出数据集中的每条样本
//			if(sample.size()!= rules.size()){ //字段数目不对
//				error_line++;
//				System.err.println("size mismatch error in line: "+sample);
//				continue;
//			}
			ArrayList<String> out = new ArrayList<String>();
			for(int i=0; i<sample.size();i++){	// 处理样本中的每个字段
				String col = sample.get(i);
				
				SuperType type = definer.getType(i);
				String colname = type.getColumnName();
				MappingRule rule = rules.get(colname);
				type.setRule(rule);		
				
				//加密函数名为空时，不加密
				if(rule.getFuncname()==null || rule.getFuncname().length()==0){
					ArrayList<String> orig = new ArrayList<String>();
					orig.add(col);
					out.addAll(orig);
				}else{
					out.addAll( type.obfuscate(col) );
				}
			}
			ret.add(out);
		}
		System.out.println("Found "+error_line+" error lines");
		result = ret;
	}