Safe Haskell | None |
---|---|
Language | Haskell98 |
- data Concraft :: *
- saveModel :: FilePath -> Concraft -> IO ()
- loadModel :: FilePath -> IO Concraft
- tag :: Concraft -> Sent Word Tag -> [(Set Tag, Tag)]
- marginals :: Concraft -> Sent Word Tag -> Sent Word Tag
- data TrainConf = TrainConf {}
- train :: TrainConf -> IO [Sent Word Tag] -> IO [Sent Word Tag] -> IO Concraft
- prune :: Double -> Concraft -> Concraft
Model
saveModel :: FilePath -> Concraft -> IO ()
Save model in a file. Data is compressed using the gzip format.
Tagging
tag :: Concraft -> Sent Word Tag -> [(Set Tag, Tag)] Source
Tag the analysed sentence. it is expected that
the result of the tagging is a list of tuples (a,b)
the
set of possible tags (which were guessed by the guessing model or
as a result of analysis from the Analyzer
) a
, and the disambiguated
tag b
.
marginals :: Concraft -> Sent Word Tag -> Sent Word Tag Source
Tag the sentence with marginal probabilities. The resulting sentence contains the probabilites of each tag given in the set.
Training
Training configuration.
TrainConf | |
|
:: TrainConf | Training configuration |
-> IO [Sent Word Tag] | Training data |
-> IO [Sent Word Tag] | Evaluation data |
-> IO Concraft | Trained model |
Begins the training of the model, if evaluation data is supplied, the periodic report will contain an optimistic accuracy of the model. Optimistic in the sense of taking the given correct tag and set of possible tags as the complete results of the analysis. It is possible that the morphosyntactic analyzer used to provide the set of possible tags doesn't include the correct tag in the set. Hence, the optimistic accuracy report.