diff options
| author | bringert <unknown> | 2005-06-17 11:46:04 +0000 |
|---|---|---|
| committer | bringert <unknown> | 2005-06-17 11:46:04 +0000 |
| commit | 05b5ffe5bf03a870f6fe0728ace6c0d8de69b89e (patch) | |
| tree | 18298275e8397f200013b6aec8ee38bbd93e32b1 /src/GF/Speech/SRG.hs | |
| parent | 30e3a8fd991c7bad3d21b03749d6a8a0e7a7f8e5 (diff) | |
Added beginnings of ATK SLF generation.
Diffstat (limited to 'src/GF/Speech/SRG.hs')
| -rw-r--r-- | src/GF/Speech/SRG.hs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/GF/Speech/SRG.hs b/src/GF/Speech/SRG.hs index d59a391a1..2594e0a3e 100644 --- a/src/GF/Speech/SRG.hs +++ b/src/GF/Speech/SRG.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/21 16:23:32 $ +-- > CVS $Date: 2005/06/17 12:46:05 $ -- > CVS $Author: bringert $ --- > CVS $Revision: 1.13 $ +-- > CVS $Revision: 1.14 $ -- -- Representation of, conversion to, and utilities for -- printing of a general Speech Recognition Grammar. @@ -53,7 +53,7 @@ type CatNames = FiniteMap String String makeSRG :: Ident -- ^ Grammar name -> Options -- ^ Grammar options - -> CGrammar -- ^ A context-free grammar + -> [CFRule_] -- ^ A context-free grammar -> SRG makeSRG i opts gr = SRG { grammarName = name, startCat = start, @@ -63,9 +63,8 @@ makeSRG i opts gr = SRG { grammarName = name, name = prIdent i origStart = fromMaybe "S" (getOptVal opts gStartCat) ++ "{}.s" start = lookupFM_ names origStart - gr' = makeNice gr - names = mkCatNames name (nub $ map ruleCat gr') - rs = map (cfgRulesToSRGRule names) (sortAndGroupBy ruleCat gr') + names = mkCatNames name (nub $ map ruleCat gr) + rs = map (cfgRulesToSRGRule names) (sortAndGroupBy ruleCat gr) cfgRulesToSRGRule :: FiniteMap String String -> [CFRule_] -> SRGRule cfgRulesToSRGRule names rs@(r:_) = SRGRule cat origCat rhs |
