Safe Haskell | None |
---|---|
Language | Haskell98 |
Synopsis
- data CRF a b = CRF {}
- size :: CRF a b -> Int
- prune :: Double -> CRF a b -> CRF a b
- train :: (Ord a, Ord b) => Int -> FeatSel -> SgdArgs -> Bool -> IO [SentL a b] -> IO [SentL a b] -> IO (CRF a b)
- reTrain :: (Ord a, Ord b) => CRF a b -> SgdArgs -> Bool -> IO [SentL a b] -> IO [SentL a b] -> IO (CRF a b)
- tag :: (Ord a, Ord b) => CRF a b -> Sent a b -> [[b]]
- marginals :: (Ord a, Ord b) => CRF a b -> Sent a b -> [[Double]]
- module Data.CRF.Chain2.Tiers.Dataset.External
- module Data.CRF.Chain2.Tiers.Feature
CRF
CRF model data.
prune :: Double -> CRF a b -> CRF a b Source #
Discard model features with absolute values (in log-domain) lower than the given threshold.
Training
:: (Ord a, Ord b) | |
=> Int | Number of layers (tiers) |
-> FeatSel | Feature selection |
-> SgdArgs | SGD parameters |
-> Bool | Store dataset on a disk |
-> 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.
:: (Ord a, Ord b) | |
=> CRF a b | Existing CRF model |
-> SgdArgs | SGD parameters |
-> Bool | Store dataset on a disk |
-> IO [SentL a b] | Training data |
-> IO [SentL a b] | Evaluation data |
-> IO (CRF a b) | Resulting model |
Re-train the CRF using the stochastic gradient descent method.
Tagging
tag :: (Ord a, Ord b) => CRF a b -> Sent a b -> [[b]] Source #
Find the most probable label sequence.
marginals :: (Ord a, Ord b) => CRF a b -> Sent a b -> [[Double]] Source #
Tag labels with marginal probabilities.