I already checked and understand some related topics like: define CRF++ template file
what I confuse now is if the template I defined is something like: ..... U02:%x[0,0], .....
what is the feature function looks like?
Thank you for help.
Shuai Hua
I think that you're asking about how to give CRF++ the functions or methods it needs to calculate values for the feature positions. CRF++ doesn't receive the feature functions as input, it generates the feature functions from input in order to calculate the probabilities it uses as part of the model. When you form/make the data set, you calculate the values of the features that go in the row/col-coordinates. The template is used to define how many feature positions there are and in what column one can find them. When they are bigram features, they don't need to look at the preceding / following tokens because feature positions are created for those automatically.
Let's say the feature-space is a list, where the position (index) of the list represents a unique function, and the value of the function is the value at that index. Ahead of time, you decide/define what the feature positions will mean and you calculate them by reading from your data. You compose this list for training and hand it to CRF++ with your template data (and also give your model-name as the last argument, which will be its output).