concraft-pl-0.1.0: Morphological tagger for Polish

Safe HaskellNone

NLP.Concraft.Polish

Contents

Synopsis

Model

data Concraft

Concraft data.

Instances

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

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

loadModel :: FilePath -> IO Concraft

Load model from a file.

Tagging

tag :: MacaPool -> Concraft -> Text -> IO [Sent Tag]Source

Perform morphological tagging on the input text.

tag' :: MacaPool -> Concraft -> Text -> IO [[Sent Tag]]Source

An alernative tagging function which interprets empty lines as paragraph ending markers. The function uses lazy IO so it can be used to analyse large chunks of data.

tagSent :: Concraft -> Sent Tag -> Sent TagSource

Tag an already analysed sentence.

Training

trainSource

Arguments

:: SgdArgs

SGD parameters

-> Tagset

Tagset

-> Int

Numer of guessed tags for each word

-> [SentO Tag]

Training data

-> Maybe [SentO Tag]

Maybe evaluation data

-> IO Concraft 

Train concraft model. TODO: It should be possible to supply the two training procedures with different SGD arguments.