diff options
| author | bringert <bringert@cs.chalmers.se> | 2007-03-20 22:09:17 +0000 |
|---|---|---|
| committer | bringert <bringert@cs.chalmers.se> | 2007-03-20 22:09:17 +0000 |
| commit | 7ae2e0167889e6fde45fcd175d3dfab0029f973a (patch) | |
| tree | 6dca582ff723888669f7401139e06342330c8e08 /src/GF | |
| parent | 00e681aee886c3b12acbaf07068571238a955ed2 (diff) | |
Remove removeIdenticalRules, since it would get rid of alternative parse results.
Diffstat (limited to 'src/GF')
| -rw-r--r-- | src/GF/Speech/CFGToFiniteState.hs | 1 | ||||
| -rw-r--r-- | src/GF/Speech/SRG.hs | 1 | ||||
| -rw-r--r-- | src/GF/Speech/TransformCFG.hs | 8 |
3 files changed, 0 insertions, 10 deletions
diff --git a/src/GF/Speech/CFGToFiniteState.hs b/src/GF/Speech/CFGToFiniteState.hs index d9f8c31fa..6f93da40e 100644 --- a/src/GF/Speech/CFGToFiniteState.hs +++ b/src/GF/Speech/CFGToFiniteState.hs @@ -66,7 +66,6 @@ makeSimpleRegular :: Options -> StateGrammar -> CFRules makeSimpleRegular opts s = makeRegular $ preprocess $ cfgToCFRules s where start = getStartCatCF opts s preprocess = fix (topDownFilter start . bottomUpFilter) - . removeIdenticalRules . removeCycles -- diff --git a/src/GF/Speech/SRG.hs b/src/GF/Speech/SRG.hs index edd02a21b..995eb3b2e 100644 --- a/src/GF/Speech/SRG.hs +++ b/src/GF/Speech/SRG.hs @@ -97,7 +97,6 @@ makeSimpleSRG opt s = (cats,cfgRules) = unzip $ preprocess $ cfgToCFRules s preprocess = removeLeftRecursion origStart . fix (topDownFilter origStart . bottomUpFilter) - . removeIdenticalRules . removeCycles names = mkCatNames name cats rs = map (cfgRulesToSRGRule names probs) cfgRules diff --git a/src/GF/Speech/TransformCFG.hs b/src/GF/Speech/TransformCFG.hs index 1439cc09d..232239b20 100644 --- a/src/GF/Speech/TransformCFG.hs +++ b/src/GF/Speech/TransformCFG.hs @@ -112,14 +112,6 @@ topDownFilter start rules = filter ((`Set.member` keep) . fst) rules uses = reflexiveClosure_ (allCats rules) $ transitiveClosure $ mkRel rhsCats keep = allRelated uses start --- | Remove rules which have the same rhs. --- FIXME: this messes up probabilities, names and profiles -removeIdenticalRules :: CFRules -> CFRules -removeIdenticalRules g = [(c,sortNubBy cmpRules rs) | (c,rs) <- g] - where - cmpRules (CFRule c1 ss1 _) (CFRule c2 ss2 _) = - mconcat [c1 `compare` c2, ss1 `compare` ss2] - -- * Removing left recursion -- The LC_LR algorithm from |
