Safe Haskell | None |
---|
Internal core data types.
- newtype Ob = Ob {}
- mkOb :: Int -> Ob
- unOb :: Ob -> Int
- newtype Lb = Lb {}
- mkLb :: Int -> Lb
- unLb :: Lb -> Int
- newtype FeatIx = FeatIx {}
- mkFeatIx :: Int -> FeatIx
- unFeatIx :: FeatIx -> Int
- type CbIx = Int
- newtype Cb = Cb {}
- mkCb :: [Lb] -> Cb
- unCb :: Cb -> [Lb]
- data X
- type Xs = Vector X
- mkX :: [Ob] -> [Cb] -> X
- unX :: X -> [Ob]
- unR :: X -> [Cb]
- data Y
- type Ys = Vector Y
- mkY :: [(Cb, Double)] -> Y
- unY :: Y -> [(Cb, LogFloat)]
- lbAt :: X -> CbIx -> Cb
- lbOn :: Xs -> Int -> CbIx -> Maybe Cb
- lbNum :: Xs -> Int -> Int
- lbIxs :: Xs -> Int -> [CbIx]
Basic types
An observation.
An atomic label.
A feature index. To every model feature a unique index is assigned.
Complex label
A complex label is a vector of atomic labels.
Input element (word)
A word is represented by a list of its observations and a list of its potential label interpretations.
Output element (choice)
Vector of chosen labels together with corresponding probabilities in log domain.
Indexing
lbOn :: Xs -> Int -> CbIx -> Maybe CbSource
Potential label at the given position and at the given index. Return Nothing for positions outside the domain.