fst-0.10.0.0: Finite state transducers

Safe HaskellSafe-Inferred

FST.Transducer

Contents

Description

Transducers and their functions

Synopsis

Documentation

Types

data Transducer a Source

Data type for a transducer

class TConvertable f whereSource

Type class TConvertable

Methods

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

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

Instances

Transducer construction

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

Construct a transducer

Actions on transducers

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

Convert transducer labelled with something other than states to a Transducer

initial :: Transducer a -> StateTySource

Initial state

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

Get transition as a list of states

nullFirstState :: Transducer a -> Transducer aSource

Set first state to null

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

Product of two transducers

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

Union of two transducers

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

Kleene star of two transducers

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

Compose two transducers

showTransducer :: Show a => Transducer a -> StringSource

Show a transducer