From 340b32594f7c4833ef99c3bb2ee9d747c297da8b Mon Sep 17 00:00:00 2001 From: aarne Date: Sat, 8 Mar 2014 17:06:02 +0000 Subject: [PATCH] refining SubjPre rules; adding * in chunking --- lib/src/experimental/ChunkEng.gf | 2 +- lib/src/experimental/ChunkSwe.gf | 2 +- lib/src/experimental/NDPred.gf | 8 ++++++++ lib/src/experimental/NDPredFunctor.gf | 7 +++++++ lib/src/experimental/NDPredTrans.probs | 3 ++- lib/src/experimental/Pred.gf | 7 +++++-- lib/src/experimental/PredFunctor.gf | 5 +++-- 7 files changed, 27 insertions(+), 7 deletions(-) diff --git a/lib/src/experimental/ChunkEng.gf b/lib/src/experimental/ChunkEng.gf index 8e7e85870..0f7e7f1ae 100644 --- a/lib/src/experimental/ChunkEng.gf +++ b/lib/src/experimental/ChunkEng.gf @@ -12,7 +12,7 @@ lin OneChunk c = c ; PlusChunk c cs = cc2 c cs ; - ChunkPhr c = c ; + ChunkPhr c = ss ("*" ++ c.s) | c ; lin diff --git a/lib/src/experimental/ChunkSwe.gf b/lib/src/experimental/ChunkSwe.gf index 80c6d07b4..82f1bebf3 100644 --- a/lib/src/experimental/ChunkSwe.gf +++ b/lib/src/experimental/ChunkSwe.gf @@ -12,7 +12,7 @@ lin OneChunk c = c ; PlusChunk c cs = cc2 c cs ; - ChunkPhr c = c ; + ChunkPhr c = ss ("*" ++ c.s) | c ; lin diff --git a/lib/src/experimental/NDPred.gf b/lib/src/experimental/NDPred.gf index 71f47bce4..0571b2313 100644 --- a/lib/src/experimental/NDPred.gf +++ b/lib/src/experimental/NDPred.gf @@ -281,4 +281,12 @@ fun --< ComplAdv : (a : Arg) -> PrAdv (aNP a) -> NP -> PrAdv a ; -- typically: formation of preposition phrase ComplAdv_none : PrAdv_np -> NP -> PrAdv_none ; +--< SubjUttPreS : Subj -> PrCl aNone -> PrCl aNone -> Utt ; + SubjUttPreS : Subj -> PrCl_none -> PrCl_none -> Utt ; +--< SubjUttPreQ : Subj -> PrCl aNone -> PrQCl aNone -> Utt ; + SubjUttPreQ : Subj -> PrCl_none -> PrQCl_none -> Utt ; +--< SubjUttPost : Subj -> PrCl aNone -> Utt -> Utt ; + SubjUttPost : Subj -> PrCl_none -> Utt -> Utt ; + + } \ No newline at end of file diff --git a/lib/src/experimental/NDPredFunctor.gf b/lib/src/experimental/NDPredFunctor.gf index 05f7b3806..87aee5002 100644 --- a/lib/src/experimental/NDPredFunctor.gf +++ b/lib/src/experimental/NDPredFunctor.gf @@ -216,4 +216,11 @@ lin ComplAdv_none = Pred.ComplAdv Pred.aNone ; + SubjUttPreS + = Pred.SubjUttPreS ; + SubjUttPreQ + = Pred.SubjUttPreQ ; + SubjUttPost + = Pred.SubjUttPost ; + } \ No newline at end of file diff --git a/lib/src/experimental/NDPredTrans.probs b/lib/src/experimental/NDPredTrans.probs index b21bf0625..b4410f824 100644 --- a/lib/src/experimental/NDPredTrans.probs +++ b/lib/src/experimental/NDPredTrans.probs @@ -12992,7 +12992,8 @@ ConjAdv 9.865361307113396e-4 PositAdvAdj 3.606964005524602e-2 PrepNP 0.8085086392378303 SubjUttPost 9.395582197250852e-6 -SubjUttPre 9.395582197250852e-6 +SubjUttPreS 5.395582197250852e-6 +SubjUttPreQ 5.395582197250852e-6 a_fortiori_Adv 9.395582197250852e-6 a_la_carte_Adv 9.395582197250852e-6 a_la_mode_Adv 9.395582197250852e-6 diff --git a/lib/src/experimental/Pred.gf b/lib/src/experimental/Pred.gf index 43edb6113..d93bc78aa 100644 --- a/lib/src/experimental/Pred.gf +++ b/lib/src/experimental/Pred.gf @@ -115,8 +115,11 @@ fun ComplAdv : (a : Arg) -> PrAdv (aNP a) -> NP -> PrAdv a ; -- typically: formation of preposition phrase -- subjunction ; we want to preserve the order in translation +-- Pre is more specialized to make inverted S order +---- Imp to do - SubjUttPre : Subj -> PrCl aNone -> Utt -> Utt ; - SubjUttPost : Subj -> PrCl aNone -> Utt -> Utt ; + SubjUttPreS : Subj -> PrCl aNone -> PrCl aNone -> Utt ; + SubjUttPreQ : Subj -> PrCl aNone -> PrQCl aNone -> Utt ; + SubjUttPost : Subj -> PrCl aNone -> Utt -> Utt ; } \ No newline at end of file diff --git a/lib/src/experimental/PredFunctor.gf b/lib/src/experimental/PredFunctor.gf index f6c913e68..3f676dd4e 100644 --- a/lib/src/experimental/PredFunctor.gf +++ b/lib/src/experimental/PredFunctor.gf @@ -1,4 +1,4 @@ -incomplete concrete PredFunctor of Pred = Cat [Ant,NP,Utt,IP,IAdv,IComp,Conj,RP,RS,Subj] ** +incomplete concrete PredFunctor of Pred = Cat [Ant,NP,Utt,IP,IAdv,IComp,Conj,RP,RS,Subj,Imp] ** open PredInterface, ParamX, @@ -363,7 +363,8 @@ lin ComplAdv x p np = {s = appComplCase p.c1 np ; isAdV = p.isAdV ; c1 = noComplCase} ; - SubjUttPre subj cl utt = ss (subj.s ++ declSubordCl cl ++ ("," | []) ++ utt.s) ; ----- inv for S + SubjUttPreS subj cl s = ss (subj.s ++ declSubordCl cl ++ ("," | []) ++ declInvCl s) ; + SubjUttPreQ subj cl q = ss (subj.s ++ declSubordCl cl ++ ("," | []) ++ questCl q) ; SubjUttPost subj cl utt = ss (utt.s ++ ("," | []) ++ subj.s ++ declSubordCl cl) ; } \ No newline at end of file