concraft-0.3.2: Morphosyntactic tagging tool based on constrained CRFs

Safe HaskellNone

NLP.Concraft.Disamb

Synopsis

Documentation

type Split r t = r -> tSource

Split is just a function from an original tag form to a complex tag form.

type TrainCRF o t cSource

Arguments

 = IO [SentL o t]

Training data IO action

-> Maybe (IO [SentL o t])

Maybe evalation data

-> IO c

Resulting model

CRF training function.

type TagCRF o t = Sent o t -> [t]Source

CRF tagging function.

disamb :: (Ord r, Ord t) => Schema t a -> Split r t -> TagCRF Ob t -> Sent r -> [r]Source

Perform context-sensitive disambiguation.

disambSent :: Ord t => Sent s w -> Schema t a -> Split Tag t -> TagCRF Ob t -> s -> sSource

Tag the sentence.

disambDocSource

Arguments

:: (Functor f, Ord t) 
=> Doc f s w

Document format handler

-> Schema t a

Observation schema

-> Split Tag t

Tiered tagging

-> TagCRF Ob t

CRF tagging function

-> Text

Input

-> Text

Output

Disambiguate document.

trainOnSource

Arguments

:: (Foldable f, Ord t) 
=> Doc f s w

Document format handler

-> Schema t a

Observation schema

-> Split Tag t

Tiered tagging

-> TrainCRF Ob t c

CRF training function

-> FilePath

Training file

-> Maybe FilePath

Maybe eval file

-> IO c

Resultant model data

Train disamb model.