fst-0.10.0.1: Finite state transducers

Safe HaskellSafe-Inferred
LanguageHaskell98

FST.Transducer

Contents

Description

Transducers and their functions

Synopsis

Documentation

Types

data Transducer a Source

Data type for a transducer

class TConvertable f where Source

Type class TConvertable

Methods

encode :: Eq a => f a -> Transducer a Source

decode :: Eq a => Transducer a -> f a Source

Instances

Transducer construction

construct :: (StateTy, StateTy) -> TTransitionTable a -> Sigma a -> InitialStates -> FinalStates -> Transducer a Source

Construct a transducer

Actions on transducers

rename :: Eq b => [(b, [(Relation a, b)])] -> Sigma a -> [b] -> [b] -> StateTy -> Transducer a Source

Convert transducer labelled with something other than states to a Transducer

initial :: Transducer a -> StateTy Source

Initial state

transitions :: Eq a => Transducer a -> (StateTy, Relation a) -> [StateTy] Source

Get transition as a list of states

nullFirstState :: Transducer a -> Transducer a Source

Set first state to null

productT :: Eq a => Transducer a -> Transducer a -> Transducer a Source

Product of two transducers

unionT :: Eq a => Transducer a -> Transducer a -> Transducer a Source

Union of two transducers

starT :: Eq a => Transducer a -> Transducer a Source

Kleene star of two transducers

compositionT :: Eq a => Transducer a -> Transducer a -> Transducer a Source

Compose two transducers

showTransducer :: Show a => Transducer a -> String Source

Show a transducer