diff options
| author | bringert <bringert@cs.chalmers.se> | 2007-01-29 12:30:49 +0000 |
|---|---|---|
| committer | bringert <bringert@cs.chalmers.se> | 2007-01-29 12:30:49 +0000 |
| commit | a24166ac25568fe4dab0cc045a37fef945d2aa84 (patch) | |
| tree | 346b791c2e508e6672d3a0a18042485f4eaec6e7 /src/GF | |
| parent | 32d94e908c403d6bb0e9e57cd265a8b39d323a59 (diff) | |
Handle coercion functions (_) in CFG generation for SRG.
Diffstat (limited to 'src/GF')
| -rw-r--r-- | src/GF/Speech/TransformCFG.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/GF/Speech/TransformCFG.hs b/src/GF/Speech/TransformCFG.hs index 87fe8a160..37d90fb52 100644 --- a/src/GF/Speech/TransformCFG.hs +++ b/src/GF/Speech/TransformCFG.hs @@ -75,9 +75,11 @@ cfgToCFRules s = symb = mapSymbol catToString id catToString = prt gfcc = stateGFCC s - nameToTerm (Name f prs) = CFObj f (zipWith profileToTerm args prs) - where C.Typ args _ = lookType gfcc (i2i f) - i2i (IC c) = C.CId c + nameToTerm (Name IW [Unify [n]]) = CFRes n + nameToTerm (Name f@(IC c) prs) = + CFObj f (zipWith profileToTerm args prs) + where C.Typ args _ = lookType gfcc (C.CId c) + nameToTerm n = error $ "cfgToCFRules.nameToTerm" ++ show n profileToTerm (C.CId t) (Unify []) = CFMeta t profileToTerm _ (Unify xs) = CFRes (last xs) -- FIXME: unify profileToTerm (C.CId t) (Constant f) = maybe (CFMeta t) (\x -> CFObj x []) (forestName f) |
