Safe Haskell | None |
---|
- data ModelData
- type Trace = [(Double, Double, Double)]
- data Feature
- data Config
- type Token = [Text]
- type Label = Text
- type Sentence = [Token]
- train :: Flags -> Feature -> [(Sentence, [Label])] -> [(Sentence, [Label])] -> (ModelData, Trace)
- predict :: ModelData -> [[Token]] -> [[Label]]
- parseTemplate :: Text -> Feature
- defaultFlags :: Flags
Documentation
train :: Flags -> Feature -> [(Sentence, [Label])] -> [(Sentence, [Label])] -> (ModelData, Trace)Source
train flags template training development
trains a model on training
sentences using give flags and feature template and returns the model and a
for each iteration the error rate on training and development sentences.
predict :: ModelData -> [[Token]] -> [[Label]]Source
predict model sentence
returns the best label sequence for
sentence. A sentence is a sequence of Token
s.
parseTemplate :: Text -> FeatureSource
parseTemplete s
parses feature template in s and returns the
result.