Safe Haskell | None |
---|---|
Language | Haskell98 |
Synopsis
- data Disamb t = Disamb {
- tiers :: [Tier]
- schemaConf :: SchemaConf
- crf :: CRF Ob Atom
- simplify :: t -> Tag
- putDisamb :: Disamb t -> Put
- getDisamb :: (t -> Tag) -> Get (Disamb t)
- data Tier = Tier {}
- data Atom = Atom {}
- data ProbType
- probsSent :: (Word w, Ord t) => ProbType -> Disamb t -> Sent w t -> Sent w t
- probs :: (Word w, Ord t) => ProbType -> Disamb t -> Sent w t -> DAG () (WMap t)
- data TrainConf t = TrainConf {
- tiersT :: [Tier]
- schemaConfT :: SchemaConf
- sgdArgsT :: SgdArgs
- onDiskT :: Bool
- simplifyLabel :: t -> Tag
- train :: (Word w, Ord t) => TrainConf t -> IO [Sent w t] -> IO [Sent w t] -> IO (Disamb t)
- prune :: Double -> Disamb t -> Disamb t
- schematize :: Schema w [t] a -> Sent w [t] -> Sent Ob t
Types
A disambiguation model.
Disamb | |
|
putDisamb :: Disamb t -> Put Source #
Store the entire disambiguation model apart from the simplification function.
getDisamb :: (t -> Tag) -> Get (Disamb t) Source #
Get the disambiguation model, provided the simplification function. getDisamb :: (M.Map t T.Tag) -> Get (Disamb t)
Tiers
A tier description.
An atomic part of morphosyntactic tag with optional POS.
Probs in general
probsSent :: (Word w, Ord t) => ProbType -> Disamb t -> Sent w t -> Sent w t Source #
Determine the marginal probabilities of to individual labels in the sentence. marginalsSent :: (X.Word w, Ord t) => Disamb t -> X.Sent w t -> DAG () (X.WMap [P.Atom])
probs :: (Word w, Ord t) => ProbType -> Disamb t -> Sent w t -> DAG () (WMap t) Source #
Determine the marginal probabilities of to individual labels in the sentence.
Training
Training configuration.
TrainConf | |
|
:: (Word w, Ord t) | |
=> TrainConf t | Training configuration |
-> IO [Sent w t] | Training data |
-> IO [Sent w t] | Evaluation data |
-> IO (Disamb t) |
Train disambiguation module.
Pruning
prune :: Double -> Disamb t -> Disamb t Source #
Prune disamb model: discard model features with absolute values (in log-domain) lower than the given threshold.