Safe Haskell | None |
---|
- type Codec a b c = (AtomCodec a, AtomCodec (Maybe b), AtomCodec (Maybe c))
- type CodecM a b c d = Codec (Codec a b c) d
- obMax :: Codec a b c -> Ob
- lb1Max :: Codec a b c -> Lb1
- lb2Max :: Codec a b c -> Lb2
- encodeWord'Cu :: (Ord a, Ord b, Ord c) => Word a (b, c) -> CodecM a b c (X Ob Lb)
- encodeWord'Cn :: (Ord a, Ord b, Ord c) => Word a (b, c) -> CodecM a b c (X Ob Lb)
- encodeSent'Cu :: (Ord a, Ord b, Ord c) => Sent a (b, c) -> CodecM a b c (Xs Ob Lb)
- encodeSent'Cn :: (Ord a, Ord b, Ord c) => Sent a (b, c) -> CodecM a b c (Xs Ob Lb)
- encodeSent :: (Ord a, Ord b, Ord c) => Codec a b c -> Sent a (b, c) -> Xs Ob Lb
- encodeWordL'Cu :: (Ord a, Ord b, Ord c) => WordL a (b, c) -> CodecM a b c (X Ob Lb, Y Lb)
- encodeWordL'Cn :: (Ord a, Ord b, Ord c) => WordL a (b, c) -> CodecM a b c (X Ob Lb, Y Lb)
- encodeSentL'Cu :: (Ord a, Ord b, Ord c) => SentL a (b, c) -> CodecM a b c (Xs Ob Lb, Ys Lb)
- encodeSentL'Cn :: (Ord a, Ord b, Ord c) => SentL a (b, c) -> CodecM a b c (Xs Ob Lb, Ys Lb)
- encodeSentL :: (Ord a, Ord b, Ord c) => Codec a b c -> SentL a (b, c) -> (Xs Ob Lb, Ys Lb)
- decodeLabel :: (Ord b, Ord c) => Codec a b c -> Lb -> Maybe (b, c)
- decodeLabels :: (Ord b, Ord c) => Codec a b c -> [Lb] -> [Maybe (b, c)]
- unJust :: (Ord b, Ord c) => Codec a b c -> Word a (b, c) -> Maybe (b, c) -> (b, c)
- mkCodec :: (Ord a, Ord b, Ord c) => [SentL a (b, c)] -> (Codec a b c, [(Xs Ob Lb, Ys Lb)])
- encodeData :: (Ord a, Ord b, Ord c) => Codec a b c -> [Sent a (b, c)] -> [Xs Ob Lb]
- encodeDataL :: (Ord a, Ord b, Ord c) => Codec a b c -> [SentL a (b, c)] -> [(Xs Ob Lb, Ys Lb)]
Documentation
type Codec a b c = (AtomCodec a, AtomCodec (Maybe b), AtomCodec (Maybe c))Source
A codec. The first component is used to encode observations of type a, the second one is used to encode labels of type b, third -- labels of type c from the third level.
type CodecM a b c d = Codec (Codec a b c) dSource
Type synonym for the codec monad. It is important to notice that by a
codec we denote here a structure of three AtomCodec
s while in the
monad-codec package it denotes a monad.
encodeWord'Cu :: (Ord a, Ord b, Ord c) => Word a (b, c) -> CodecM a b c (X Ob Lb)Source
Encode the word and update the codec.
encodeWord'Cn :: (Ord a, Ord b, Ord c) => Word a (b, c) -> CodecM a b c (X Ob Lb)Source
Encode the word and do *not* update the codec.
encodeSent'Cu :: (Ord a, Ord b, Ord c) => Sent a (b, c) -> CodecM a b c (Xs Ob Lb)Source
Encode the sentence and update the codec.
encodeSent'Cn :: (Ord a, Ord b, Ord c) => Sent a (b, c) -> CodecM a b c (Xs Ob Lb)Source
Encode the sentence and do *not* update the codec.
encodeSent :: (Ord a, Ord b, Ord c) => Codec a b c -> Sent a (b, c) -> Xs Ob LbSource
Encode the sentence using the given codec.
encodeWordL'Cu :: (Ord a, Ord b, Ord c) => WordL a (b, c) -> CodecM a b c (X Ob Lb, Y Lb)Source
Encode the labeled word and update the codec.
encodeWordL'Cn :: (Ord a, Ord b, Ord c) => WordL a (b, c) -> CodecM a b c (X Ob Lb, Y Lb)Source
Encodec the labeled word and do *not* update the codec.
encodeSentL'Cu :: (Ord a, Ord b, Ord c) => SentL a (b, c) -> CodecM a b c (Xs Ob Lb, Ys Lb)Source
Encode the labeled sentence and update the codec.
encodeSentL'Cn :: (Ord a, Ord b, Ord c) => SentL a (b, c) -> CodecM a b c (Xs Ob Lb, Ys Lb)Source
Encode the labeled sentence and do *not* update the codec. Substitute the default label for any label not present in the codec.
encodeSentL :: (Ord a, Ord b, Ord c) => Codec a b c -> SentL a (b, c) -> (Xs Ob Lb, Ys Lb)Source
Encode the labeled sentence with the given codec. Substitute the default label for any label not present in the codec.
decodeLabels :: (Ord b, Ord c) => Codec a b c -> [Lb] -> [Maybe (b, c)]Source
Decode the sequence of labels.
mkCodec :: (Ord a, Ord b, Ord c) => [SentL a (b, c)] -> (Codec a b c, [(Xs Ob Lb, Ys Lb)])Source
Create the codec on the basis of the labeled dataset, return the resultant codec and the encoded dataset.