| Copyright | (c) 2018-20202022-2023 Dakotah Lambert | 
|---|---|
| License | MIT | 
| Safe Haskell | Safe-Inferred | 
| Language | Haskell2010 | 
LTK.Porters
Contents
Description
This module provides methods to convert automata to and from various formats.
Synopsis
- from :: Importable i => Type i -> String -> FSA Integer String
 - fromE :: Importable i => Type i -> String -> Either String (FSA Integer String)
 - to :: (Ord n, Ord e, Show n, Show e, Exportable x) => Type x -> FSA n e -> String
 - type Type t = t -> t
 - newtype Dot = Dot Dot
 - newtype EggBox = EggBox EggBox
 - newtype SyntacticOrder = SyntacticOrder SyntacticOrder
 - newtype Jeff = Jeff Jeff
 - newtype Pleb = Pleb Pleb
 - newtype ATT = ATT ATT
 - newtype ATTO = ATTO ATTO
 - newtype Corpus = Corpus Corpus
 - formatSet :: Show n => Set n -> String
 - transliterate :: Ord n => FSA n String -> FSA n String
 - transliterateString :: String -> String
 - untransliterate :: Ord n => FSA n String -> FSA n String
 - untransliterateString :: String -> String
 - class Importable t where
 - class Exportable t where
 
Conversions
In the following definitions,
 (Type t) is shorthand for (String -> t).
Formats
We use types to create a bit of magic in order to read and write automata in various formats.
The GraphViz Dot format.
The egg-box in GraphViz Dot format.
newtype SyntacticOrder Source #
A Hasse diagram of the syntactic order.
Since: 1.1
Constructors
| SyntacticOrder SyntacticOrder | 
Instances
| Exportable SyntacticOrder Source # | |
Defined in LTK.Porters  | |
Jeff's format.
The format defined by the (P)iecewise / (L)ocal (E)xpression (B)uilder.
The AT&T finite-state transducer format, input projection
Since: 0.3
The AT&T finite-state transducer format, output projection
Since: 0.3
A corpus of strings
Since: 0.3
Miscellaneous
transliterate :: Ord n => FSA n String -> FSA n String Source #
Automata in Jeff's format use edge labels of the form “w0.s1”. This function converts the edge labels of an automaton from this form to the “L`” form that we tend to use.
transliterateString :: String -> String Source #
See transliterate.  This function operates directly on the
 representation of the edge label.
untransliterate :: Ord n => FSA n String -> FSA n String Source #
The inverse of transliterate.
untransliterateString :: String -> String Source #
The inverse of transliterateString.
class Importable t where Source #
A type that can be read and turned into an FSA.
Instances
class Exportable t where Source #
A type that can be written from an FSA.