crf-chain2-tiers-0.2.2: Second-order, tiered, constrained, linear conditional random fields

Safe HaskellNone

Data.CRF.Chain2.Tiers.Inference

Synopsis

Documentation

tag :: Model -> Xs -> [Cb]Source

Find the most probable label sequence satisfying the constraints imposed over label values.

marginals :: Model -> Xs -> [[LogFloat]]Source

Tag potential labels with marginal probabilities.

expectedFeatures :: Model -> Xs -> [(Feat, LogFloat)]Source

A list of features (represented by feature indices) defined within the context of the sentence accompanied by expected probabilities determined on the basis of the model.

One feature can occur multiple times in the output list.

accuracy :: Model -> [(Xs, Ys)] -> DoubleSource

Compute the accuracy of the model with respect to the labeled dataset.

zx :: Model -> Xs -> LogFloatSource

Normalization factor computed for the Xs sentence using the backward computation.

zx' :: Model -> Xs -> LogFloatSource

Normalization factor computed for the Xs sentence using the forward computation.