diff options
| author | bringert <unknown> | 2005-09-14 14:17:29 +0000 |
|---|---|---|
| committer | bringert <unknown> | 2005-09-14 14:17:29 +0000 |
| commit | a8bc5590afe8951cb473854a6b701464f11db2d7 (patch) | |
| tree | aec845ad4a93fe6264ea7d9aa72930e5fb03bd45 /src/GF/Speech/PrSLF.hs | |
| parent | 16f2bf8cd6b0a5925988fc91e18f3af5246dfc98 (diff) | |
Added Graphviz module for graphviz stuff. Move a lot of utility functions to GF.Data.Utilities.
Diffstat (limited to 'src/GF/Speech/PrSLF.hs')
| -rw-r--r-- | src/GF/Speech/PrSLF.hs | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/GF/Speech/PrSLF.hs b/src/GF/Speech/PrSLF.hs index 720e66c56..fac25ed77 100644 --- a/src/GF/Speech/PrSLF.hs +++ b/src/GF/Speech/PrSLF.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/09/13 08:20:20 $ +-- > CVS $Date: 2005/09/14 15:17:30 $ -- > CVS $Author: bringert $ --- > CVS $Revision: 1.8 $ +-- > CVS $Revision: 1.9 $ -- -- This module converts a CFG to an SLF finite-state network -- for use with the ATK recognizer. The SLF format is described @@ -21,17 +21,17 @@ module GF.Speech.PrSLF (slfPrinter,slfGraphvizPrinter, faGraphvizPrinter,regularPrinter) where -import GF.Speech.SRG -import GF.Speech.TransformCFG -import GF.Speech.CFGToFiniteState -import GF.Speech.FiniteState -import GF.Infra.Ident - +import GF.Data.Utilities +import GF.Conversion.Types import GF.Formalism.CFG import GF.Formalism.Utilities (Symbol(..),symbol) -import GF.Conversion.Types -import GF.Infra.Print +import GF.Infra.Ident import GF.Infra.Option +import GF.Infra.Print +import GF.Speech.CFGToFiniteState +import GF.Speech.FiniteState +import GF.Speech.SRG +import GF.Speech.TransformCFG import Data.Char (toUpper,toLower) import Data.List @@ -54,12 +54,13 @@ slfPrinter name opts cfg = prSLF (automatonToSLF $ moveLabelsToNodes $ cfgToFA n slfGraphvizPrinter :: Ident -- ^ Grammar name -> Options -> CGrammar -> String slfGraphvizPrinter name opts cfg = - prGraphGraphviz (mapStates (fromMaybe "") $ mapTransitions (const "") $ moveLabelsToNodes $ cfgToFA name opts cfg) + prFAGraphviz (mapStates (fromMaybe "") $ mapTransitions (const "") $ moveLabelsToNodes $ cfgToFA name opts cfg) faGraphvizPrinter :: Ident -- ^ Grammar name -> Options -> CGrammar -> String faGraphvizPrinter name opts cfg = - prGraphGraphviz (mapStates (const "") $ mapTransitions (fromMaybe "") $ cfgToFA name opts cfg) + prFAGraphviz (mapStates (const "") $ mapTransitions (fromMaybe "") $ cfgToFA name opts cfg) + -- | Convert the grammar to a regular grammar and print it in BNF regularPrinter :: CGrammar -> String |
