concraft-0.7.1: Morphological disambiguation based on constrained CRFs

Safe HaskellNone

NLP.Concraft.Disamb

Contents

Synopsis

Model

data Disamb Source

A disambiguation model.

Constructors

Disamb 

Fields

tiers :: [Tier]
 
schemaConf :: SchemaConf
 
crf :: CRF Ob Atom
 

Instances

Tiers

data Tier Source

A tier description.

Constructors

Tier 

Fields

withPos :: Bool

Does it include the part of speech?

withAtts :: Set Attr

Tier grammatical attributes.

Instances

data Atom Source

An atomic part of morphosyntactic tag with optional POS.

Constructors

Atom 

Fields

pos :: Maybe POS
 
atts :: Map Attr Text
 

Instances

Disambiguation

disamb :: Word w => Disamb -> Sent w Tag -> [Tag]Source

Perform context-sensitive disambiguation.

include :: (Sent w Tag -> [Tag]) -> Sent w Tag -> Sent w TagSource

Insert disambiguation results into the sentence.

disambSent :: Word w => Disamb -> Sent w Tag -> Sent w TagSource

Combine disamb with include.

Training

data TrainConf Source

Training configuration.

trainSource

Arguments

:: Word w 
=> TrainConf

Training configuration

-> IO [Sent w Tag]

Training data

-> IO [Sent w Tag]

Evaluation data

-> IO Disamb

Resultant model

Train disamb model.