mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-20 08:32:50 -06:00
Latvian: 1) added some extra things that are used by the Attempto grammar; 2) added notpresent tags; 3) compiles with Setup.hs and lib/src/Make.hs
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
--# -path=.:../abstract:../common:../prelude
|
||||
|
||||
concrete ExtraLav of ExtraLavAbs = CatLav ** {
|
||||
concrete ExtraLav of ExtraLavAbs = CatLav ** open ResLav in {
|
||||
|
||||
flags
|
||||
coding = utf8 ;
|
||||
|
||||
lin
|
||||
GenNP np = {s = \\_,_,_ => np.s ! Gen ; d = Def} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
--# -path=.:../abstract:../common:../prelude
|
||||
|
||||
abstract ExtraLavAbs = {}
|
||||
abstract ExtraLavAbs = Extra ** {}
|
||||
|
||||
@@ -58,11 +58,9 @@ lin
|
||||
s =
|
||||
vp.v.s ! Pos ! (Indicative P1 Pl Pres) ++ -- Verb
|
||||
vp.s2 ! a -- Object(s), complements, adverbial modifiers
|
||||
} | {
|
||||
s =
|
||||
vp.v.s ! Pos ! (Indicative P1 Pl Fut) ++
|
||||
vp.s2 ! a
|
||||
} ;
|
||||
}
|
||||
| { s = vp.v.s ! Pos ! (Indicative P1 Pl Fut) ++ vp.s2 ! a } --# notpresent
|
||||
;
|
||||
|
||||
ImpP3 np vp = {
|
||||
s = "lai" ++ np.s ! Nom ++ buildVerb vp.v (Ind Simul Pres) Pos np.a ++ vp.s2 ! np.a ;
|
||||
|
||||
15
lib/src/latvian/MakeStructuralLav.gf
Normal file
15
lib/src/latvian/MakeStructuralLav.gf
Normal file
@@ -0,0 +1,15 @@
|
||||
--# -path=.:../common:../abstract
|
||||
|
||||
resource MakeStructuralLav = open CatLav, ParadigmsLav, ResLav, Prelude in {
|
||||
|
||||
flags
|
||||
coding = utf8 ;
|
||||
|
||||
oper
|
||||
mkSubj : Str -> Subj = \x ->
|
||||
lin Subj {s = x} ;
|
||||
|
||||
mkIDet : Str -> ParadigmsLav.Number -> IDet = \s,n ->
|
||||
lin IDet {s = \\_ => s ; n = n} ;
|
||||
|
||||
}
|
||||
@@ -32,6 +32,14 @@ flags
|
||||
coding = utf8 ;
|
||||
|
||||
oper
|
||||
Number : Type ;
|
||||
singular : Number ;
|
||||
plural : Number ;
|
||||
|
||||
Number = ResLav.Number ;
|
||||
singular = Sg ;
|
||||
plural = Pl ;
|
||||
|
||||
second_conjugation : VerbConj = C2 ;
|
||||
third_conjugation : VerbConj = C3 ;
|
||||
|
||||
|
||||
@@ -32,11 +32,24 @@ param
|
||||
-- Deb = Debitive (Latvian specific: http://www.isocat.org/rest/dc/3835)
|
||||
-- Condit = Conditional
|
||||
-- DebitiveRelative = the relative subtype of debitive
|
||||
VerbForm = Infinitive | Indicative Person Number Tense | Relative Tense | Debitive |
|
||||
Imperative Number | DebitiveRelative | Participle Gender Number Case ;
|
||||
VerbForm =
|
||||
Infinitive
|
||||
| Indicative Person Number Tense
|
||||
| Relative Tense
|
||||
| Debitive
|
||||
| Imperative Number
|
||||
| DebitiveRelative
|
||||
| Participle Gender Number Case
|
||||
;
|
||||
-- TODO: divdabim noteiktā forma un arī pārākā / vispārākā pakāpe
|
||||
|
||||
VerbMood = Ind Anteriority Tense | Rel Anteriority Tense | Deb Anteriority Tense | Condit Anteriority ;
|
||||
VerbMood =
|
||||
Ind Anteriority Tense
|
||||
| Rel Anteriority Tense --# notpresent
|
||||
| Deb Anteriority Tense --# notpresent
|
||||
| Condit Anteriority --# notpresent
|
||||
;
|
||||
|
||||
VerbConj = C2 | C3 ;
|
||||
|
||||
--Agr = Ag Gender Number ;
|
||||
|
||||
@@ -42,8 +42,9 @@ lin
|
||||
UseQCl t p cl = { s = t.s ++ p.s ++ cl.s ! (Ind t.a t.t) ! p.p } ;
|
||||
|
||||
UseRCl t p cl =
|
||||
{ s = \\ag => t.s ++ p.s ++ cl.s ! (Ind t.a t.t) ! p.p ! ag } |
|
||||
{ s = \\ag => t.s ++ p.s ++ cl.s ! (Rel t.a t.t) ! p.p ! ag } ;
|
||||
{ s = \\ag => t.s ++ p.s ++ cl.s ! (Ind t.a t.t) ! p.p ! ag }
|
||||
| { s = \\ag => t.s ++ p.s ++ cl.s ! (Rel t.a t.t) ! p.p ! ag } --# notpresent
|
||||
;
|
||||
|
||||
UseSlash t p slash = { s = t.s ++ p.s ++ slash.s ! (Ind t.a t.t) ! p.p ; p = slash.p } ;
|
||||
|
||||
@@ -55,7 +56,7 @@ oper
|
||||
s = \\mood,pol =>
|
||||
case mood of { -- Subject
|
||||
-- FIXME: jāčeko valences, reizēm arī īstenības izteiksmē - 'man patīk kaut kas'
|
||||
Deb _ _ => np.s ! Dat ;
|
||||
Deb _ _ => np.s ! Dat ; --# notpresent
|
||||
_ => np.s ! Nom
|
||||
} ++
|
||||
buildVerb vp.v mood pol np.a ++ -- Verb
|
||||
|
||||
@@ -450,37 +450,4 @@ oper
|
||||
|
||||
no_Utt = ss "nē" ;
|
||||
|
||||
{-
|
||||
can8know_VV, can_VV = {
|
||||
s = table {
|
||||
VVF VInf => ["be able to"] ;
|
||||
VVF VPres => "can" ;
|
||||
VVF VPPart => ["been able to"] ;
|
||||
VVF VPresPart => ["being able to"] ;
|
||||
VVF VPast => "could" ; --# notpresent
|
||||
VVPastNeg => "couldn't" ; --# notpresent
|
||||
VVPresNeg => "can't"
|
||||
} ;
|
||||
isAux = True
|
||||
} ;
|
||||
must_VV = {
|
||||
s = table {
|
||||
VVF VInf => ["have to"] ;
|
||||
VVF VPres => "must" ;
|
||||
VVF VPPart => ["had to"] ;
|
||||
VVF VPresPart => ["having to"] ;
|
||||
VVF VPast => ["had to"] ; --# notpresent
|
||||
VVPastNeg => ["hadn't to"] ; --# notpresent
|
||||
VVPresNeg => "mustn't"
|
||||
} ;
|
||||
isAux = True
|
||||
} ;
|
||||
|
||||
not_Predet = {s = "not" ; lock_Predet = <>} ;
|
||||
no_Quant = mkQuant "no" "no" "none" "none" ;
|
||||
|
||||
have_V2 = dirV2 (mk5V "have" "has" "had" "had" "having") ;
|
||||
|
||||
-}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,4 +8,38 @@ concrete SymbolLav of Symbol = CatLav ** open
|
||||
flags
|
||||
coding = utf8 ;
|
||||
|
||||
lin
|
||||
SymbPN i = {s = \\_ => i.s ; g = Masc ; n = Sg} ;
|
||||
IntPN i = {s = \\_ => i.s ; g = Masc ; n = Pl} ;
|
||||
FloatPN i = {s = \\_ => i.s ; g = Masc ; n = Pl} ;
|
||||
NumPN i = {s = \\_ => i.s ! Masc ! Nom ; g = Masc ; n = Pl} ;
|
||||
|
||||
CNIntNP cn i = {
|
||||
s = \\_ => cn.s ! Indef ! Sg ! Nom ++ i.s ;
|
||||
a = agrgP3 Sg cn.g
|
||||
} ;
|
||||
CNSymbNP det cn xs = {
|
||||
s = \\_ => det.s ! cn.g ! Nom ++ cn.s ! det.d ! det.n ! Nom ++ xs.s ;
|
||||
a = agrgP3 det.n cn.g
|
||||
} ;
|
||||
CNNumNP cn i = {
|
||||
s = \\_ => cn.s ! Indef ! Sg ! Nom ++ i.s ! Masc ! Nom ;
|
||||
a = agrgP3 Sg cn.g
|
||||
} ;
|
||||
|
||||
SymbS sy = sy ;
|
||||
|
||||
SymbNum sy = { s = \\_,_ => sy.s ; n = Pl } ;
|
||||
SymbOrd sy = { s = \\_,_ => sy.s ++ "."} ;
|
||||
|
||||
lincat
|
||||
|
||||
Symb, [Symb] = SS ;
|
||||
|
||||
lin
|
||||
MkSymb s = s ;
|
||||
|
||||
BaseSymb = infixSS "un" ;
|
||||
ConsSymb = infixSS "," ;
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
-- Not so simple since morphology itself needs ResLav & friends.
|
||||
|
||||
concrete VerbLav of Verb = CatLav ** open
|
||||
ParamX,
|
||||
ResLav,
|
||||
ParadigmsVerbsLav,
|
||||
StructuralLav
|
||||
@@ -74,22 +75,27 @@ oper
|
||||
|
||||
buildVerb : Verb -> VerbMood -> Polarity -> Agr -> Str = \v,mood,pol,ag ->
|
||||
let
|
||||
ag = fromAgr ag ;
|
||||
part = v.s ! ResLav.Pos ! (Participle ag.g ag.n Nom)
|
||||
ag = fromAgr ag
|
||||
; --# notpresent
|
||||
part = v.s ! ResLav.Pos ! (Participle ag.g ag.n Nom) --# notpresent
|
||||
in case mood of {
|
||||
Ind Simul tense => v.s ! pol ! (Indicative ag.p ag.n tense) ;
|
||||
Ind Anter tense => mkVerb_toBe.s ! pol ! (Indicative ag.p ag.n tense) ++ part ;
|
||||
Ind Simul tense => v.s ! pol ! (Indicative ag.p ag.n tense)
|
||||
; --# notpresent
|
||||
Ind Anter tense => mkVerb_toBe.s ! pol ! (Indicative ag.p ag.n tense) ++ part ; --# notpresent
|
||||
|
||||
Rel _ Past => ResLav.NON_EXISTENT ; -- FIXME (?)
|
||||
Rel Simul tense => v.s ! pol ! (Relative tense) ;
|
||||
Rel Anter tense => mkVerb_toBe.s ! pol ! (Relative tense) ++ part ;
|
||||
-- FIXME(?): Rel _ Past => ...
|
||||
Rel _ Past => ResLav.NON_EXISTENT ; --# notpresent
|
||||
Rel Simul tense => v.s ! pol ! (Relative tense) ; --# notpresent
|
||||
Rel Anter tense => mkVerb_toBe.s ! pol ! (Relative tense) ++ part ; --# notpresent
|
||||
|
||||
Deb Simul tense => mkVerb_toBe.s ! pol ! (Indicative P3 Sg tense) ++ v.s ! ResLav.Pos ! Debitive ;
|
||||
Deb Anter tense => mkVerb_toBe.s ! pol ! (Indicative P3 Sg tense) ++
|
||||
mkVerb_toBe.s ! ResLav.Pos ! (Participle Masc Sg Nom) ++ v.s ! ResLav.Pos ! Debitive ;
|
||||
Deb Simul tense => mkVerb_toBe.s ! pol ! (Indicative P3 Sg tense) ++ --# notpresent
|
||||
v.s ! ResLav.Pos ! Debitive ; --# notpresent
|
||||
Deb Anter tense => mkVerb_toBe.s ! pol ! (Indicative P3 Sg tense) ++ --# notpresent
|
||||
mkVerb_toBe.s ! ResLav.Pos ! (Participle Masc Sg Nom) ++ --# notpresent
|
||||
v.s ! ResLav.Pos ! Debitive ; --# notpresent
|
||||
|
||||
Condit Simul => v.s ! pol ! (Indicative ag.p ag.n Cond) ;
|
||||
Condit Anter => mkVerb_toBe.s ! pol ! (Indicative ag.p ag.n Cond) ++ part
|
||||
Condit Simul => v.s ! pol ! (Indicative ag.p ag.n ParamX.Cond) ; --# notpresent
|
||||
Condit Anter => mkVerb_toBe.s ! pol ! (Indicative ag.p ag.n ParamX.Cond) ++ part --# notpresent
|
||||
} ;
|
||||
|
||||
-- TODO: nav testēts
|
||||
|
||||
Reference in New Issue
Block a user