Safe Haskell | None |
---|---|

Language | Haskell98 |

## Synopsis

- data CRF a b = CRF {}
- train :: (Ord a, Ord b) => SgdArgs -> Bool -> ([SentL a b] -> Set b) -> (AVec Lb -> [(Xs, Ys)] -> [Feature]) -> IO [SentL a b] -> IO [SentL a b] -> IO (CRF a b)
- oovChosen :: Ord b => [SentL a b] -> Set b
- anyChosen :: Ord b => [SentL a b] -> Set b
- anyInterps :: Ord b => [SentL a b] -> Set b

# Model

A conditional random field model with additional codec used for data encoding.

# Training

:: (Ord a, Ord b) | |

=> SgdArgs | Args for SGD |

-> Bool | Store dataset on a disk |

-> ([SentL a b] -> Set b) | R0 construction |

-> (AVec Lb -> [(Xs, Ys)] -> [Feature]) | Feature selection |

-> IO [SentL a b] | Training data |

-> IO [SentL a b] | Evaluation data |

-> IO (CRF a b) | Resulting model |

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.Constrained.Feature.Present and Data.CRF.Chain1.Constrained.Feature.Hidden modules for this purpose.

You also have to supply R0 construction method (e.g. `oovChosen`

)
which determines the contents of the default set of labels.