concraft-0.3.1: Morphosyntactic tagging tool based on constrained CRFs

Safe HaskellNone

NLP.Concraft.Guess

Synopsis

Documentation

newtype Guesser t Source

A guesser represented by the conditional random field.

Constructors

Guesser 

Fields

crf :: CRF Ob t
 

Instances

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

guess :: Ord t => Int -> Schema t a -> Guesser t -> Sent t -> [[t]]Source

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

include :: Ord t => Sent t -> [[t]] -> Sent tSource

Include guessing results into the sentence.

guessSent :: Sent s w -> Int -> Schema Tag a -> Guesser Tag -> s -> sSource

Tag sentence in external format. Selected interpretations (tags correct within the context) will be preserved.

guessDocSource

Arguments

:: Functor f 
=> Doc f s w

Document format handler

-> Int

Guesser argument

-> Schema Tag a

Observation schema

-> Guesser Tag

Guesser itself

-> Text

Input

-> Text

Output

Tag file.

trainOnSource

Arguments

:: Foldable f 
=> Doc f s w

Document format handler

-> Schema Tag a

Observation schema

-> SgdArgs

SGD parameters

-> FilePath

Training file

-> Maybe FilePath

Maybe eval file

-> IO (Guesser Tag) 

Train guesser.