concraft-0.6.0: Morphological disambiguation based on constrained CRFs

Safe HaskellNone

NLP.Concraft

Contents

Synopsis

Model

data Concraft Source

Concraft data.

Constructors

Concraft 

Instances

saveModel :: FilePath -> Concraft -> IO ()Source

Save model in a file. Data is compressed using the gzip format.

loadModel :: FilePath -> IO ConcraftSource

Load model from a file.

Tagging

tag :: Word w => Concraft -> Sent w Tag -> [Tag]Source

Tag sentence using the model. In your code you should probably use your analysis function, translate results into a container of Sentences, evaluate tagSent on each sentence and embed the tagging results into morphosyntactic structure of your own.

Training

trainSource

Arguments

:: (Word w, FromJSON w, ToJSON w) 
=> Tagset

Tagset

-> Analyse w Tag

Analysis function

-> Int

Numer of guessed tags for each word

-> TrainConf

Guessing model training configuration

-> TrainConf

Disambiguation model training configuration

-> [SentO w Tag]

Training data

-> [SentO w Tag]

Evaluation data

-> IO Concraft 

Train guessing and disambiguation models.