mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
Compare commits
8 Commits
misc-malay
...
optimise-l
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d40fdf79f | ||
|
|
91237f753c | ||
|
|
d25d648134 | ||
|
|
531e2c2dd2 | ||
|
|
9fcee982e5 | ||
|
|
1b696739be | ||
|
|
fb48791d6a | ||
|
|
27e6295655 |
@@ -14,6 +14,7 @@ fun
|
||||
InflectionN2 : N2 -> Inflection ;
|
||||
InflectionN3 : N3 -> Inflection ;
|
||||
InflectionPN : PN -> Inflection ;
|
||||
InflectionLN : LN -> Inflection ;
|
||||
InflectionGN : GN -> Inflection ;
|
||||
InflectionSN : SN -> Inflection ;
|
||||
InflectionA : A -> Inflection ;
|
||||
|
||||
@@ -28,6 +28,12 @@ lin
|
||||
s2 = paragraph (pn.s ! NPNom)
|
||||
} ;
|
||||
|
||||
InflectionLN = \ln -> {
|
||||
t = "ln" ;
|
||||
s1 = heading1 "Naam" ;
|
||||
s2 = paragraph (ln.s ! NPNom)
|
||||
} ;
|
||||
|
||||
InflectionGN = \pn -> {
|
||||
t = "vnm" ;
|
||||
s1 = heading1 "Voornaam" ;
|
||||
|
||||
@@ -3,4 +3,7 @@ concrete NamesAfr of Names = CatAfr ** open ResAfr, Prelude in {
|
||||
lin GivenName, MaleSurname, FemaleSurname = \n -> {s = n.s ; a = agrP3 Sg ; isPron = False} ;
|
||||
lin FullName gn sn =
|
||||
{s = \\c => gn.s ! NPNom ++ sn.s ! c ; a = agrP3 Sg ; isPron = False} ;
|
||||
|
||||
lin UseLN pn = {s = pn.s ; a = agrP3 Sg ; isPron = False} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -88,7 +88,8 @@ concrete CatBul of Cat = CommonX - [IAdv,AdV] ** open ResBul, Prelude, Predef, (
|
||||
N3 = {s : NForm => Str; rel : AForm => Str; relType : NRelType; g : AGender} ** {c2,c3 : Preposition} ;
|
||||
GN = {s : Str; g : Sex} ;
|
||||
SN = {s : Sex => Str; pl : Str} ;
|
||||
LN, PN = {s : Str; gn : GenNum} ;
|
||||
LN = {s : Species => Str; c : Preposition; gn : GenNum} ;
|
||||
PN = {s : Str; gn : GenNum} ;
|
||||
|
||||
lindef
|
||||
SSlash = \s -> {s = \\_ => s; c2 = {s=""; c=Acc}};
|
||||
|
||||
@@ -92,6 +92,21 @@ lin
|
||||
s3 = ""
|
||||
} ;
|
||||
|
||||
InflectionLN = \n -> {
|
||||
t = "същ.с." ;
|
||||
s1= heading1 ("Име за Място"++
|
||||
case n.gn of {
|
||||
GSg Masc => "(м.р.)" ;
|
||||
GSg Fem => "(ж.р.)" ;
|
||||
GSg Neut => "(ср.р.)" ;
|
||||
GPl => "(мн.ч.)"
|
||||
}) ;
|
||||
s2 = paragraph (n.s ! Indef) ++
|
||||
heading1 ("Наречие") ++
|
||||
paragraph (n.c.s ++ linCase n.c.c Pos ++ n.s ! Def) ;
|
||||
s3 = ""
|
||||
} ;
|
||||
|
||||
InflectionGN = \gn -> {
|
||||
t = "същ.с.л." ;
|
||||
s1= heading1 (case gn.g of {
|
||||
|
||||
@@ -165,6 +165,7 @@ oper
|
||||
NF Sg Indef => sg ;
|
||||
NF Sg Def => case sg of {
|
||||
_+"а"=>sg+"та" ;
|
||||
_+"ю"=>sg+"та" ;
|
||||
_+"я"=>sg+"та" ;
|
||||
_+"о"=>sg+"то" ;
|
||||
_+"у"=>sg+"то" ;
|
||||
|
||||
@@ -291,6 +291,17 @@ oper
|
||||
\s,gn -> {s = s; gn = gn ; lock_PN = <>} ;
|
||||
} ;
|
||||
|
||||
mkLN = overload {
|
||||
mkLN : Str -> LN = \s -> lin LN {s = \\_ => s; c = {s = vyv_Str; c = CPrep}; gn = GSg Masc} ;
|
||||
mkLN : Str -> Gender -> LN =
|
||||
\s,g -> lin LN {s = \\_ => s; c = {s = vyv_Str; c = CPrep}; gn = GSg g} ;
|
||||
mkLN : Str -> GenNum -> LN =
|
||||
\s,gn -> lin LN {s = \\_ => s; c = {s = vyv_Str; c = CPrep}; gn = gn} ;
|
||||
mkLN : Str -> Str -> GenNum -> LN =
|
||||
\s1,s2,gn -> lin LN {s = table Species [s2; s1]; c = {s = vyv_Str; c = CPrep}; gn = gn} ;
|
||||
} ;
|
||||
|
||||
prepLN : LN -> Prep -> LN = \n,p -> n ** {c = p} ;
|
||||
|
||||
--2 IAdv
|
||||
--
|
||||
|
||||
@@ -36,4 +36,21 @@ lin FullName gn sn = {
|
||||
p = NounP3 Pos
|
||||
} ;
|
||||
|
||||
lin UseLN, PlainLN = \n -> {
|
||||
s = table { RObj c => linCase c Pos ++ n.s ! Def ;
|
||||
_ => n.s ! Def
|
||||
} ;
|
||||
gn = n.gn ;
|
||||
p = NounP3 Pos
|
||||
} ;
|
||||
|
||||
InLN n = {s = n.c.s ++ linCase n.c.c Pos ++ n.s ! Def} ;
|
||||
|
||||
AdjLN ap n = n ** {
|
||||
s = \\sp => case ap.isPre of {
|
||||
True => ap.s ! aform n.gn sp RSubj ! P3 ++ n.s ! Indef ;
|
||||
False => n.s ! sp ++ ap.s ! aform n.gn sp RSubj ! P3
|
||||
}
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -859,4 +859,9 @@ resource ResBul = ParamX ** open Prelude, Predef in {
|
||||
Female => Fem
|
||||
} ;
|
||||
|
||||
vyv_Str : Str
|
||||
= pre { "в" ;
|
||||
"във" / strs {"в" ; "ф" ; "В" ; "Ф"}
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -44,9 +44,7 @@ concrete StructuralBul of Structural = CatBul **
|
||||
if_Subj = ss "ако" ;
|
||||
in8front_Prep = mkPrep "пред" ;
|
||||
i_Pron = mkPron "аз" "мой" "моя" "моят" "моя" "моята" "мое" "моето" "мои" "моите" (GSg Masc) PronP1 ;
|
||||
in_Prep = mkPrep (pre { "в" ;
|
||||
"във" / strs {"в" ; "ф" ; "В" ; "Ф"}
|
||||
}) ;
|
||||
in_Prep = mkPrep vyv_Str ;
|
||||
it_Pron = mkPron "то" "негов" "неговия" "неговият" "негова" "неговата" "негово" "неговото" "негови" "неговите" (GSg Neut) PronP3 ;
|
||||
less_CAdv = X.mkCAdv "по-малко" "от" ;
|
||||
many_Det = mkDeterminerPl "много" ;
|
||||
|
||||
@@ -139,6 +139,12 @@ oper
|
||||
mkPN : N -> PN ;
|
||||
} ;
|
||||
|
||||
mkLN : Str -> LN = \s ->
|
||||
lin LN {s = s ;
|
||||
p = {s=""; c=CPrep P_a; isDir=True} ;
|
||||
art = NoArt ;
|
||||
g = Masc ;
|
||||
num = Sg} ;
|
||||
|
||||
--2 Adjectives
|
||||
|
||||
|
||||
@@ -117,6 +117,12 @@ lin
|
||||
s2 = n.s
|
||||
} ;
|
||||
|
||||
InflectionLN = \n -> {
|
||||
t = "v" ;
|
||||
s1 = heading1 "Location Name" ;
|
||||
s2 = n.s
|
||||
} ;
|
||||
|
||||
InflectionGN = \n -> {
|
||||
t = "v" ;
|
||||
s1 = heading1 "Given Name" ;
|
||||
|
||||
@@ -6,4 +6,6 @@ lin FullName gn sn = {
|
||||
det = []
|
||||
} ;
|
||||
|
||||
lin UseLN pn = pn ** {det = []} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -4,4 +4,6 @@ lin GivenName, MaleSurname, FemaleSurname = \n -> noMerge ** {s = n.s ; a = agrP
|
||||
lin FullName gn sn =
|
||||
noMerge ** {s = \\c => gn.s ! NPNom ++ sn.s ! c ; a = agrP3 Sg ; isPron = False} ;
|
||||
|
||||
lin UseLN pn = noMerge ** {s = pn.s ; a = agrP3 Sg ; isPron = False} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ concrete CatEng of Cat = CommonX - [Pol,CAdv] ** open ResEng, Prelude in {
|
||||
LN = {s : Case => Str;
|
||||
p : Str; -- preposition "in Scandinavia", "on the Balkans"
|
||||
art : Bool; -- plain name "United States" vs "the United States"
|
||||
a : Agr;
|
||||
n : Number;
|
||||
} ;
|
||||
|
||||
lindef
|
||||
|
||||
@@ -38,6 +38,23 @@ lin
|
||||
)
|
||||
} ;
|
||||
|
||||
InflectionLN = \n -> {
|
||||
t = "ln" ;
|
||||
s1 = heading1 ("Location Name" ++
|
||||
case n.n of {
|
||||
Sg => "";
|
||||
Pl => "(plural)"
|
||||
}) ;
|
||||
s2 = frameTable (
|
||||
tr (th "nom" ++ th "gen") ++
|
||||
tr (td (n.s ! Nom) ++ td (n.s ! Gen))
|
||||
) ++
|
||||
heading1 ("Adverb") ++
|
||||
paragraph (n.p ++ case n.art of {
|
||||
True => "the" ++ n.s ! Nom ;
|
||||
False => n.s ! Nom}) ;
|
||||
} ;
|
||||
|
||||
InflectionGN = \pn -> {
|
||||
t = "gn" ;
|
||||
s1 = heading1 ("Given Name" ++
|
||||
|
||||
@@ -9,12 +9,12 @@ lin UseLN n = {
|
||||
True => "the" ++ n.s ! npcase2case c ;
|
||||
False => n.s ! npcase2case c
|
||||
} ;
|
||||
a = n.a
|
||||
a = agrP3 n.n
|
||||
} ;
|
||||
|
||||
lin PlainLN n = {
|
||||
s = \\c => n.s ! npcase2case c ;
|
||||
a = n.a
|
||||
a = agrP3 n.n
|
||||
} ;
|
||||
|
||||
lin InLN n = {
|
||||
@@ -25,7 +25,7 @@ lin InLN n = {
|
||||
} ;
|
||||
|
||||
lin AdjLN ap n = n ** {
|
||||
s = \\c => preOrPost ap.isPre (ap.s ! n.a) (n.s ! c) ;
|
||||
s = \\c => preOrPost ap.isPre (ap.s ! agrP3 n.n) (n.s ! c) ;
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -135,13 +135,13 @@ oper
|
||||
lin LN {s = table {Gen => s + "'s" ; _ => s} ;
|
||||
p = "in" ;
|
||||
art = False ;
|
||||
a = agrP3 Sg} ;
|
||||
n = Sg} ;
|
||||
|
||||
mkLN : Str -> Number -> LN = \s,n ->
|
||||
lin LN {s = table {Gen => s + "'s" ; _ => s} ;
|
||||
p = "in" ;
|
||||
art = False ;
|
||||
a = agrP3 n} ;
|
||||
n = n} ;
|
||||
} ;
|
||||
|
||||
defLN : LN -> LN = \n -> n ** {art = True} ;
|
||||
|
||||
@@ -11,4 +11,10 @@ lin FullName gn sn = emptyNP ** {
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
lin UseLN pn = emptyNP ** {
|
||||
s = \\c => pn.s ! npform2case Sg c ;
|
||||
a = agrP3 Sg ;
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -37,6 +37,12 @@ lin
|
||||
s2 = inflPN (\c -> pn.s ! c)
|
||||
} ;
|
||||
|
||||
InflectionLN = \pn -> {
|
||||
t = "s" ;
|
||||
s1 = heading1 (heading noun_Category) ;
|
||||
s2 = inflPN (\c -> pn.s ! c)
|
||||
} ;
|
||||
|
||||
InflectionGN = \pn -> {
|
||||
t = "s" ;
|
||||
s1 = heading1 "Etunimi" ;
|
||||
|
||||
@@ -11,4 +11,10 @@ lin FullName gn sn = {
|
||||
isPron = False ; isNeg = False
|
||||
} ;
|
||||
|
||||
lin UseLN pn = {
|
||||
s = snoun2np Sg pn ;
|
||||
a = agrP3 Sg ;
|
||||
isPron = False ; isNeg = False
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -7,11 +7,10 @@ lin FullName gn sn = pn2np {
|
||||
} ;
|
||||
|
||||
lin PlainLN n = heavyNP {
|
||||
s = \\c => n.s;
|
||||
s = \\c => n.s;
|
||||
a = {g = n.g ; n = n.num ; p = P3}
|
||||
} ;
|
||||
|
||||
|
||||
lin UseLN n = heavyNP {
|
||||
s = \\c => case n.art of {
|
||||
AlwaysArt | UseArt => artDef True n.g n.num c ++ n.s ;
|
||||
|
||||
@@ -151,7 +151,7 @@ oper
|
||||
|
||||
defLN : LN -> LN = \n -> n ** {art = AlwaysArt} ;
|
||||
useDefLN : LN -> LN = \n -> n ** {art = UseArt} ;
|
||||
prepLN : LN -> Compl -> LN = \n,s -> n ** {p = s} ;
|
||||
prepLN : LN -> Prep -> LN = \n,p -> n ** {p = p} ;
|
||||
|
||||
mkPN : overload {
|
||||
mkPN : Str -> PN ; -- feminine if ends with "e", otherwise masculine
|
||||
|
||||
@@ -35,4 +35,11 @@ lin FullName gn sn = {
|
||||
rc, ext = []
|
||||
} ;
|
||||
|
||||
lin UseLN pn = {
|
||||
s = \\c => usePrepC c (\k -> pn.s ! k) ;
|
||||
a = agrgP3 pn.g pn.n ;
|
||||
w = WLight ;
|
||||
rc, ext = []
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -145,6 +145,12 @@ oper
|
||||
mkPN : N -> PN ; -- get gender from noun
|
||||
} ;
|
||||
|
||||
mkLN : Str -> LN = \s ->
|
||||
lin LN {s = s ;
|
||||
p = {s=""; c=CPrep P_a; isDir=True} ;
|
||||
art = NoArt ;
|
||||
g = Masc ;
|
||||
num = Sg} ;
|
||||
|
||||
|
||||
--2 Adjectives
|
||||
|
||||
@@ -6,4 +6,6 @@ lin FullName gn sn = {
|
||||
p = gn.p
|
||||
} ;
|
||||
|
||||
UseLN pn = pn ;
|
||||
|
||||
}
|
||||
|
||||
@@ -21,12 +21,12 @@ lin
|
||||
-- e.g. "married to her"
|
||||
ComplA2 a np = {
|
||||
s = \\d,g,n,c => case np.isPron of {
|
||||
False => a.s ! (AAdj Posit d g n c) ++ a.prep.s ++ np.s ! (a.prep.c ! (fromAgr np.agr).num) ;
|
||||
True => a.prep.s ++ np.s ! (a.prep.c ! (fromAgr np.agr).num) ++ a.s ! (AAdj Posit d g n c)
|
||||
False => a.s ! (AAdj Posit d g n c) ++ a.prep.s ++ np.s ! partcase2case (a.prep.c ! (fromAgr np.agr).num) ;
|
||||
True => a.prep.s ++ np.s ! partcase2case (a.prep.c ! (fromAgr np.agr).num) ++ a.s ! (AAdj Posit d g n c)
|
||||
}
|
||||
} ;
|
||||
|
||||
ReflA2 a = { s = \\d,g,n,c => a.s ! (AAdj Posit d g n c) ++ a.prep.s ++ reflPron ! (a.prep.c ! n) } ;
|
||||
ReflA2 a = { s = \\d,g,n,c => a.s ! (AAdj Posit d g n c) ++ a.prep.s ++ reflPron ! partcase2case (a.prep.c ! n) } ;
|
||||
|
||||
AdAP ada ap = { s = \\d,g,n,c => ada.s ++ ap.s ! d ! g ! n ! c } ;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ lin
|
||||
-- Prep -> NP -> Adv
|
||||
-- e.g. "in the house"
|
||||
-- FIXME: postpozīcijas prievārdi
|
||||
PrepNP prep np = {s = prep.s ++ np.s ! (prep.c ! (fromAgr np.agr).num) ; isPron = np.isPron} ;
|
||||
PrepNP prep np = {s = prep.s ++ np.s ! partcase2case (prep.c ! (fromAgr np.agr).num) ; isPron = np.isPron} ;
|
||||
|
||||
-- CAdv -> A -> NP -> Adv
|
||||
-- e.g. "more warmly than John"
|
||||
|
||||
@@ -54,7 +54,7 @@ lin
|
||||
-- NP -> V2 -> NP
|
||||
-- e.g. 'the man seen'
|
||||
PPartNP np v2 = {
|
||||
s = \\c => v2.s ! Pos ! (VPart Pass (fromAgr np.agr).gend (fromAgr np.agr).num c) ++ np.s ! c ;
|
||||
s = \\c => v2.s ! Pos ! (VPart Pass (fromAgr np.agr).gend (fromAgr np.agr).num (case2partcase c)) ++ np.s ! c ;
|
||||
agr = np.agr ;
|
||||
pol = np.pol ;
|
||||
isRel = np.isRel ;
|
||||
@@ -180,8 +180,8 @@ lin
|
||||
-- N2 -> NP -> CN
|
||||
-- e.g. 'mother of the king'
|
||||
ComplN2 n2 np = {
|
||||
s = \\_,num,c => preOrPost n2.isPre
|
||||
(n2.prep.s ++ np.s ! (n2.prep.c ! (fromAgr np.agr).num) ++ closeRelCl np.isRel)
|
||||
s = \\_,num,c => preOrPost n2.isPre
|
||||
(n2.prep.s ++ np.s ! partcase2case (n2.prep.c ! (fromAgr np.agr).num) ++ closeRelCl np.isRel)
|
||||
(n2.s ! num ! c) ;
|
||||
gend = n2.gend ;
|
||||
isRel = False
|
||||
@@ -190,8 +190,8 @@ lin
|
||||
-- N3 -> NP -> N2
|
||||
-- e.g. 'distance from this city (to Paris)'
|
||||
ComplN3 n3 np = {
|
||||
s = \\num,c => preOrPost n3.isPre1
|
||||
(n3.prep1.s ++ np.s ! (n3.prep1.c ! (fromAgr np.agr).num) ++ closeRelCl np.isRel)
|
||||
s = \\num,c => preOrPost n3.isPre1
|
||||
(n3.prep1.s ++ np.s ! partcase2case (n3.prep1.c ! (fromAgr np.agr).num) ++ closeRelCl np.isRel)
|
||||
(n3.s ! num ! c) ;
|
||||
gend = n3.gend ;
|
||||
prep = n3.prep2 ;
|
||||
@@ -246,7 +246,7 @@ lin
|
||||
|
||||
-- CN -> NP -> CN
|
||||
-- e.g. 'city Paris', 'numbers x and y'
|
||||
ApposCN cn np =
|
||||
ApposCN cn np =
|
||||
let num : Number = (fromAgr np.agr).num in {
|
||||
s = \\defin,num,c => cn.s ! defin ! num ! c ++ np.s ! c ;
|
||||
gend = cn.gend ;
|
||||
|
||||
@@ -65,10 +65,10 @@ oper
|
||||
-- Praksē lielākoties pietiek ar palīgverba noliegumu?
|
||||
-- TODO: Jāpieliek parametrs Tense: present = ziedošs, izsalkstošs; past = ziedējis, izsalcis.
|
||||
-- Vai arī jāpadod Str "-is"/"-ošs" un pa tiešo jāizsauc mkParticiple, bet
|
||||
-- kā šis mkA(Str) atšķirsies no citiem mkA(Str)?
|
||||
-- kā šis mkA(Str) atšķirsies no citiem mkA(Str)?
|
||||
mkAdjective_Participle : Verb -> Voice -> Adjective = \v,p -> {
|
||||
s = table {
|
||||
AAdj Posit Indef g n c => v.s ! Pos ! (VPart p g n c) ;
|
||||
AAdj Posit Indef g n c => v.s ! Pos ! (VPart p g n (case2partcase c)) ;
|
||||
_ => NON_EXISTENT
|
||||
}
|
||||
};
|
||||
|
||||
@@ -101,18 +101,18 @@ oper
|
||||
} ;
|
||||
|
||||
mkVS = overload {
|
||||
mkVS : V -> Subj -> VS = \v,c -> lin VS {s = v.s ; leftVal = Nom ; conj = c} ;
|
||||
mkVS : V -> Subj -> Case -> VS = \v,c,s -> lin VS {s = v.s ; leftVal = s ; conj = c} ;
|
||||
mkVS : V -> Subj -> VS = \v,c -> lin VS {s = v.s ; leftVal = PartNom ; conj = c} ;
|
||||
mkVS : V -> Subj -> Case -> VS = \v,c,s -> lin VS {s = v.s ; leftVal = case2partcase s ; conj = c} ;
|
||||
} ;
|
||||
|
||||
mkVQ = overload {
|
||||
mkVQ : V -> VQ = \v -> lin VQ {s = v.s ; leftVal = Nom} ;
|
||||
mkVQ : V -> Case -> VQ = \v,c -> lin VQ {s = v.s ; leftVal = c} ;
|
||||
mkVQ : V -> VQ = \v -> lin VQ {s = v.s ; leftVal = PartNom} ;
|
||||
mkVQ : V -> Case -> VQ = \v,c -> lin VQ {s = v.s ; leftVal = case2partcase c} ;
|
||||
} ;
|
||||
|
||||
mkVV = overload {
|
||||
mkVV : V -> VV = \v -> lin VV {s = v.s ; leftVal = Nom} ;
|
||||
mkVV : V -> Case -> VV = \v,c -> lin VV {s = v.s ; leftVal = c} ;
|
||||
mkVV : V -> VV = \v -> lin VV {s = v.s ; leftVal = PartNom} ;
|
||||
mkVV : V -> Case -> VV = \v,c -> lin VV {s = v.s ; leftVal = case2partcase c} ;
|
||||
} ;
|
||||
|
||||
mkV3 = overload {
|
||||
@@ -131,8 +131,8 @@ oper
|
||||
-- Prepositions
|
||||
|
||||
mkPrep = overload {
|
||||
mkPrep : Str -> Case -> Case -> Prep = \p,sg,pl -> lin Prep {s = p ; c = table {Sg => sg ; Pl => pl}} ;
|
||||
mkPrep : Case -> Prep = \c -> lin Prep {s = [] ; c = \\_ => c} ;
|
||||
mkPrep : Str -> Case -> Case -> Prep = \p,sg,pl -> lin Prep {s = p ; c = table {Sg => case2partcase sg ; Pl => case2partcase pl}} ;
|
||||
mkPrep : Case -> Prep = \c -> lin Prep {s = [] ; c = \\_ => case2partcase c} ;
|
||||
} ;
|
||||
|
||||
nom_Prep : Prep = mkPrep Nom ;
|
||||
|
||||
@@ -14,7 +14,7 @@ oper
|
||||
Pos => (mkVerb_Pos lemma conj).s ;
|
||||
Neg => (filter_Neg (mkVerb_Pos ("ne"+lemma) conj)).s
|
||||
} ;
|
||||
leftVal = leftVal
|
||||
leftVal = case2partcase leftVal
|
||||
} ;
|
||||
|
||||
-- First conjugation
|
||||
@@ -23,7 +23,7 @@ oper
|
||||
Pos => (mkVerbC1_Pos lemma lemma2 lemma3).s ;
|
||||
Neg => (filter_Neg (mkVerbC1_Pos ("ne"+lemma) ("ne"+lemma2) ("ne"+lemma3))).s
|
||||
} ;
|
||||
leftVal = leftVal
|
||||
leftVal = case2partcase leftVal
|
||||
} ;
|
||||
|
||||
mkVerb_Pos : Str -> Conjugation -> Verb_TMP = \lemma,conj ->
|
||||
@@ -378,7 +378,7 @@ oper
|
||||
x => (mkVerb_C1 "nebūt" "neesu" "nebiju").s ! x -- the incorrect 'neesu' will be overriden
|
||||
}
|
||||
} ;
|
||||
leftVal = leftVal
|
||||
leftVal = case2partcase leftVal
|
||||
} ;
|
||||
|
||||
mkVerb_Irreg_Go : Case -> Verb = \leftVal -> mkVerb_Irreg_Go_Prefix "" leftVal ;
|
||||
@@ -397,7 +397,7 @@ oper
|
||||
x => (mkVerb_C1 ("ne" + pref + "iet") ("ne" + pref + "eju") ("ne" + pref + "gāju")).s ! x
|
||||
}
|
||||
} ;
|
||||
leftVal = leftVal
|
||||
leftVal = case2partcase leftVal
|
||||
} ;
|
||||
|
||||
mkVerb_Irreg_Sleep : Case -> Verb = \leftVal -> {
|
||||
@@ -429,7 +429,7 @@ oper
|
||||
x => (mkVerb_C3 "negulēt").s ! x
|
||||
}
|
||||
} ;
|
||||
leftVal = leftVal
|
||||
leftVal = case2partcase leftVal
|
||||
} ;
|
||||
|
||||
-- Auxiliaries: palatalization rules
|
||||
@@ -548,122 +548,110 @@ oper
|
||||
-- TODO: -ot, -am, -ām; -dams/dama, -damies/damās; -ams/ama, -āms/āma
|
||||
-- -ošs/oša ir tikai adjektīvi! Divdabji - tikai verbālās formas! (sk. Baibas sarakstu)
|
||||
|
||||
mkParticiple_IsUsi : Gender -> Number -> Case -> Str -> Str = \g,n,c,stem ->
|
||||
mkParticiple_IsUsi : Gender -> Number -> PartCase -> Str -> Str = \g,n,c,stem ->
|
||||
case g of {
|
||||
Masc => case n of {
|
||||
Sg => case c of {
|
||||
Nom => stem + "is" ;
|
||||
Gen => stem + "uša" ;
|
||||
Dat => stem + "ušam" ;
|
||||
Acc => stem + "ušu" ;
|
||||
Loc => stem + "ušā" ;
|
||||
Voc => NON_EXISTENT
|
||||
PartNom => stem + "is" ;
|
||||
PartGen => stem + "uša" ;
|
||||
PartDat => stem + "ušam" ;
|
||||
PartAcc => stem + "ušu" ;
|
||||
PartLoc => stem + "ušā"
|
||||
} ;
|
||||
Pl => case c of {
|
||||
Nom => stem + "uši" ;
|
||||
Gen => stem + "ušu" ;
|
||||
Dat => stem + "ušiem" ;
|
||||
Acc => stem + "ušus" ;
|
||||
Loc => stem + "ušos" ;
|
||||
Voc => NON_EXISTENT
|
||||
PartNom => stem + "uši" ;
|
||||
PartGen => stem + "ušu" ;
|
||||
PartDat => stem + "ušiem" ;
|
||||
PartAcc => stem + "ušus" ;
|
||||
PartLoc => stem + "ušos"
|
||||
}
|
||||
} ;
|
||||
Fem => case n of {
|
||||
Sg => case c of {
|
||||
Nom => stem + "usi" ;
|
||||
Gen => stem + "ušas" ;
|
||||
Dat => stem + "ušai" ;
|
||||
Acc => stem + "ušu" ;
|
||||
Loc => stem + "ušā" ;
|
||||
Voc => NON_EXISTENT
|
||||
PartNom => stem + "usi" ;
|
||||
PartGen => stem + "ušas" ;
|
||||
PartDat => stem + "ušai" ;
|
||||
PartAcc => stem + "ušu" ;
|
||||
PartLoc => stem + "ušā"
|
||||
} ;
|
||||
Pl => case c of {
|
||||
Nom => stem + "ušas" ;
|
||||
Gen => stem + "ušu" ;
|
||||
Dat => stem + "ušām" ;
|
||||
Acc => stem + "ušas" ;
|
||||
Loc => stem + "ušās" ;
|
||||
Voc => NON_EXISTENT
|
||||
PartNom => stem + "ušas" ;
|
||||
PartGen => stem + "ušu" ;
|
||||
PartDat => stem + "ušām" ;
|
||||
PartAcc => stem + "ušas" ;
|
||||
PartLoc => stem + "ušās"
|
||||
}
|
||||
}
|
||||
} ;
|
||||
|
||||
mkParticiple_TsTa : Gender -> Number -> Case -> Str -> Str = \g,n,c,stem ->
|
||||
mkParticiple_TsTa : Gender -> Number -> PartCase -> Str -> Str = \g,n,c,stem ->
|
||||
case g of {
|
||||
Masc => case n of {
|
||||
Sg => case c of {
|
||||
Nom => stem + "ts" ;
|
||||
Gen => stem + "ta" ;
|
||||
Dat => stem + "tam" ;
|
||||
Acc => stem + "tu" ;
|
||||
Loc => stem + "tā" ;
|
||||
Voc => NON_EXISTENT -- FIXME: -tais ?
|
||||
PartNom => stem + "ts" ;
|
||||
PartGen => stem + "ta" ;
|
||||
PartDat => stem + "tam" ;
|
||||
PartAcc => stem + "tu" ;
|
||||
PartLoc => stem + "tā"
|
||||
} ;
|
||||
Pl => case c of {
|
||||
Nom => stem + "ti" ;
|
||||
Gen => stem + "tu" ;
|
||||
Dat => stem + "tiem" ;
|
||||
Acc => stem + "tus" ;
|
||||
Loc => stem + "tos" ;
|
||||
Voc => NON_EXISTENT -- FIXME: -tie ?
|
||||
PartNom => stem + "ti" ;
|
||||
PartGen => stem + "tu" ;
|
||||
PartDat => stem + "tiem" ;
|
||||
PartAcc => stem + "tus" ;
|
||||
PartLoc => stem + "tos"
|
||||
}
|
||||
} ;
|
||||
Fem => case n of {
|
||||
Sg => case c of {
|
||||
Nom => stem + "ta" ;
|
||||
Gen => stem + "tas" ;
|
||||
Dat => stem + "tai" ;
|
||||
Acc => stem + "tu" ;
|
||||
Loc => stem + "tā" ;
|
||||
Voc => NON_EXISTENT -- FIXME: -tā ?
|
||||
PartNom => stem + "ta" ;
|
||||
PartGen => stem + "tas" ;
|
||||
PartDat => stem + "tai" ;
|
||||
PartAcc => stem + "tu" ;
|
||||
PartLoc => stem + "tā"
|
||||
} ;
|
||||
Pl => case c of {
|
||||
Nom => stem + "tas" ;
|
||||
Gen => stem + "tu" ;
|
||||
Dat => stem + "tām" ;
|
||||
Acc => stem + "tas" ;
|
||||
Loc => stem + "tās" ;
|
||||
Voc => NON_EXISTENT -- FIXME: -tās ?
|
||||
PartNom => stem + "tas" ;
|
||||
PartGen => stem + "tu" ;
|
||||
PartDat => stem + "tām" ;
|
||||
PartAcc => stem + "tas" ;
|
||||
PartLoc => stem + "tās"
|
||||
}
|
||||
}
|
||||
} ;
|
||||
|
||||
mkParticiple_IesUsies : Gender -> Number -> Case -> Str -> Str = \g,n,c,stem ->
|
||||
mkParticiple_IesUsies : Gender -> Number -> PartCase -> Str -> Str = \g,n,c,stem ->
|
||||
case g of {
|
||||
Masc => case n of {
|
||||
Sg => case c of {
|
||||
Nom => stem + "ies" ;
|
||||
Gen => NON_EXISTENT ;
|
||||
Dat => NON_EXISTENT ;
|
||||
Acc => stem + "ušos" ;
|
||||
Loc => NON_EXISTENT ;
|
||||
Voc => NON_EXISTENT
|
||||
PartNom => stem + "ies" ;
|
||||
PartGen => NON_EXISTENT ;
|
||||
PartDat => NON_EXISTENT ;
|
||||
PartAcc => stem + "ušos" ;
|
||||
PartLoc => NON_EXISTENT
|
||||
} ;
|
||||
Pl => case c of {
|
||||
Nom => stem + "ušies" ;
|
||||
Gen => stem + "ušos" ;
|
||||
Dat => NON_EXISTENT ;
|
||||
Acc => stem + "ušos" ;
|
||||
Loc => NON_EXISTENT ;
|
||||
Voc => NON_EXISTENT
|
||||
PartNom => stem + "ušies" ;
|
||||
PartGen => stem + "ušos" ;
|
||||
PartDat => NON_EXISTENT ;
|
||||
PartAcc => stem + "ušos" ;
|
||||
PartLoc => NON_EXISTENT
|
||||
}
|
||||
} ;
|
||||
Fem => case n of {
|
||||
Sg => case c of {
|
||||
Nom => stem + "usies" ;
|
||||
Gen => stem + "ušās" ;
|
||||
Dat => NON_EXISTENT ;
|
||||
Acc => stem + "ušos" ;
|
||||
Loc => NON_EXISTENT ;
|
||||
Voc => NON_EXISTENT
|
||||
PartNom => stem + "usies" ;
|
||||
PartGen => stem + "ušās" ;
|
||||
PartDat => NON_EXISTENT ;
|
||||
PartAcc => stem + "ušos" ;
|
||||
PartLoc => NON_EXISTENT
|
||||
} ;
|
||||
Pl => case c of {
|
||||
Nom => stem + "ušās" ;
|
||||
Gen => stem + "ušos" ;
|
||||
Dat => NON_EXISTENT ;
|
||||
Acc => stem + "ušos" ;
|
||||
Loc => NON_EXISTENT ;
|
||||
Voc => NON_EXISTENT
|
||||
PartNom => stem + "ušās" ;
|
||||
PartGen => stem + "ušos" ;
|
||||
PartDat => NON_EXISTENT ;
|
||||
PartAcc => stem + "ušos" ;
|
||||
PartLoc => NON_EXISTENT
|
||||
}
|
||||
}
|
||||
} ;
|
||||
|
||||
@@ -17,7 +17,7 @@ lin
|
||||
|
||||
QuestVP ip vp = { s = \\m,p => ip.s ! Nom ++ buildVerb vp.v m p (AgrP3 ip.num Masc) Pos vp.rightPol } ;
|
||||
|
||||
QuestSlash ip slash = { s = \\m,p => slash.prep.s ++ ip.s ! (slash.prep.c ! ip.num) ++ slash.s ! m ! p } ;
|
||||
QuestSlash ip slash = { s = \\m,p => slash.prep.s ++ ip.s ! partcase2case (slash.prep.c ! ip.num) ++ slash.s ! m ! p } ;
|
||||
|
||||
QuestIAdv iadv cl = { s = \\m,p => iadv.s ++ cl.s ! m ! p } ;
|
||||
|
||||
@@ -38,7 +38,7 @@ lin
|
||||
num = ip.num
|
||||
} ;
|
||||
|
||||
PrepIP p ip = { s = p.s ++ ip.s ! (p.c ! ip.num) } ;
|
||||
PrepIP p ip = { s = p.s ++ ip.s ! partcase2case (p.c ! ip.num) } ;
|
||||
|
||||
IdetCN idet cn = {
|
||||
s = \\c => idet.s ! cn.gend ++ cn.s ! Def ! idet.num ! c ;
|
||||
|
||||
@@ -19,8 +19,8 @@ lin
|
||||
oper
|
||||
|
||||
-- TODO: PassV2 verbs jāsaskaņo ar objektu, nevis subjektu (by8means_Prep: AgP3 Sg Masc) - done?
|
||||
mkRelClause : RP -> CatLav.VP -> RCl = \rp,vp ->
|
||||
let subjInTopic : Bool = case <vp.voice, vp.leftVal> of {
|
||||
mkRelClause : RP -> CatLav.VP -> RCl = \rp,vp ->
|
||||
let subjInTopic : Bool = case <vp.voice, partcase2case vp.leftVal> of {
|
||||
<Act, Nom> => True ;
|
||||
<Act, _ > => False ;
|
||||
<Pass, Acc> => False ;
|
||||
@@ -34,7 +34,7 @@ oper
|
||||
} in
|
||||
case mood of { -- subject
|
||||
Deb _ _ => rp.s ! Masc ! Dat ; --# notpresent
|
||||
_ => rp.s ! Masc ! vp.leftVal
|
||||
_ => rp.s ! Masc ! partcase2case vp.leftVal
|
||||
} ++
|
||||
case vp.objPron of {
|
||||
False => verb ++ vp.compl ! agr ;
|
||||
@@ -47,13 +47,13 @@ lin
|
||||
-- FIXME: vārdu secība - nevis 'kas mīl viņu' bet 'kas viņu mīl' (?)
|
||||
-- FIXME: Masc varētu nebūt labi
|
||||
RelSlash rp slash = {
|
||||
s = \\m,p,ag => slash.prep.s ++ rp.s ! Masc ! (slash.prep.c ! Sg) ++ slash.s ! m ! p
|
||||
s = \\m,p,ag => slash.prep.s ++ rp.s ! Masc ! partcase2case (slash.prep.c ! Sg) ++ slash.s ! m ! p
|
||||
} ;
|
||||
|
||||
-- FIXME: placeholder
|
||||
-- TODO: jātestē, kautkas nav labi ar testpiemēru
|
||||
FunRP p np rp = {
|
||||
s = \\g,c => p.s ++ rp.s ! g ! c ++ np.s ! (p.c ! (fromAgr np.agr).num)
|
||||
s = \\g,c => p.s ++ rp.s ! g ! c ++ np.s ! partcase2case (p.c ! (fromAgr np.agr).num)
|
||||
} ;
|
||||
|
||||
IdRP = {
|
||||
|
||||
@@ -48,8 +48,30 @@ param
|
||||
| VDeb
|
||||
| VImp Number
|
||||
| VDebRel -- the relative subtype of debitive
|
||||
| VPart Voice Gender Number Case ;
|
||||
| VPart Voice Gender Number PartCase ;
|
||||
|
||||
PartCase = PartNom | PartGen | PartDat | PartAcc | PartLoc ;
|
||||
|
||||
oper
|
||||
|
||||
partcase2case : PartCase -> Case = \c -> case c of {
|
||||
PartNom => Nom ;
|
||||
PartDat => Dat ;
|
||||
PartGen => Gen ;
|
||||
PartAcc => Acc ;
|
||||
PartLoc => Loc
|
||||
} ;
|
||||
|
||||
case2partcase : Case -> PartCase = \c -> case c of {
|
||||
Nom => PartNom ;
|
||||
Gen => PartGen ;
|
||||
Dat => PartDat ;
|
||||
Acc => PartAcc ;
|
||||
Loc => PartLoc ;
|
||||
_ => PartNom
|
||||
} ;
|
||||
|
||||
param
|
||||
-- Number and gender has to be agreed in predicative nominal clauses
|
||||
Agreement =
|
||||
AgrP1 Number Gender
|
||||
@@ -68,20 +90,20 @@ oper
|
||||
Noun : Type = {s : Number => Case => Str ; gend : Gender} ;
|
||||
|
||||
ProperNoun : Type = {s : Case => Str ; gend : Gender ; num : Number} ;
|
||||
|
||||
|
||||
Pronoun : Type = {s : Case => Str ; agr : Agreement ; poss : Gender => Number => Case => Str ; pol : Polarity} ;
|
||||
|
||||
Adjective : Type = {s : AForm => Str} ;
|
||||
|
||||
Preposition : Type = {s : Str ; c : Number => Case} ;
|
||||
Preposition : Type = {s : Str ; c : Number => PartCase} ;
|
||||
|
||||
Verb : Type = {s : Polarity => VForm => Str ; leftVal : Case} ;
|
||||
Verb : Type = {s : Polarity => VForm => Str ; leftVal : PartCase} ;
|
||||
|
||||
VP : Type = {
|
||||
v : Verb ;
|
||||
compl : Agreement => Str ; -- the subject-complement agreement
|
||||
voice : Voice ;
|
||||
leftVal : Case ; -- the left valence (typically, the subject)
|
||||
leftVal : PartCase ; -- the left valence (typically, the subject)
|
||||
rightAgr : Agreement ; -- for the potential subject-verb agreement (the subject can be on the right side)
|
||||
rightPol : Polarity ; -- for the potential double negation
|
||||
objPron : Bool -- true, if object is a Pron (for modifying the neutral word order)
|
||||
@@ -145,7 +167,7 @@ oper
|
||||
Masc => Masc
|
||||
} ;
|
||||
|
||||
closeRelCl : Bool -> Str = \isRel ->
|
||||
closeRelCl : Bool -> Str = \isRel ->
|
||||
case isRel of {
|
||||
True => "," ;
|
||||
False => []
|
||||
|
||||
@@ -66,8 +66,8 @@ lin
|
||||
|
||||
oper
|
||||
-- TODO: PassV2 verbs jāsaskaņo ar objektu, nevis subjektu (by8means_Prep: AgP3 Sg Masc)
|
||||
mkClause : NP -> CatLav.VP -> Cl = \np,vp ->
|
||||
let agr : Agreement = case <vp.voice, vp.leftVal> of {
|
||||
mkClause : NP -> CatLav.VP -> Cl = \np,vp ->
|
||||
let agr : Agreement = case <vp.voice, partcase2case vp.leftVal> of {
|
||||
<Act, Nom> => np.agr ;
|
||||
<Act, _ > => vp.rightAgr ;
|
||||
<Pass, Acc> => vp.rightAgr ;
|
||||
@@ -77,7 +77,7 @@ oper
|
||||
s = \\mood,pol =>
|
||||
case mood of { -- subject
|
||||
Deb _ _ => np.s ! Dat ; --# notpresent
|
||||
_ => np.s ! vp.leftVal
|
||||
_ => np.s ! partcase2case vp.leftVal
|
||||
} ++
|
||||
closeRelCl np.isRel ++ -- comma, if necessary
|
||||
case vp.objPron of {
|
||||
|
||||
@@ -98,7 +98,7 @@ lin
|
||||
-- V3 -> NP -> VPSlash
|
||||
-- e.g. 'give it (to her)'
|
||||
Slash2V3 v3 np = insertObjSlash
|
||||
(\\_ => v3.rightVal2.s ++ np.s ! (v3.rightVal2.c ! (fromAgr np.agr).num))
|
||||
(\\_ => v3.rightVal2.s ++ np.s ! partcase2case (v3.rightVal2.c ! (fromAgr np.agr).num))
|
||||
{
|
||||
v = v3 ;
|
||||
compl = \\_ => [] ; -- will be overriden
|
||||
@@ -116,7 +116,7 @@ lin
|
||||
-- V3 -> NP -> VPSlash
|
||||
-- e.g. 'give (it) to her'
|
||||
Slash3V3 v3 np = insertObjSlash
|
||||
(\\_ => v3.rightVal2.s ++ np.s ! (v3.rightVal2.c ! (fromAgr np.agr).num))
|
||||
(\\_ => v3.rightVal2.s ++ np.s ! partcase2case (v3.rightVal2.c ! (fromAgr np.agr).num))
|
||||
{
|
||||
v = v3 ;
|
||||
compl = \\_ => [] ; -- will be overriden
|
||||
@@ -194,8 +194,8 @@ lin
|
||||
}
|
||||
} ++ vpslash.compl ! agr ;
|
||||
-}
|
||||
compl = \\agr => vpslash.rightVal.s ++
|
||||
np.s ! (vpslash.rightVal.c ! (fromAgr agr).num) ++
|
||||
compl = \\agr => vpslash.rightVal.s ++
|
||||
np.s ! partcase2case (vpslash.rightVal.c ! (fromAgr agr).num) ++
|
||||
vpslash.compl ! agr ;
|
||||
voice = vpslash.voice ;
|
||||
leftVal = vpslash.leftVal ;
|
||||
@@ -221,7 +221,7 @@ lin
|
||||
-- V2V -> NP -> VPSlash -> VPSlash
|
||||
-- e.g. '-- beg me to buy'
|
||||
SlashV2VNP v2v np vpslash = insertObjSlash
|
||||
(\\_ => v2v.rightVal.s ++ np.s ! (v2v.rightVal.c ! (fromAgr np.agr).num))
|
||||
(\\_ => v2v.rightVal.s ++ np.s ! partcase2case (v2v.rightVal.c ! (fromAgr np.agr).num))
|
||||
{
|
||||
v = v2v ;
|
||||
compl = \\agr => buildVP vpslash Pos VInf agr ;
|
||||
@@ -238,7 +238,7 @@ lin
|
||||
-- VPSlash -> VP
|
||||
-- e.g. 'love himself'
|
||||
ReflVP vpslash = insertObjPre
|
||||
(\\agr => vpslash.rightVal.s ++ reflPron ! (vpslash.rightVal.c ! (fromAgr agr).num))
|
||||
(\\agr => vpslash.rightVal.s ++ reflPron ! partcase2case (vpslash.rightVal.c ! (fromAgr agr).num))
|
||||
vpslash ;
|
||||
|
||||
-- Comp -> VP
|
||||
@@ -247,7 +247,7 @@ lin
|
||||
v = mkV "būt" ;
|
||||
compl = \\agr => comp.s ! agr ;
|
||||
voice = Act ;
|
||||
leftVal = Nom ;
|
||||
leftVal = PartNom ;
|
||||
rightAgr = AgrP3 Sg Masc ;
|
||||
rightPol = Pos ;
|
||||
objPron = False
|
||||
@@ -313,7 +313,7 @@ lin
|
||||
oper
|
||||
|
||||
-- FIXME: the type of the participle form - depending on what?! (currently fixed)
|
||||
buildVerb : Verb -> VMood -> Polarity -> Agreement -> Polarity -> Polarity -> Str =
|
||||
buildVerb : Verb -> VMood -> Polarity -> Agreement -> Polarity -> Polarity -> Str =
|
||||
\v,mood,pol,agr,leftPol,rightPol ->
|
||||
let
|
||||
finalPol : Polarity = case <leftPol, rightPol> of {
|
||||
@@ -323,7 +323,7 @@ oper
|
||||
} ;
|
||||
agr = fromAgr agr
|
||||
; --# notpresent
|
||||
part = v.s ! Pos ! (VPart Pass agr.gend agr.num Nom) --# notpresent
|
||||
part = v.s ! Pos ! (VPart Pass agr.gend agr.num PartNom) --# notpresent
|
||||
in case mood of {
|
||||
Ind Simul tense => v.s ! finalPol ! (VInd agr.pers agr.num tense)
|
||||
; --# notpresent
|
||||
@@ -337,7 +337,7 @@ oper
|
||||
Deb Simul tense => (mkV "būt").s ! finalPol ! (VInd P3 Sg tense) ++ --# notpresent
|
||||
v.s ! Pos ! VDeb ; --# notpresent
|
||||
Deb Anter tense => (mkV "būt").s ! finalPol ! (VInd P3 Sg tense) ++ --# notpresent
|
||||
(mkV "būt").s ! Pos ! (VPart Pass Masc Sg Nom) ++ --# notpresent
|
||||
(mkV "būt").s ! Pos ! (VPart Pass Masc Sg PartNom) ++ --# notpresent
|
||||
v.s ! Pos ! VDeb ; --# notpresent
|
||||
|
||||
Condit Simul => v.s ! finalPol ! (VInd agr.pers agr.num ParamX.Cond) ; --# notpresent
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
concrete ConstructionMay of Construction = CatMay ** open ParadigmsMay, (L=LexiconMay), SyntaxMay in {
|
||||
concrete ConstructionMay of Construction = CatMay ** open ParadigmsMay, (L=LexiconMay), (G=GrammarMay) in {
|
||||
|
||||
lincat
|
||||
Timeunit = N ;
|
||||
@@ -9,18 +9,13 @@ lincat
|
||||
|
||||
lin
|
||||
|
||||
has_age_VP card = mkVP umur_V2 (mkNP <lin Card card : Card> L.year_N) ;
|
||||
has_age_VP card = G.ComplSlash (G.SlashV2a umur_V2) (G.DetCN (G.DetQuant G.IndefArt (G.NumCard card)) (G.UseN L.year_N)) ;
|
||||
|
||||
oper
|
||||
umur_V2 : V2 = mkV2 (mkV "umur") noPrep ;
|
||||
|
||||
{-
|
||||
|
||||
timeunitAdv n time =
|
||||
let n_card : Card = n ;
|
||||
n_hours_NP : NP = mkNP n_card time ;
|
||||
in SyntaxMay.mkAdv for_Prep n_hours_NP | mkAdv (n_hours_NP.s ! R.npNom) ;
|
||||
|
||||
weekdayPunctualAdv w = ; -- on Sunday
|
||||
weekdayHabitualAdv w = ; -- on Sundays
|
||||
weekdayNextAdv w = -- next Sunday
|
||||
|
||||
@@ -13,4 +13,11 @@ lin FullName gn sn = {
|
||||
isDefn = False
|
||||
} ;
|
||||
|
||||
lin UseLN pn = {
|
||||
s = \\c => pn.s ;
|
||||
a = pn.a ;
|
||||
isPron = False ;
|
||||
isDefn = False ;
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -52,6 +52,25 @@ lin
|
||||
)
|
||||
} ;
|
||||
|
||||
InflectionLN = \pn -> {
|
||||
t = "im" ;
|
||||
s1 = heading1 ("Imię" ++ case pn.gn of {
|
||||
MascPersSg|MascAniSg|MascInaniSg|MascPersPl => "(męskorzeczowy)";
|
||||
FemSg => "(żeński)";
|
||||
NeutSg => "(nijaki)";
|
||||
_ => ""
|
||||
}) ;
|
||||
s2 = frameTable (
|
||||
tr (th "mianownik" ++ td (pn.nom)) ++
|
||||
tr (th "dopełniacz" ++ td (pn.dep ! GenPrep)) ++
|
||||
tr (th "celownik" ++ td (pn.dep ! DatPrep)) ++
|
||||
tr (th "biernik" ++ td (pn.dep ! AccPrep)) ++
|
||||
tr (th "narzędnik" ++ td (pn.dep ! InstrC)) ++
|
||||
tr (th "miejscownik" ++ td (pn.dep ! LocPrep)) ++
|
||||
tr (th "wołacz" ++ td (pn.voc))
|
||||
)
|
||||
} ;
|
||||
|
||||
InflectionGN = \pn -> {
|
||||
t = "im" ;
|
||||
s1 = heading1 ("Imię" ++ case pn.gn of {
|
||||
|
||||
@@ -9,4 +9,6 @@ lin FullName gn sn = {
|
||||
p = gn.p
|
||||
} ;
|
||||
|
||||
lin UseLN n = n;
|
||||
|
||||
}
|
||||
|
||||
@@ -206,6 +206,13 @@ oper
|
||||
= \n -> lin PN {s = n.s ! Sg ; g = n.g} ;
|
||||
} ;
|
||||
|
||||
mkLN : Str -> LN = \s ->
|
||||
lin LN {s = s ;
|
||||
p = {s=""; c=CPrep P_a; isDir=True} ;
|
||||
art = NoArt ;
|
||||
g = Masc ;
|
||||
num = Sg} ;
|
||||
|
||||
--2 Adjectives
|
||||
compADeg : Adj -> A ; --%
|
||||
compADeg a = lin A
|
||||
|
||||
@@ -31,4 +31,19 @@ lin FullName gn sn = -- KA: guessed
|
||||
indForm = gn.s ! No ++ sn.s ! No
|
||||
} ;
|
||||
|
||||
lin UseLN pn = let
|
||||
g = pn.g ;
|
||||
n = pn.n ;
|
||||
ag = agrP3 g n ;
|
||||
hc = getClit pn.a
|
||||
in {
|
||||
s = \\c => {comp = pn.s ! c ;
|
||||
clit = \\cs => if_then_Str hc ((genCliticsCase ag c).s ! cs) [] } ;
|
||||
|
||||
a = ag;
|
||||
nForm = if_then_else NForm hc HasClit (HasRef False) ;
|
||||
isPronoun = False ; isPol = False;
|
||||
indForm = pn.s ! No
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -105,6 +105,7 @@ lincat
|
||||
linref
|
||||
N = \s -> s.snom ;
|
||||
PN = \s -> s.snom ;
|
||||
LN = \s -> s.snom ;
|
||||
Pron = \s -> s.nom ;
|
||||
N2 = \s -> s.snom ++ s.c2.s ;
|
||||
N3 = \s -> s.snom ++ s.c2.s ++ s.c3.s ;
|
||||
|
||||
@@ -22,4 +22,10 @@ lin FullName gn sn =
|
||||
a=Ag (gennum gn.g Sg) P3
|
||||
} ;
|
||||
|
||||
UseLN pn = {
|
||||
s=\\cas => (nounFormsNoun pn).s ! Sg ! cas ;
|
||||
pron=False;
|
||||
a=Ag (gennum pn.g Sg) P3
|
||||
} ; -- Does NP need animacy?
|
||||
|
||||
}
|
||||
|
||||
@@ -108,7 +108,8 @@ incomplete concrete CatScand of Cat =
|
||||
-- {s : Number => Species => Case => Str ; g : Gender} ;
|
||||
N2 = Noun ** {c2 : Complement} ;
|
||||
N3 = Noun ** {c2,c3 : Complement} ;
|
||||
GN, SN, LN, PN = {s : Case => Str ; g : Gender} ;
|
||||
LN = {s : Case => Str ; c : Complement ; g : Gender ; n : Number} ;
|
||||
GN, SN, PN = {s : Case => Str ; g : Gender} ;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,4 +21,10 @@ lin FullName gn sn = {
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
lin UseLN pn = {
|
||||
s = pn.s;
|
||||
a = {g=agender2gender pn.g; n=pn.n; p=P3};
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -15,4 +15,11 @@ lin FullName gn sn = {
|
||||
empty = [] ;
|
||||
} ;
|
||||
|
||||
UseLN pn = pn ** {
|
||||
s = \\c => pn.s ;
|
||||
isPron = False ;
|
||||
st = Definite ;
|
||||
empty = [] ;
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -155,6 +155,7 @@ oper
|
||||
|
||||
|
||||
defLN : LN -> LN = \n -> n ** {art = UseArt} ;
|
||||
prepLN : LN -> Prep -> LN = \n,p -> n ** {p = p} ;
|
||||
|
||||
mkPN : overload {
|
||||
mkPN : (Anna : Str) -> PN ; -- feminine for "-a"
|
||||
|
||||
@@ -32,16 +32,18 @@ lin
|
||||
)
|
||||
} ;
|
||||
|
||||
InflectionPN = \pn -> {
|
||||
InflectionLN = \n -> {
|
||||
t = "nm" ;
|
||||
s1 = heading1 ("Namn" ++ case pn.g of {
|
||||
Utr => "(utr)" ;
|
||||
Neutr => "(neutr)"
|
||||
}) ;
|
||||
s1 = heading1 ("Platsnamn" ++ case n.g of {
|
||||
Utr => "(utr)" ;
|
||||
Neutr => "(neutr)"
|
||||
}) ;
|
||||
s2 = frameTable (
|
||||
tr (th "nom" ++ td (pn.s ! Nom)) ++
|
||||
tr (th "gen" ++ td (pn.s ! Gen))
|
||||
)
|
||||
tr (th "nom" ++ td (n.s ! Nom)) ++
|
||||
tr (th "gen" ++ td (n.s ! Gen))
|
||||
) ++
|
||||
heading1 ("Adverb") ++
|
||||
paragraph (n.c.s ++ n.s ! caseNP accusative) ;
|
||||
} ;
|
||||
|
||||
InflectionGN = \pn -> {
|
||||
|
||||
@@ -11,4 +11,12 @@ lin FullName gn sn = {
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
UseLN, PlainLN = \n -> {
|
||||
s = \\c => n.s ! caseNP c ;
|
||||
a = agrP3 n.g n.n ;
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
InLN n = {s = n.c.s ++ n.s ! caseNP accusative} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -154,6 +154,14 @@ oper
|
||||
|
||||
geoPN : Str -> PN ; -- neuter, with identical genitive if ends in a vowel
|
||||
|
||||
mkLN = overload {
|
||||
mkLN : Str -> LN = \s -> lin LN (regPN s) ** {c={s="i";hasPrep=True}; n=Sg}; -- default gender utrum
|
||||
mkLN : Str -> Gender -> LN = \s,g -> lin LN (regGenPN s g) ** {c={s="i";hasPrep=True}; n=Sg} ; -- set other gender
|
||||
mkLN : Str -> Gender -> Number -> LN = \s,g,n -> lin LN (regGenPN s g) ** {c={s="i";hasPrep=True}; n=n} ; -- set other gender
|
||||
} ;
|
||||
|
||||
prepLN : LN -> Prep -> LN = \n,p -> n ** {c = mkComplement p.s} ;
|
||||
|
||||
--2 Adjectives
|
||||
|
||||
-- Adjectives need one to seven forms.
|
||||
|
||||
@@ -16,4 +16,10 @@ lin FullName gn sn = {
|
||||
a = {n = Sg; p = P3}
|
||||
} ;
|
||||
|
||||
lin UsePN pn = {
|
||||
s = \\c => pn.s ! c;
|
||||
h = pn.h;
|
||||
a = {n = pn.n; p = P3}
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user