semiring-0.2: Semirings, ring-like structures used for dynamic programming applicationsSource codeContentsIndex
NLP.Semiring.ViterbiNBestDerivation
Synopsis
type ViterbiNBestDerivation n m = ViterbiNBest n (Weighted Prob (Derivation m))
type ViterbiDerivation m = Viterbi (Weighted Prob (Derivation m))
getBestDerivation :: Monoid m => ViterbiDerivation m -> m
getBestScore :: Monoid m => ViterbiDerivation m -> Prob
Documentation
type ViterbiNBestDerivation n m = ViterbiNBest n (Weighted Prob (Derivation m))Source

The ViterbiNBestDerivation is an example of a more complicated semiring built up from smaller components. It keeps track of the top N scoring paths along with their derivations.

 type ViterbiNBestDerivation n m = ViterbiNBest n (Weighted Prob (Derivation m))
type ViterbiDerivation m = Viterbi (Weighted Prob (Derivation m))Source

The ViterbiDerivation is a simpler semiring. It just keeps track of the best scoring path and it's derivation.

 type ViterbiDerivation m  = Viterbi (Weighted Prob (Derivation m))
getBestDerivation :: Monoid m => ViterbiDerivation m -> mSource
getBestScore :: Monoid m => ViterbiDerivation m -> ProbSource
Produced by Haddock version 2.4.2