mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-22 01:22:51 -06:00
Latvian extra: initial support for VP conjunction (VPS)
TODO: subject-dependent double negation, other verb moods (currently only the indicative mood).
This commit is contained in:
@@ -27,7 +27,7 @@ lincat
|
|||||||
-- Question
|
-- Question
|
||||||
|
|
||||||
QCl = { s : VerbMood => Polarity => Str } ;
|
QCl = { s : VerbMood => Polarity => Str } ;
|
||||||
IP = { s : Case => Str ; n: Number } ;
|
IP = { s : Case => Str ; n : Number } ;
|
||||||
IDet = { s : Gender => Str ; n : Number } ;
|
IDet = { s : Gender => Str ; n : Number } ;
|
||||||
IQuant = { s : Gender => Number => Str } ;
|
IQuant = { s : Gender => Number => Str } ;
|
||||||
-- TODO: IComp = { s : Str ; a : ResLav.Agr } ;
|
-- TODO: IComp = { s : Str ; a : ResLav.Agr } ;
|
||||||
|
|||||||
@@ -3,7 +3,9 @@
|
|||||||
concrete ExtraLav of ExtraLavAbs = CatLav ** open
|
concrete ExtraLav of ExtraLavAbs = CatLav ** open
|
||||||
ParadigmsLav,
|
ParadigmsLav,
|
||||||
ParadigmsPronounsLav,
|
ParadigmsPronounsLav,
|
||||||
|
VerbLav,
|
||||||
ResLav,
|
ResLav,
|
||||||
|
Coordination,
|
||||||
Prelude
|
Prelude
|
||||||
in {
|
in {
|
||||||
|
|
||||||
@@ -47,11 +49,44 @@ lin
|
|||||||
|
|
||||||
-- Zemāk esošās f-cijas nav ExtraLavAbs, tās ir abstract/Extra.gf
|
-- Zemāk esošās f-cijas nav ExtraLavAbs, tās ir abstract/Extra.gf
|
||||||
|
|
||||||
GenNP np = {s = \\_,_,_ => np.s ! Gen ; d = Def ; isNeg = np.isNeg} ;
|
GenNP np = {
|
||||||
|
s = \\_,_,_ => np.s ! Gen ;
|
||||||
|
d = Def ;
|
||||||
|
isNeg = np.isNeg
|
||||||
|
} ;
|
||||||
|
|
||||||
--ICompAP ap = {s = \\g,n => "cik" ++ ap.s ! Indef ! g ! n ! Nom } ;
|
--ICompAP ap = {s = \\g,n => "cik" ++ ap.s ! Indef ! g ! n ! Nom } ;
|
||||||
|
|
||||||
IAdvAdv adv = {s = "cik" ++ adv.s} ;
|
IAdvAdv adv = {s = "cik" ++ adv.s} ;
|
||||||
|
|
||||||
have_V3 = mkV3 (mkV "būt") nom_Prep dat_Prep Dat ;
|
have_V3 = mkV3 (mkV "būt") nom_Prep dat_Prep Dat ;
|
||||||
|
|
||||||
|
-- for VP conjunction
|
||||||
|
|
||||||
|
lincat
|
||||||
|
VPS = {s : Agr => Str} ;
|
||||||
|
[VPS] = {s1,s2 : Agr => Str} ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
BaseVPS = twoTable Agr ;
|
||||||
|
ConsVPS = consrTable Agr comma ;
|
||||||
|
|
||||||
|
-- NP -> VPS -> S
|
||||||
|
-- NP = { s : Case => Str ; a : Agr ; isNeg : Bool } ;
|
||||||
|
PredVPS np vps = {s = np.s ! Nom ++ vps.s ! np.a} ; -- TODO: vps.s ! np.a ! np.isNeg
|
||||||
|
|
||||||
|
-- Temp -> Pol -> VP -> VPS
|
||||||
|
MkVPS temp pol vp = {
|
||||||
|
s = \\subjAgr =>
|
||||||
|
-- VP = { v : Verb ; compl : Agr => Str ; agr : ClAgr ; objNeg : Bool } ;
|
||||||
|
-- Verb = { s : Polarity => VerbForm => Str } ;
|
||||||
|
-- TODO: other VerbForm-s (moods)
|
||||||
|
-- TODO: subj-dependent double negation
|
||||||
|
-- TODO: subj/obj isNeg jāpārceļ uz Agr (?)
|
||||||
|
--let verb = vp.v.s ! pol.p ! Indicative (fromAgr agr).pers (fromAgr agr).num temp.t in
|
||||||
|
temp.s ++ buildVerb vp.v (Ind temp.a temp.t) pol.p subjAgr False vp.objNeg ++ vp.compl ! subjAgr
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- Conj -> [VPS] -> VPS
|
||||||
|
ConjVPS = conjunctDistrTable Agr ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
--# -path=.:../abstract:../common:../prelude
|
--# -path=.:../abstract:../common:../prelude
|
||||||
|
|
||||||
abstract ExtraLavAbs = Extra ** open ResLav, Prelude in {
|
abstract ExtraLavAbs = Extra **
|
||||||
|
--open ResLav, Prelude in
|
||||||
|
{
|
||||||
|
|
||||||
fun
|
fun
|
||||||
GenCN : NP -> CN -> CN ;
|
GenCN : NP -> CN -> CN ;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user