Safe Haskell | None |
---|---|
Language | Haskell98 |
Synopsis
- data Guesser t s = Guesser {
- schemaConf :: SchemaConf
- crf :: CRF Ob s
- zeroProbLab :: s
- unkTagSet :: Set t
- simplify :: t -> s
- complexify :: s -> t
- putGuesser :: (Binary t, Binary s, Ord s) => Guesser t s -> Put
- getGuesser :: (Binary t, Binary s, Ord s, Ord t) => (t -> s) -> (s -> t) -> Get (Guesser t s)
- marginals :: (Word w, Ord t, Ord s) => Config s -> Guesser t s -> Sent w t -> DAG () (WMap t)
- marginalsSent :: (Word w, Ord t, Ord s) => Config s -> Guesser t s -> Sent w t -> Sent w t
- data TrainConf t s = TrainConf {
- schemaConfT :: SchemaConf
- sgdArgsT :: SgdArgs
- onDiskT :: Bool
- r0T :: R0T
- zeroProbLabel :: t
- simplifyLabel :: t -> s
- complexifyLabel :: s -> t
- stripLabel :: t -> t
- onlyVisible :: Bool
- data R0T
- train :: (Word w, Ord t, Ord s) => TrainConf t s -> IO [Sent w t] -> IO [Sent w t] -> IO (Guesser t s)
- schemed :: (Word w, Ord t, Ord s) => (t -> s) -> Schema w s a -> [Sent w t] -> [SentL Ob s]
Types
A guessing model.
Guesser | |
|
putGuesser :: (Binary t, Binary s, Ord s) => Guesser t s -> Put Source #
Store the entire guessing model apart from the simplification function.
getGuesser :: (Binary t, Binary s, Ord s, Ord t) => (t -> s) -> (s -> t) -> Get (Guesser t s) Source #
Get the disambiguation model, provided the simplification function. getGuesser :: (M.Map t T.Tag) -> Get (Guesser t)
Marginals
marginals :: (Word w, Ord t, Ord s) => Config s -> Guesser t s -> Sent w t -> DAG () (WMap t) Source #
Determine the marginal probabilities of the individual labels in the sentence.
marginalsSent :: (Word w, Ord t, Ord s) => Config s -> Guesser t s -> Sent w t -> Sent w t Source #
Replace the probabilities of the sentence labels with the marginal probabilities stemming from the model.
Training
Training configuration.
TrainConf | |
|
Method of constructing the default set of labels (R0).
Instances
Enum R0T Source # | |
Eq R0T Source # | |
Data R0T Source # | |
Defined in NLP.Concraft.DAG.Guess gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> R0T -> c R0T # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c R0T # dataTypeOf :: R0T -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c R0T) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c R0T) # gmapT :: (forall b. Data b => b -> b) -> R0T -> R0T # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> R0T -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> R0T -> r # gmapQ :: (forall d. Data d => d -> u) -> R0T -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> R0T -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> R0T -> m R0T # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> R0T -> m R0T # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> R0T -> m R0T # | |
Ord R0T Source # | |
Show R0T Source # | |
:: (Word w, Ord t, Ord s) | |
=> TrainConf t s | Training configuration |
-> IO [Sent w t] | Training data |
-> IO [Sent w t] | Evaluation data |
-> IO (Guesser t s) |
Train guesser.