| Safe Haskell | None |
|---|
NLP.Concraft
- data Concraft = Concraft {}
- saveModel :: FilePath -> Concraft -> IO ()
- loadModel :: FilePath -> IO Concraft
- tag :: Word w => Concraft -> Sent w Tag -> [Tag]
- train :: (Word w, FromJSON w, ToJSON w) => Tagset -> Analyse w Tag -> Int -> TrainConf -> TrainConf -> [SentO w Tag] -> [SentO w Tag] -> IO Concraft
Model
Concraft data.
saveModel :: FilePath -> Concraft -> IO ()Source
Save model in a file. Data is compressed using the gzip format.
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
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.