From 446aa1b5db35402dbdd0821eec4ea1bbbed7d0f9 Mon Sep 17 00:00:00 2001 From: bjorn Date: Tue, 30 Sep 2008 11:52:11 +0000 Subject: Added --cfg option for specifying which CFG transformations to use. Added startcatonly CFG trasnformation. Removed output formats that are now easily done with --cfg: "regular", "nolr". --- src/GF/Speech/CFG.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/GF/Speech/CFG.hs') diff --git a/src/GF/Speech/CFG.hs b/src/GF/Speech/CFG.hs index 3e4db14d4..52db2827a 100644 --- a/src/GF/Speech/CFG.hs +++ b/src/GF/Speech/CFG.hs @@ -101,6 +101,10 @@ mergeIdentical g = onRules (map subst) g subst (CFRule c r n) = CFRule (substCat c) (map (mapSymbol substCat id) r) n substCat c = Map.findWithDefault (error $ "mergeIdentical: " ++ c) c m +-- | Keeps only the start category as an external category. +purgeExternalCats :: CFG -> CFG +purgeExternalCats cfg = cfg { cfgExternalCats = Set.singleton (cfgStartCat cfg) } + -- -- * Removing left recursion -- -- cgit v1.2.3