diff options
| author | bjorn <bjorn@bringert.net> | 2008-09-30 11:52:11 +0000 |
|---|---|---|
| committer | bjorn <bjorn@bringert.net> | 2008-09-30 11:52:11 +0000 |
| commit | 446aa1b5db35402dbdd0821eec4ea1bbbed7d0f9 (patch) | |
| tree | c54c17659508ce9252f54622b1ac8878aef0bb77 /src/GF/Speech/CFG.hs | |
| parent | 794fbd4a416ef53d289545eb83455ee745115fec (diff) | |
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".
Diffstat (limited to 'src/GF/Speech/CFG.hs')
| -rw-r--r-- | src/GF/Speech/CFG.hs | 4 |
1 files changed, 4 insertions, 0 deletions
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 -- |
