summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbringert <bringert@cs.chalmers.se>2007-03-20 21:15:59 +0000
committerbringert <bringert@cs.chalmers.se>2007-03-20 21:15:59 +0000
commita8d356d59913f0ac32b1066fadca0fb674d79385 (patch)
treed5e868911cab2086694c304068f00f6515ed4a52
parentfbe8282027629e93df2121523074f85ed048d1bb (diff)
Renamed removeEmptyCats to bottomUpFilter.
-rw-r--r--src/GF/Speech/CFGToFiniteState.hs2
-rw-r--r--src/GF/Speech/SRG.hs2
-rw-r--r--src/GF/Speech/TransformCFG.hs4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/GF/Speech/CFGToFiniteState.hs b/src/GF/Speech/CFGToFiniteState.hs
index e1ee48610..872de48d0 100644
--- a/src/GF/Speech/CFGToFiniteState.hs
+++ b/src/GF/Speech/CFGToFiniteState.hs
@@ -63,7 +63,7 @@ cfgToFA opts s = minimize $ compileAutomaton start $ makeSimpleRegular s
where start = getStartCatCF opts s
makeSimpleRegular :: StateGrammar -> CFRules
-makeSimpleRegular = makeRegular . removeIdenticalRules . removeEmptyCats . cfgToCFRules
+makeSimpleRegular = makeRegular . removeIdenticalRules . bottomUpFilter . cfgToCFRules
--
-- * Approximate context-free grammars with regular grammars.
diff --git a/src/GF/Speech/SRG.hs b/src/GF/Speech/SRG.hs
index 0b964e468..9dbfe4606 100644
--- a/src/GF/Speech/SRG.hs
+++ b/src/GF/Speech/SRG.hs
@@ -96,7 +96,7 @@ makeSimpleSRG opt s =
l = fmap (replace '_' '-') $ getOptVal opts speechLanguage
(cats,cfgRules) = unzip $ preprocess $ cfgToCFRules s
preprocess = removeLeftRecursion origStart
- . removeEmptyCats
+ . bottomUpFilter
. topDownFilter origStart
. removeIdenticalRules
. removeCycles
diff --git a/src/GF/Speech/TransformCFG.hs b/src/GF/Speech/TransformCFG.hs
index eb63ad57a..689125ef3 100644
--- a/src/GF/Speech/TransformCFG.hs
+++ b/src/GF/Speech/TransformCFG.hs
@@ -87,8 +87,8 @@ stateGFCC :: StateGrammar -> GFCC
stateGFCC = mkGFCC . mkCanon2gfcc . stateGrammarST
-- | Remove productions which use categories which have no productions
-removeEmptyCats :: CFRules -> CFRules
-removeEmptyCats = fix removeEmptyCats'
+bottomUpFilter :: CFRules -> CFRules
+bottomUpFilter = fix removeEmptyCats'
where
removeEmptyCats' :: CFRules -> CFRules
removeEmptyCats' rs = k'