This function will directly modify the CRF and return the same CRF.
Details
This function makes the data structure of features need for modeling and training CRF.
The parameters n.nf and n.ef specify the number of node and edge features, respectively.
The objects node.par and edge.par define the corresponding parameters used with each feature. node.par is a 3-dimensional arrays, and element node.par[n,i,f] is the index of parameter associated with the corresponding node potential node.pot[n,i] and node feature f. edge.par is a list of 3-dimensional arrays, and element edge.par[[e]][i,j,f] is the index of parameter associated with the corresponding edge potential edge.pot[[e]][i,j] and edge feature f. The value 0 is used to indicate the corresponding node or edge potential does not depend on that feature.
For detail of calculation of node and edge potentials from features and parameters, please see crf.update.