summaryrefslogtreecommitdiff
path: root/src/GF/Speech/PrSLF.hs
diff options
context:
space:
mode:
authorbringert <unknown>2005-11-10 15:43:44 +0000
committerbringert <unknown>2005-11-10 15:43:44 +0000
commit136728e336d66349723f882fcd87a2eb8d42903c (patch)
tree8e01d0e190f6be0585ffcd1f945e651a0c481a4b /src/GF/Speech/PrSLF.hs
parent5ae8cdc3d08fb1aae74e6da5c647c6c76cb46d15 (diff)
Prepared for generation of finite automata in C.
Diffstat (limited to 'src/GF/Speech/PrSLF.hs')
-rw-r--r--src/GF/Speech/PrSLF.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/GF/Speech/PrSLF.hs b/src/GF/Speech/PrSLF.hs
index 7a328dd1d..bd6eba5bb 100644
--- a/src/GF/Speech/PrSLF.hs
+++ b/src/GF/Speech/PrSLF.hs
@@ -5,9 +5,9 @@
-- Stability : (stable)
-- Portability : (portable)
--
--- > CVS $Date: 2005/11/10 14:19:33 $
+-- > CVS $Date: 2005/11/10 16:43:44 $
-- > CVS $Author: bringert $
--- > CVS $Revision: 1.11 $
+-- > CVS $Revision: 1.12 $
--
-- This module converts a CFG to an SLF finite-state network
-- for use with the ATK recognizer. The SLF format is described
@@ -48,12 +48,12 @@ data SLFEdge = SLFEdge { eId :: Int, eStart :: Int, eEnd :: Int }
slfPrinter :: Ident -- ^ Grammar name
-> Options -> CGrammar -> String
-slfPrinter name opts cfg = prSLF (automatonToSLF $ moveLabelsToNodes $ cfgToFA name opts cfg) ""
+slfPrinter name opts cfg = prSLF (automatonToSLF $ moveLabelsToNodes $ dfa2nfa $ cfgToFA name opts cfg) ""
slfGraphvizPrinter :: Ident -- ^ Grammar name
-> Options -> CGrammar -> String
slfGraphvizPrinter name opts cfg =
- prFAGraphviz (mapStates (fromMaybe "") $ mapTransitions (const "") $ moveLabelsToNodes $ cfgToFA name opts cfg)
+ prFAGraphviz $ mapStates (fromMaybe "") $ mapTransitions (const "") $ moveLabelsToNodes $ dfa2nfa $ cfgToFA name opts cfg
automatonToSLF :: FA State (Maybe String) () -> SLF
automatonToSLF fa =