mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-22 09:32:53 -06:00
tensed verb coordination (cat VPS) in English and Scand extra
This commit is contained in:
@@ -26,5 +26,14 @@ abstract Extra = Cat ** {
|
|||||||
ConjVPI : Conj -> [VPI] -> VPI ;
|
ConjVPI : Conj -> [VPI] -> VPI ;
|
||||||
ComplVPIVV : VV -> VPI -> VP ;
|
ComplVPIVV : VV -> VPI -> VP ;
|
||||||
|
|
||||||
|
-- new 4/12/2009
|
||||||
|
cat
|
||||||
|
VPS ;
|
||||||
|
[VPS] {2} ;
|
||||||
|
|
||||||
|
fun
|
||||||
|
MkVPS : Temp -> Pol -> VP -> VPS ;
|
||||||
|
ConjVPS : Conj -> [VPS] -> VPS ;
|
||||||
|
PredVPS : NP -> VPS -> S ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ abstract Demo =
|
|||||||
---- Text,
|
---- Text,
|
||||||
---- Idiom,
|
---- Idiom,
|
||||||
Structural - [everybody_NP,everything_NP,something_NP],
|
Structural - [everybody_NP,everything_NP,something_NP],
|
||||||
Lexicon ** {
|
Lexicon, Tense ** {
|
||||||
|
|
||||||
flags startcat = S ;
|
flags startcat = S ;
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ concrete DemoDan of Demo =
|
|||||||
NumeralDan,
|
NumeralDan,
|
||||||
QuestionDan,
|
QuestionDan,
|
||||||
StructuralDan,
|
StructuralDan,
|
||||||
LexiconDan
|
LexiconDan, TenseX
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags language = da; unlexer = text ; lexer = text ;
|
flags language = da; unlexer = text ; lexer = text ;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ concrete DemoNor of Demo =
|
|||||||
NumeralNor,
|
NumeralNor,
|
||||||
QuestionNor,
|
QuestionNor,
|
||||||
StructuralNor,
|
StructuralNor,
|
||||||
LexiconNor
|
LexiconNor, TenseX
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags language = no; unlexer = text ; lexer = text ;
|
flags language = no; unlexer = text ; lexer = text ;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ concrete DemoSwe of Demo =
|
|||||||
NumeralSwe,
|
NumeralSwe,
|
||||||
QuestionSwe,
|
QuestionSwe,
|
||||||
StructuralSwe,
|
StructuralSwe,
|
||||||
LexiconSwe
|
LexiconSwe, TenseX
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags language = sv; unlexer = text ; lexer = text ;
|
flags language = sv; unlexer = text ; lexer = text ;
|
||||||
|
|||||||
@@ -68,4 +68,29 @@ concrete ExtraEng of ExtraEngAbs = CatEng **
|
|||||||
|
|
||||||
each_Det = mkDeterminer Sg "each" ;
|
each_Det = mkDeterminer Sg "each" ;
|
||||||
|
|
||||||
|
-- for VP conjunction
|
||||||
|
|
||||||
|
param
|
||||||
|
VPIForm = VPIInf | VPIPPart ;
|
||||||
|
|
||||||
|
lincat
|
||||||
|
VPS = {s : Agr => Str} ;
|
||||||
|
[VPS] = {s1,s2 : Agr => Str} ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
BaseVPS = twoTable Agr ;
|
||||||
|
ConsVPS = consrTable Agr comma ;
|
||||||
|
|
||||||
|
PredVPS np vpi = {s = np.s ! Nom ++ vpi.s ! np.a} ;
|
||||||
|
|
||||||
|
MkVPS t p vp = {
|
||||||
|
s = \\a =>
|
||||||
|
let
|
||||||
|
verb = vp.s ! t.t ! t.a ! contrNeg True p.p ! ODir ! a ;
|
||||||
|
verbf = verb.aux ++ verb.adv ++ verb.fin ++ verb.inf ;
|
||||||
|
in t.s ++ p.s ++ vp.ad ++ verbf ++ vp.s2 ! a
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ConjVPS = conjunctDistrTable Agr ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -470,10 +470,5 @@ resource ResEng = ParamX ** open Prelude in {
|
|||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- for VP conjunction
|
|
||||||
|
|
||||||
param
|
|
||||||
VPIForm = VPIInf | VPIPPart ;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,4 +44,40 @@ incomplete concrete ExtraScand of ExtraScandAbs = CatScand **
|
|||||||
ConjVPI = conjunctDistrTable2 VPIForm Agr ;
|
ConjVPI = conjunctDistrTable2 VPIForm Agr ;
|
||||||
ComplVPIVV vv vpi = insertObj (\\a => vv.c2.s ++ vpi.s ! VPIInf ! a) (predV vv) ;
|
ComplVPIVV vv vpi = insertObj (\\a => vv.c2.s ++ vpi.s ! VPIInf ! a) (predV vv) ;
|
||||||
|
|
||||||
|
lincat
|
||||||
|
VPS = {s : Order => Agr => Str} ;
|
||||||
|
[VPS] = {s1,s2 : Order => Agr => Str} ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
BaseVPS = twoTable2 Order Agr ;
|
||||||
|
ConsVPS = consrTable2 Order Agr comma ;
|
||||||
|
|
||||||
|
PredVPS np vpi =
|
||||||
|
let
|
||||||
|
subj = np.s ! nominative ;
|
||||||
|
agr = np.a ;
|
||||||
|
in {
|
||||||
|
s = \\o =>
|
||||||
|
let verb = vpi.s ! o ! agr
|
||||||
|
in case o of {
|
||||||
|
Main => subj ++ verb ;
|
||||||
|
Inv => verb ++ subj ; ---- älskar henne och sover jag
|
||||||
|
Sub => subj ++ verb
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
MkVPS t p vp = {
|
||||||
|
s = \\o,a =>
|
||||||
|
let
|
||||||
|
neg = vp.a1 ! p.p ;
|
||||||
|
verb = vp.s ! VPFinite t.t t.a ;
|
||||||
|
compl = verb.inf ++ vp.n2 ! a ++ vp.a2 ++ vp.ext ;
|
||||||
|
in t.s ++ p.s ++ case o of {
|
||||||
|
Main => verb.fin ++ neg ++ compl ;
|
||||||
|
Inv => verb.fin ++ neg ++ compl ; ----
|
||||||
|
Sub => neg ++ verb.fin ++ compl
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ConjVPS = conjunctDistrTable2 Order Agr ;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user