A conditional random field model with additional codec used for data encoding.
|:: (Ord a, Ord b)|
Args for SGD
|-> IO [SentL a b]|
|-> Maybe (IO [SentL a b])|
Maybe evalation data
|-> (AVec Lb -> [(Xs, Ys)] -> [Feature])|
|-> IO (CRF a b)|
Train the CRF using the stochastic gradient descent method.
The resulting model will contain features extracted with
the user supplied extraction function.
You can use the functions provided by the Data.CRF.Chain1.Feature.Present
and Data.CRF.Chain1.Feature.Hidden modules for this purpose.
When the evaluation data
IO action is
Just, the iterative
training process will notify the user about the current accuracy
on the evaluation part every full iteration over the training part.
TODO: Accept custom r0 construction function.