concraft-pl-0.6.0: Morphological tagger for Polish

Safe HaskellNone

NLP.Concraft.Polish

Contents

Synopsis

Model

data Concraft

Concraft data.

Instances

Binary Concraft 

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

data TrainConf Source

Constructors

TrainConf 

Fields

tagset :: Tagset

Tagset.

sgdArgs :: SgdArgs

SGD parameters.

reana :: Bool

Perform reanalysis.

onDisk :: Bool

Store SGD dataset on disk.

guessNum :: Int

Numer of guessed tags for each word.

prune :: Maybe Double

Disamb model pruning parameter.

r0 :: R0T

r0T parameter.

trainSource

Arguments

:: TrainConf 
-> IO [SentO Tag]

Training data

-> IO [SentO Tag]

Evaluation data

-> IO Concraft 

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