Safe Haskell | Safe |
---|---|

Language | Haskell98 |

# Documentation

A Word is represented by a set of observations and a set of potential interpretation labels. When the set of potential labels is empty the word is considered to be unknown and the default potential set is used in its place.

unknown :: Word a b -> Bool Source #

The word is considered to be unknown when the set of potential labels is empty.

A probability distribution defined over elements of type a. All elements not included in the map have probability equal to 0.

mkProb :: Ord a => [(a, Double)] -> Prob a Source #

Construct the probability distribution.

Normalization is not performed because, when working with DAGs, the probability of a specific DAG edge can be lower than 1 (in particular, it can be 0).

Elements with probability 0 cab be filtered out since information that a
given label is a potential interpretation of the given word/edge is preserved
at the level of the `Word`