summaryrefslogtreecommitdiff
path: root/src/GF/Canon/GFCC
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2006-09-25 17:18:40 +0000
committeraarne <aarne@cs.chalmers.se>2006-09-25 17:18:40 +0000
commitbe2f1ac5c8272837a553dfe484a678813c73fd5b (patch)
tree33ad71c2e7928728fe77f004736e0310187c098e /src/GF/Canon/GFCC
parent902ff81773fc6eb63512fbb95fc8e3d5ead0e738 (diff)
another fix towards gfcc compilation
Diffstat (limited to 'src/GF/Canon/GFCC')
-rw-r--r--src/GF/Canon/GFCC/DataGFCC.hs2
-rw-r--r--src/GF/Canon/GFCC/Test.gf23
2 files changed, 12 insertions, 13 deletions
diff --git a/src/GF/Canon/GFCC/DataGFCC.hs b/src/GF/Canon/GFCC/DataGFCC.hs
index 9571d7c23..32b61b9c8 100644
--- a/src/GF/Canon/GFCC/DataGFCC.hs
+++ b/src/GF/Canon/GFCC/DataGFCC.hs
@@ -82,6 +82,8 @@ compute mcfg lang args = compg [] where
R ss -> case comp $ idx ss (fromInteger i) of
K (KS u) -> kks (s ++ u) -- the only case where W occurs
+ (R [C _ , R rs], C i) -> comp $ idx rs (fromInteger i)
+ (R rs, R (C i : _)) -> comp $ idx rs (fromInteger i)
(R rs, C i) -> comp $ idx rs (fromInteger i)
(r',p') -> P r' p'
W s t -> W s (comp t)
diff --git a/src/GF/Canon/GFCC/Test.gf b/src/GF/Canon/GFCC/Test.gf
index efb77eff6..6700d90f3 100644
--- a/src/GF/Canon/GFCC/Test.gf
+++ b/src/GF/Canon/GFCC/Test.gf
@@ -5,12 +5,10 @@ cat S ; NP ; N ; VP ;
fun Pred : NP -> VP -> S ;
fun Pred2 : NP -> VP -> NP -> S ;
fun Det, Dets : N -> NP ;
-
fun Mina, Te : NP ;
fun Raha, Paska, Pallo : N ;
fun Puhua, Munia, Sanoa : VP ;
-
param Person = P1 | P2 | P3 ;
param Number = Sg | Pl ;
param Case = Nom | Part ;
@@ -24,7 +22,6 @@ lincat VP = Verb ;
oper Noun = {s : NForm => Str} ;
oper Verb = {s : VForm => Str} ;
--- {-
lincat NP = {s : Case => Str ; n : Number ; p : Person} ;
lin Pred np vp = {s = np.s ! Nom ++ vp.s ! VF np.n np.p} ;
lin Pred2 np vp ob = {s = np.s ! Nom ++ vp.s ! VF np.n np.p ++ ob.s ! Part} ;
@@ -32,17 +29,17 @@ lin Det no = {s = \\c => no.s ! NF Sg c ; n = Sg ; p = P3} ;
lin Dets no = {s = \\c => no.s ! NF Pl c ; n = Pl ; p = P3} ;
lin Mina = {s = table Case ["minä" ; "minua"] ; n = Sg ; p = P1} ;
lin Te = {s = table Case ["te" ; "teitä"] ; n = Pl ; p = P2} ;
--- -}
-{-
-lincat NP = {s : Case => Str ; a : {n : Number ; p : Person}} ;
-lin Pred np vp = {s = np.s ! Nom ++ vp.s ! VF np.a.n np.a.p} ;
-lin Pred2 np vp ob = {s = np.s ! Nom ++ vp.s ! VF np.a.n np.a.p ++ ob.s ! Part} ;
-lin Det no = {s = \\c => no.s ! NF Sg c ; a = {n = Sg ; p = P3}} ;
-lin Dets no = {s = \\c => no.s ! NF Pl c ; a = {n = Pl ; p = P3}} ;
-lin Mina = {s = table Case ["minä" ; "minua"] ; a = {n = Sg ; p = P1}} ;
-lin Te = {s = table Case ["te" ; "teitä"] ; a = {n = Pl ; p = P2}} ;
--}
+
+-- for test
+cat NPR ;
+fun PredR : NPR -> VP -> S ;
+fun Sina, Me : NPR ;
+lincat NPR = {s : Case => Str ; a : {n : Number ; p : Person}} ;
+lin PredR np vp = {s = np.s ! Nom ++ vp.s ! VF np.a.n np.a.p} ;
+lin Sina = {s = table Case ["sinä" ; "sinua"] ; a = {n = Sg ; p = P2}} ;
+lin Me = {s = table Case ["me" ; "meitä"] ; a = {n = Pl ; p = P1}} ;
+-- end test
lin Raha = mkN "raha" ;
lin Paska = mkN "paska" ;