semiring-0.1.1: Semirings, ring-like structures used for dynamic programming applicationsSource codeContentsIndex
NLP.Semiring.Derivation
Synopsis
newtype Derivation m = Derivation (Maybe m)
newtype MultiDerivation m = MultiDerivation (Set m)
Documentation
newtype Derivation m Source

The Derivation semiring keeps track of a single path or derivation that led to the known output. If there are more than one path it discards in favor the lesser path (based on ord). The main purpose of this semiring is to track derivations for ViterbiNBestDerivation. If you want to keep all paths, use MultiDerivation.

Derivation takes a Monoid as an argument that describes how to build up paths or more complicated structures.

Constructors
Derivation (Maybe m)
show/hide Instances
newtype MultiDerivation m Source

The MultiDerivation semiring keeps track of a all paths or derivations that led to the known output. This can be useful for debugging output.

Keeping all these paths around can be expensive. MultiDerivation leaves open the implementation of the internal path monoid for more compact representations.

Constructors
MultiDerivation (Set m)
show/hide Instances
Produced by Haddock version 2.4.2