public static List<Sentence> getPaths(ArrayList<ArrayList<Integer>> list,
			Matrix<TokenNode> matrix, int offset) {
		List<Sentence> result=new ArrayList<Sentence>(list.size());
		Cell[] cells;
		int idx;
		Sentence tem;
		int path_order=0;
		XIterator<TokenNode> p_it;
		TokenNode Pnode;
		for(ArrayList<Integer> lk:list){
			Collections.sort(lk);
			cells=new Cell[lk.size()];
			idx=-1;
			p_it = matrix.iterator();
			while ((Pnode = p_it.next()) != null) {
				int ipdx=p_it.index();
				if(Collections.binarySearch(lk, ipdx)>-1){
					cells[++idx]=Pnode.cell;
				}
			}
			tem=new Sentence(cells,offset);
			LogUtils.getLogger().log(tem, "path: "+path_order++);
			result.add(tem);
		}
		return result;
	}