concraft-0.8.2: 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

SGD parameters.

onDiskT :: Bool

Store SGD dataset on disk

r0T :: R0T

R0 construction method

data R0T Source

Method of constructing the default set of labels (R0).

Instances

Enum R0T 
Eq R0T 
Data R0T 
Ord R0T 
Show R0T 
Typeable R0T 

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.