concraft-0.7.0: Morphological disambiguation based on constrained CRFs

Safe HaskellNone

NLP.Concraft.Guess

Contents

Synopsis

Types

data Guesser t Source

A guessing model.

Constructors

Guesser 

Fields

schemaConf :: SchemaConf
 
crf :: CRF Ob t
 

Instances

(Ord t, Binary t) => Binary (Guesser t) 

Guessing

guess :: (Word w, Ord t) => Int -> Guesser t -> Sent w t -> [[t]]Source

Determine k most probable labels for each word in the sentence.

include :: (Word w, Ord t) => (Sent w t -> [[t]]) -> Sent w t -> Sent w tSource

Insert guessing results into the sentence.

guessSent :: (Word w, Ord t) => Int -> Guesser t -> Sent w t -> Sent w tSource

Combine guess with include.

Training

data TrainConf Source

Training configuration.

Constructors

TrainConf 

Fields

schemaConfT :: SchemaConf
 
sgdArgsT :: SgdArgs
 
onDiskT :: Bool

Store SGD dataset on disk.

trainSource

Arguments

:: (Word w, Ord t) 
=> TrainConf

Training configuration

-> IO [Sent w t]

Training data

-> IO [Sent w t]

Evaluation data

-> IO (Guesser t) 

Train guesser.