mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
More or less complete Latvian RG (by Peteris Paikens and Normunds Gruzitis)
This commit is contained in:
@@ -1,7 +1,39 @@
|
|||||||
concrete AdjectiveLav of Adjective = CatLav ** open ResLav, Prelude in {
|
concrete AdjectiveLav of Adjective = CatLav ** open ResLav, StructuralLav, Prelude in {
|
||||||
{-
|
flags
|
||||||
lin
|
coding = utf8 ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
PositA a = { s = \\d,g,n,c => a.s ! (AAdj Posit d g n c) } ;
|
||||||
|
ComparA a np = { s = \\d,g,n,c => a.s ! (AAdj Compar d g n c) ++ "par" ++ np.s ! Acc ; } |
|
||||||
|
{ s = \\d,g,n,c => a.s ! (AAdj Compar d g n c) ++ "nekā" ++ np.s ! Nom ; };
|
||||||
|
UseComparA a = { s = \\d,g,n,c => a.s ! (AAdj Compar d g n c) } ;
|
||||||
|
|
||||||
|
ComplA2 a np = {
|
||||||
|
s = \\d,g,n,c => a.s ! (AAdj Posit d g n c) ++ a.p.s ++ np.s ! (a.p.c ! (fromAgr np.a).n) ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ReflA2 a = {
|
||||||
|
s = \\d,g,n,c => a.s ! (AAdj Posit d g n c) ++ a.p.s ++ reflPron ! (a.p.c ! n) ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
AdAP ada ap = { s = \\d,g,n,c => ada.s ++ ap.s ! d ! g ! n ! c ; } ;
|
||||||
|
|
||||||
|
SentAP ap sc = { --FIXME - te vajag apstākļa vārdu nevis īpašības vārdu! Kuru nevar normāli no AP dabūt
|
||||||
|
s = \\d,g,n,c => ap.s ! d ! g ! n ! c ++ "," ++ sc.s ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
AdjOrd ord = {
|
||||||
|
s = \\d,g,n,c => ord.s ! g ! c ; --FIXME - skaitļa agreement? noteiktība?
|
||||||
|
} ;
|
||||||
|
|
||||||
|
CAdvAP cadv ap np = {
|
||||||
|
s = \\d,g,n,c => cadv.s ++ ap.s ! d ! g ! n ! c ++ cadv.p ++ np.s ! Nom ; --TODO nominatīvs var ne vienmēr būt, pie tā CAdv jāliek parametrs par locījumu
|
||||||
|
} ;
|
||||||
|
|
||||||
|
UseA2 a = {
|
||||||
|
s = \\d,g,n,c => a.s ! (AAdj Posit d g n c) ;
|
||||||
|
} ;
|
||||||
|
{-
|
||||||
PositA a = {
|
PositA a = {
|
||||||
s = \\_ => a.s ! AAdj Posit Nom ;
|
s = \\_ => a.s ! AAdj Posit Nom ;
|
||||||
isPre = True
|
isPre = True
|
||||||
@@ -35,11 +67,6 @@ concrete AdjectiveLav of Adjective = CatLav ** open ResLav, Prelude in {
|
|||||||
isPre = False
|
isPre = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
SentAP ap sc = {
|
|
||||||
s = \\a => ap.s ! a ++ sc.s ;
|
|
||||||
isPre = False
|
|
||||||
} ;
|
|
||||||
|
|
||||||
AdAP ada ap = {
|
AdAP ada ap = {
|
||||||
s = \\a => ada.s ++ ap.s ! a ;
|
s = \\a => ada.s ++ ap.s ! a ;
|
||||||
isPre = ap.isPre
|
isPre = ap.isPre
|
||||||
|
|||||||
@@ -1,20 +1,26 @@
|
|||||||
concrete AdverbLav of Adverb = CatLav ** open ResLav, Prelude in {
|
concrete AdverbLav of Adverb = CatLav ** open ResLav, Prelude in {
|
||||||
{-
|
|
||||||
lin
|
lin
|
||||||
PositAdvAdj a = {s = a.s ! AAdv} ;
|
|
||||||
|
PositAdvAdj a = {s = a.s ! (AAdv Posit)} ;
|
||||||
|
|
||||||
ComparAdvAdj cadv a np = {
|
ComparAdvAdj cadv a np = {
|
||||||
s = cadv.s ++ a.s ! AAdv ++ cadv.p ++ np.s ! Nom
|
s = cadv.s ++ a.s ! (AAdv cadv.d) ++ cadv.p ++ np.s ! Nom -- TODO vajag arî 'âtrâks par Jâni' un 'âtrâks nekâ Jânis' pie more_CAdv
|
||||||
|
-- TODO - vai te tieðâm veido 'âtrâk par Jâni', kas ir pareizais adverbs? nevis 'âtrâks par jâni'...
|
||||||
} ;
|
} ;
|
||||||
ComparAdvAdjS cadv a s = {
|
ComparAdvAdjS cadv a s = {
|
||||||
s = cadv.s ++ a.s ! AAdv ++ cadv.p ++ s.s
|
s = cadv.s ++ a.s ! (AAdv cadv.d) ++ cadv.p ++ s.s
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
PrepNP prep np = {s = prep.s ++ np.s ! Acc} ;
|
PrepNP prep np = {s = prep.s ++ np.s ! (prep.c ! (fromAgr np.a).n)} ; --FIXME - postpozîcijas prievârdi
|
||||||
|
|
||||||
AdAdv = cc2 ;
|
AdAdv = cc2 ;
|
||||||
|
|
||||||
SubjS = cc2 ;
|
SubjS = cc2 ;
|
||||||
|
|
||||||
AdnCAdv cadv = {s = cadv.s ++ cadv.p} ;
|
AdnCAdv cadv = {
|
||||||
-}
|
s = case cadv.d of {
|
||||||
|
Posit => cadv.s ++ cadv.p;
|
||||||
|
_ => NON_EXISTENT
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,22 +1,61 @@
|
|||||||
concrete CatLav of Cat = CommonX ** open ResLav, Prelude in {
|
concrete CatLav of Cat = CommonX - [CAdv, Voc] ** open ResLav, Prelude in {
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
|
S = {s : Str} ;
|
||||||
|
QS = {s : Str} ;
|
||||||
|
RS = {s : Agr => Str} ; -- ; c : Case c for it clefts
|
||||||
|
SSlash = {s : Str; p : Prep};
|
||||||
|
|
||||||
N = {s : Number => Case => Str ; g : Gender} ;
|
N = {s : Number => Case => Str ; g : Gender} ;
|
||||||
A = {s : Degree => Definite => Gender => Number => Case => Str} ;
|
N2 = {s : Number => Case => Str ; g : Gender} ** {p : Prep; isPre : Bool}; -- case / preposition used. if isPre, then located before the noun.
|
||||||
V = {s : Polarity => VerbForm => Str} ;
|
N3 = {s : Number => Case => Str ; g : Gender} ** {p1,p2 : Prep; isPre1, isPre2 : Bool};
|
||||||
V2 = V ; -- ** {c : ResLav.Case} - valence
|
PN = {s : Case => Str ; g : Gender; n : Number} ;
|
||||||
|
A = {s : AForm => Str };
|
||||||
|
A2 = A ** {p : Prep};
|
||||||
|
V, VQ, VA, VV = Verb ;
|
||||||
|
VS = Verb ** {subj : Subj} ;
|
||||||
|
V2, V2A, V2Q, V2V = Verb ** {p : Prep} ; -- TODO - valence, pieòemam ka viena; bûtu jânorâda semantika - integrçt ar FrameNet?
|
||||||
|
V2S = Verb ** {p : Prep; subj : Subj} ;
|
||||||
|
V3 = Verb ** {p1, p2 : Prep} ;
|
||||||
|
|
||||||
|
Pron = {s : Case => Str ; a : ResLav.Agr; possessive : Gender => Number => Case => Str} ;
|
||||||
|
Conj = {s1,s2 : Str ; n : Number} ;
|
||||||
|
Subj = {s : Str} ;
|
||||||
|
Prep = {s : Str; c : Number => Case} ; -- e.g. 'ar' + Sg-Acc or Pl-Dat; Preposition may be empty [] for simple case-based valences
|
||||||
|
-- TODO - pozîcija nav noteikta; daþi ir pirms daþi pçc
|
||||||
|
|
||||||
Cl = {s : VerbMood => Polarity => Str} ;
|
Cl = {s : VerbMood => Polarity => Str} ;
|
||||||
|
ClSlash = {s : VerbMood => Polarity => Str; p : Prep};
|
||||||
|
|
||||||
|
Imp = {s : Polarity => Number => Str} ;
|
||||||
|
|
||||||
|
QCl = {s : VerbMood => Polarity => Str} ;
|
||||||
|
IP = {s : Case => Str; n: Number };
|
||||||
|
IQuant = {s : Gender => Number => Str} ;
|
||||||
|
IDet = {s : Gender => Str ; n : Number} ;
|
||||||
|
|
||||||
|
RCl = {s : VerbMood => Polarity => Agr => Str} ;
|
||||||
|
RP = {s : Case => Str} ;
|
||||||
|
|
||||||
CN = {s : Definite => Number => Case => Str ; g : Gender} ;
|
CN = {s : Definite => Number => Case => Str ; g : Gender} ;
|
||||||
Det = {s : Gender => Case => Str ; n : Number ; d: Definite} ;
|
Det = {s : Gender => Case => Str ; n : Number ; d: Definite} ;
|
||||||
NP = {s : Case => Str ; g : Gender ; n : Number; p : Person} ;
|
Predet = {s : Gender => Str} ;
|
||||||
VP = {v : V ; obj : ResLav.Agr => Str} ;
|
Quant = {s : Gender => Number => Case => Str ; d: Definite} ;
|
||||||
--TODO - arî Quant jâpieliek
|
Card = { s : Gender => Case => Str ; n: Number} ;
|
||||||
|
Ord = { s : Gender => Case => Str } ;
|
||||||
|
NP = {s : Case => Str ; a : ResLav.Agr} ;
|
||||||
|
AP = {s : Definite => Gender => Number => Case => Str} ;
|
||||||
|
VP = ResLav.VP;
|
||||||
|
VPSlash = VP ** {p : Prep};
|
||||||
|
Comp = {s : ResLav.Agr => Str} ;
|
||||||
|
|
||||||
|
Num = {s : Gender => Case => Str ; n : Number ; hasCard : Bool} ;
|
||||||
|
Numeral = {s : CardOrd => Gender => Case => Str ; n : Number} ;
|
||||||
|
Digits = {s : CardOrd => Str ; n : Number} ;
|
||||||
|
|
||||||
|
CAdv = { s : Str; p : Str; d: Degree } ;
|
||||||
{-
|
{-
|
||||||
-- Tensed/Untensed
|
-- Tensed/Untensed
|
||||||
|
|
||||||
@@ -48,7 +87,6 @@ concrete CatLav of Cat = CommonX ** open ResLav, Prelude in {
|
|||||||
s : ResEng.Tense => Anteriority => CPolarity => Agr => Str ;
|
s : ResEng.Tense => Anteriority => CPolarity => Agr => Str ;
|
||||||
c : Case
|
c : Case
|
||||||
} ;
|
} ;
|
||||||
RP = {s : RCase => Str ; a : RAgr} ;
|
|
||||||
|
|
||||||
-- Verb
|
-- Verb
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
concrete ConjunctionLav of Conjunction =
|
concrete ConjunctionLav of Conjunction =
|
||||||
CatLav ** open ResLav, Coordination, Prelude in {
|
CatLav ** open ResLav, Coordination, Prelude in {
|
||||||
{-
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
@@ -10,16 +10,12 @@ concrete ConjunctionLav of Conjunction =
|
|||||||
ConjAdv = conjunctDistrSS ;
|
ConjAdv = conjunctDistrSS ;
|
||||||
|
|
||||||
ConjNP conj ss = conjunctDistrTable Case conj ss ** {
|
ConjNP conj ss = conjunctDistrTable Case conj ss ** {
|
||||||
a = conjAgr (agrP3 conj.n) ss.a
|
a = toAgr (conjNumber (fromAgr ss.a).n conj.n) (fromAgr ss.a).p (fromAgr ss.a).g
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ConjAP conj ss = conjunctDistrTable Agr conj ss ** {
|
ConjAP conj ss = conjunctDistrTable4 Definite Gender Number Case conj ss;
|
||||||
isPre = ss.isPre
|
|
||||||
} ;
|
|
||||||
|
|
||||||
ConjRS conj ss = conjunctDistrTable Agr conj ss ** {
|
ConjRS conj ss = conjunctDistrTable Agr conj ss;
|
||||||
c = ss.c
|
|
||||||
} ;
|
|
||||||
|
|
||||||
-- These fun's are generated from the list cat's.
|
-- These fun's are generated from the list cat's.
|
||||||
|
|
||||||
@@ -27,18 +23,21 @@ concrete ConjunctionLav of Conjunction =
|
|||||||
ConsS = consrSS comma ;
|
ConsS = consrSS comma ;
|
||||||
BaseAdv = twoSS ;
|
BaseAdv = twoSS ;
|
||||||
ConsAdv = consrSS comma ;
|
ConsAdv = consrSS comma ;
|
||||||
|
|
||||||
BaseNP x y = twoTable Case x y ** {a = conjAgr x.a y.a} ;
|
BaseNP x y = twoTable Case x y ** {a = conjAgr x.a y.a} ;
|
||||||
ConsNP xs x = consrTable Case comma xs x ** {a = conjAgr xs.a x.a} ;
|
ConsNP xs x = consrTable Case comma xs x ** {a = conjAgr xs.a x.a} ;
|
||||||
BaseAP x y = twoTable Agr x y ** {isPre = andB x.isPre y.isPre} ;
|
|
||||||
ConsAP xs x = consrTable Agr comma xs x ** {isPre = andB xs.isPre x.isPre} ;
|
BaseAP x y = twoTable4 Definite Gender Number Case x y ;
|
||||||
BaseRS x y = twoTable Agr x y ** {c = y.c} ;
|
ConsAP xs x = consrTable4 Definite Gender Number Case comma xs x ;
|
||||||
ConsRS xs x = consrTable Agr comma xs x ** {c = xs.c} ;
|
|
||||||
|
BaseRS x y = twoTable Agr x y ;
|
||||||
|
ConsRS xs x = consrTable Agr comma xs x ;
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
[S] = {s1,s2 : Str} ;
|
[S] = {s1,s2 : Str} ;
|
||||||
[Adv] = {s1,s2 : Str} ;
|
[Adv] = {s1,s2 : Str} ;
|
||||||
[NP] = {s1,s2 : Case => Str ; a : Agr} ;
|
[NP] = {s1,s2 : Case => Str ; a : Agr} ;
|
||||||
[AP] = {s1,s2 : Agr => Str ; isPre : Bool} ;
|
[AP] = {s1,s2 : Definite => Gender => Number => Case => Str } ;
|
||||||
[RS] = {s1,s2 : Agr => Str ; c : Case} ;
|
[RS] = {s1,s2 : Agr => Str } ;
|
||||||
-}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ concrete GrammarLav of Grammar =
|
|||||||
RelativeLav,
|
RelativeLav,
|
||||||
ConjunctionLav,
|
ConjunctionLav,
|
||||||
PhraseLav,
|
PhraseLav,
|
||||||
TextX,
|
TextX - [CAdv],
|
||||||
StructuralLav,
|
StructuralLav,
|
||||||
IdiomLav,
|
IdiomLav,
|
||||||
TenseX
|
TenseX - [CAdv]
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||||
|
|||||||
@@ -1,9 +1,65 @@
|
|||||||
concrete IdiomLav of Idiom = CatLav ** open Prelude, ResLav in {
|
concrete IdiomLav of Idiom = CatLav ** open Prelude, ResLav, VerbLav, ParadigmsVerbsLav in {
|
||||||
{-
|
flags optimize=all_subs ;
|
||||||
flags optimize=all_subs ;
|
|
||||||
|
|
||||||
lin
|
lin
|
||||||
|
ImpersCl vp = let
|
||||||
|
a = AgP3 Sg Masc
|
||||||
|
in{
|
||||||
|
s = \\mood,pol =>
|
||||||
|
buildVerb vp.v mood pol a ++ -- Verb
|
||||||
|
vp.s2 ! a -- Object(s), complements, adverbial modifiers;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
GenericCl vp = let
|
||||||
|
a = AgP3 Sg Masc
|
||||||
|
in{
|
||||||
|
s = \\mood,pol =>
|
||||||
|
buildVerb vp.v mood pol a ++ -- Verb
|
||||||
|
vp.s2 ! a -- Object(s), complements, adverbial modifiers;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ExistNP np = let
|
||||||
|
v = lin V mkVerb_toBe;
|
||||||
|
a = np.a
|
||||||
|
in {
|
||||||
|
s = \\mood,pol =>
|
||||||
|
buildVerb v mood pol a ++ -- Verb
|
||||||
|
np.s ! Nom
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ExistIP ip = let
|
||||||
|
v = lin V mkVerb_toBe;
|
||||||
|
a = AgP3 ip.n Masc
|
||||||
|
in {
|
||||||
|
s = \\mood,pol =>
|
||||||
|
ip.s ! Nom ++
|
||||||
|
buildVerb v mood pol a -- Verb
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ProgrVP v = v; -- FIXME - needs restriction so that only VerbMood Indicative _ _ Present is allowed; but can't do that on VP level..
|
||||||
|
|
||||||
|
ImpPl1 vp = let
|
||||||
|
a = AgP1 Pl
|
||||||
|
in {
|
||||||
|
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) ++ -- Verb
|
||||||
|
vp.s2 ! a -- Object(s), complements, adverbial modifiers;
|
||||||
|
};
|
||||||
|
|
||||||
|
ImpP3 np vp = {
|
||||||
|
s = "lai" ++ np.s ! Nom ++ buildVerb vp.v (Ind Simul Pres) Pos np.a ++ vp.s2 ! np.a;
|
||||||
|
};
|
||||||
|
|
||||||
|
--FIXME placeholder
|
||||||
|
CleftNP np rs = { s = \\_,_ => NON_EXISTENT } ;
|
||||||
|
CleftAdv ad s = { s = \\_,_ => NON_EXISTENT } ;
|
||||||
|
{-
|
||||||
ImpersCl vp = mkClause "it" (agrP3 Sg) vp ;
|
ImpersCl vp = mkClause "it" (agrP3 Sg) vp ;
|
||||||
|
|
||||||
GenericCl vp = mkClause "one" (agrP3 Sg) vp ;
|
GenericCl vp = mkClause "one" (agrP3 Sg) vp ;
|
||||||
|
|
||||||
CleftNP np rs = mkClause "it" (agrP3 Sg)
|
CleftNP np rs = mkClause "it" (agrP3 Sg)
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ concrete LangLav of Lang =
|
|||||||
LexiconLav
|
LexiconLav
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
flags
|
||||||
|
startcat = Phr ;
|
||||||
|
unlexer = text ;
|
||||||
|
lexer = text ;
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -1,381 +1,382 @@
|
|||||||
--# -path=.:prelude
|
--# -path=.:prelude
|
||||||
|
|
||||||
concrete LexiconLav of Lexicon = CatLav **
|
concrete LexiconLav of Lexicon = CatLav ** open
|
||||||
open ParadigmsLav, IrregLav, Prelude in {
|
ParadigmsLav,
|
||||||
|
StructuralLav,
|
||||||
|
ResLav,
|
||||||
|
Prelude
|
||||||
|
in {
|
||||||
|
|
||||||
flags
|
flags
|
||||||
optimize=values ;
|
optimize = values ;
|
||||||
coding = utf8 ;
|
coding = utf8 ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
airplane_N = mkN "lidmašīna" ;
|
airplane_N = mkN "lidmašīna" ;
|
||||||
come_V = mkV "nākt" "nāku" "nācu" ;
|
answer_V2S = mkV2S (mkV "atbildēt" third_conjugation) dat_Prep that_Subj ; -- toP = 'answer to [Person]' = 'atbildēt [kam?]'
|
||||||
|
apartment_N = mkN "dzīvoklis" ;
|
||||||
|
apple_N = mkN "ābols" ;
|
||||||
|
art_N = mkN "māksla" ;
|
||||||
|
ask_V2Q = mkV2Q (mkV "vaicāt" second_conjugation) dat_Prep ;
|
||||||
|
baby_N = mkN "bērns" ;
|
||||||
bad_A = mkA "slikts" ;
|
bad_A = mkA "slikts" ;
|
||||||
|
bank_N = mkN "banka" ;
|
||||||
walk_V = mkV "doties" "dodos" "devos" ;
|
beautiful_A = mkA "skaists" ;
|
||||||
-- please_V2 = mkV "priecēt" second_conjugation ;
|
become_VA = mkVA (mkV "kļūt" "kļūstu" "kļuvu") ;
|
||||||
love_V2 = mkV "mīlēt" third_conjugation ;
|
beer_N = mkN "alus" ;
|
||||||
-- say_V = mkV "sacīt" third_conjugation ;
|
beg_V2V = mkV2V (mkV "lūgt" "lūdzu" "lūdzu") acc_Prep ;
|
||||||
-- be_V = mkV "būt" ;
|
big_A = mkA "liels" ;
|
||||||
|
bike_N = mkN "divritenis" ;
|
||||||
|
bird_N = mkN "putns" ;
|
||||||
|
black_A = mkA "melns" ;
|
||||||
|
blue_A = mkA "zils" ;
|
||||||
|
boat_N = mkN "laiva" ;
|
||||||
|
book_N = mkN "grāmata" ;
|
||||||
|
boot_N = mkN "zābaks" ;
|
||||||
|
boss_N = mkN "boss" ;
|
||||||
|
boy_N = mkN "puika" ;
|
||||||
|
bread_N = mkN "maize" ;
|
||||||
|
break_V2 = mkV2 (mkV "lauzt" "laužu" "lauzu") acc_Prep ;
|
||||||
|
broad_A = mkA "plats" ;
|
||||||
|
brother_N2 = mkN2 (mkN "brālis") gen_Prep True; -- Ģenitīvs nav kā piederība, bet kā relācija: "Jāņa/tēva brālis", bet ne "mans brālis" (?)
|
||||||
|
brown_A = mkA "brūns" ;
|
||||||
|
butter_N = mkN "sviests" ;
|
||||||
|
buy_V2 = mkV2 (mkV "pirkt" "pērku" "pirku") acc_Prep ;
|
||||||
|
camera_N = mkN "fotoaparāts" ;
|
||||||
|
cap_N = mkN "cepure" ;
|
||||||
|
car_N = mkN "automašīna" ;
|
||||||
|
carpet_N = mkN "paklājs" ;
|
||||||
|
cat_N = mkN "kaķis" ;
|
||||||
|
ceiling_N = mkN "griesti" ;
|
||||||
|
chair_N = mkN "krēsls" ;
|
||||||
|
cheese_N = mkN "siers" ;
|
||||||
|
child_N = mkN "bērns" ;
|
||||||
|
church_N = mkN "baznīca" ;
|
||||||
|
city_N = mkN "pilsēta" ;
|
||||||
|
clean_A = mkA "tīrs" ;
|
||||||
|
clever_A = mkA "gudrs" ;
|
||||||
|
close_V2 = mkV2 (mkV "aizvērt" "aizveru" "aizvēru") acc_Prep;
|
||||||
|
coat_N = mkN "mētelis" ;
|
||||||
|
cold_A = mkA "auksts" ;
|
||||||
|
come_V = mkV "nākt" "nāku" "nācu" ;
|
||||||
|
computer_N = mkN "dators" ;
|
||||||
|
country_N = mkN "valsts" ;
|
||||||
|
cousin_N = mkN "brālēns" ; --FIXME - brālēns / māsīca angļiem ir vienāds...
|
||||||
|
cow_N = mkN "govs" ;
|
||||||
|
die_V = mkV "nomirt" "nomirstu" "nomiru";
|
||||||
|
dirty_A = mkA "netīrs" ;
|
||||||
|
distance_N3 = mkN3 (mkN "attālums") from_Prep to_Prep ; -- no / līdz
|
||||||
|
doctor_N = mkN "ārsts" ;
|
||||||
|
dog_N = mkN "suns" ;
|
||||||
|
door_N = mkN "durvis" ;
|
||||||
|
drink_V2 = mkV2 (mkV "dzert" "dzeru" "dzēru") acc_Prep;
|
||||||
|
{-
|
||||||
|
easy_A2V = mkA2V (regA "easy") forP ; -- FIXME - nu nav tādas konstrukcijas latviešu val
|
||||||
|
-}
|
||||||
|
eat_V2 = mkV2 (mkV "ēst" "ēdu" "ēdu") acc_Prep;
|
||||||
|
empty_A = mkA "tukšs" ;
|
||||||
|
enemy_N = mkN "ienaidnieks" ;
|
||||||
|
factory_N = mkN "rūpnīca" ;
|
||||||
|
father_N2 = mkN2 (mkN "tēvs") gen_Prep True ;
|
||||||
|
fear_VS = mkVS (mkV "baidīties" third_conjugation) that_Subj;
|
||||||
|
find_V2 = mkV2 (mkV "atrast" "atrodi" "atradu") acc_Prep;
|
||||||
|
fish_N = mkN "zivs" ;
|
||||||
|
floor_N = mkN "grīda" ;
|
||||||
|
forget_V2 = mkV2 (mkV "aizmirst" "aizmirstu" "aizmirsu") acc_Prep;
|
||||||
|
fridge_N = mkN "ledusskapis" ;
|
||||||
|
friend_N = mkN "draugs" ;
|
||||||
|
fruit_N = mkN "auglis" ;
|
||||||
|
fun_AV = mkAV (mkA "priecīgs") ;
|
||||||
|
garden_N = mkN "dārzs" ;
|
||||||
|
girl_N = mkN "meitene" ;
|
||||||
|
glove_N = mkN "cimds" ;
|
||||||
|
gold_N = mkN "zelts" ;
|
||||||
|
good_A = mkA "labs" ;
|
||||||
|
go_V = mkV "iet" ;
|
||||||
|
green_A = mkA "zaļš" ;
|
||||||
|
harbour_N = mkN "osta" ;
|
||||||
|
hate_V2 = mkV2 (mkV "ienīst" "ienīstu" "ienīdu") acc_Prep;
|
||||||
|
hat_N = mkN "cepure" ;
|
||||||
|
hear_V2 = mkV2 (mkV "dzirdēt" third_conjugation) acc_Prep;
|
||||||
|
hill_N = mkN "kalns" ;
|
||||||
|
hope_VS = mkVS (mkV "cerēt" third_conjugation) that_Subj;
|
||||||
|
horse_N = mkN "zirgs" ;
|
||||||
|
hot_A = mkA "karsts" ;
|
||||||
|
house_N = mkN "māja" ;
|
||||||
|
important_A = mkA "svarīgs" ;
|
||||||
|
industry_N = mkN "industrija" ;
|
||||||
|
iron_N = mkN "dzelzs" ;
|
||||||
|
king_N = mkN "karalis" ;
|
||||||
|
know_V2 = mkV2 (mkV "zināt" third_conjugation) acc_Prep; -- FIXME - šitādas lietas jārisina ar valencēm nevis 2 vienādiem vārdiem
|
||||||
|
know_VS = mkVS (mkV "zināt" third_conjugation) that_Subj;
|
||||||
|
lake_N = mkN "ezers" ;
|
||||||
|
lamp_N = mkN "lampa" ;
|
||||||
|
learn_V2 = mkV2 (mkV "mācīties" third_conjugation) acc_Prep;
|
||||||
|
leather_N = mkN "āda" ;
|
||||||
|
leave_V2 = mkV2 (mkV "atstāt" "atstāju" "atstāju") acc_Prep;
|
||||||
|
{-
|
||||||
|
like_V2 = mkV2 (regV "like") ;
|
||||||
|
-}
|
||||||
|
listen_V2 = mkV2 (mkV "klausīties" third_conjugation) acc_Prep ;
|
||||||
|
live_V = mkV "dzīvot" second_conjugation ;
|
||||||
|
long_A = mkA "garš" ;
|
||||||
|
lose_V2 = mkV2 (mkV "pazaudēt" second_conjugation) acc_Prep;
|
||||||
|
love_N = mkN "mīlestība" ;
|
||||||
|
love_V2 = mkV2 (mkV "mīlēt" third_conjugation) acc_Prep;
|
||||||
|
man_N = mkN "vīrietis" ;
|
||||||
|
married_A2 = mkA2 (mkA (mkV "precēties" third_conjugation)) with_Prep ;
|
||||||
|
meat_N = mkN "gaļa" ;
|
||||||
|
milk_N = mkN "piens" ;
|
||||||
|
moon_N = mkN "mēness" ;
|
||||||
|
mother_N2 = mkN2 (mkN "māte") gen_Prep True;
|
||||||
|
mountain_N = mkN "kalns" ;
|
||||||
|
music_N = mkN "mūzika" ;
|
||||||
|
narrow_A = mkA "šaurs" ;
|
||||||
|
new_A = mkA "jauns" ;
|
||||||
|
newspaper_N = mkN "avīze" ;
|
||||||
|
oil_N = mkN "eļļa" ; -- reku parādās klasiskās problēmas - eļļa vai nafta?
|
||||||
|
old_A = mkA "vecs" ;
|
||||||
|
open_V2 = mkV2 (mkV "atvērt" "atveru" "atvēru") acc_Prep;
|
||||||
|
paint_V2A = mkV2A (mkV "krāsot" second_conjugation) acc_Prep ;
|
||||||
|
paper_N = mkN "papīrs" ;
|
||||||
|
paris_PN = mkPN "Parīze" ;
|
||||||
|
peace_N = mkN "miers" ;
|
||||||
|
pen_N = mkN "pildspalva" ;
|
||||||
|
planet_N = mkN "planēta" ;
|
||||||
|
plastic_N = mkN "plastmasa" ;
|
||||||
|
play_V2 = mkV2 (mkV "spēlēt" second_conjugation) acc_Prep;
|
||||||
|
policeman_N = mkN "policists" ;
|
||||||
|
priest_N = mkN "mācītājs" ;
|
||||||
|
probable_AS = mkAS (mkA "iespējams") ;
|
||||||
|
queen_N = mkN "karaliene" ;
|
||||||
|
radio_N = mkN "radio" ;
|
||||||
|
{- rain_V0 = mkV0 (regV "rain") ; -}
|
||||||
|
read_V2 = mkV2 (mkV "lasīt" third_conjugation) acc_Prep;
|
||||||
|
red_A = mkA "sarkans" ;
|
||||||
|
religion_N = mkN "reliģija" ;
|
||||||
|
restaurant_N = mkN "restorāns" ;
|
||||||
|
river_N = mkN "upe" ;
|
||||||
|
rock_N = mkN "akmens" ;
|
||||||
|
roof_N = mkN "jumts" ;
|
||||||
|
rubber_N = mkN "gumija" ;
|
||||||
|
run_V = mkV "skriet" "skrienu" "skrēju" ;
|
||||||
|
say_VS = mkVS (mkV "sacīt" third_conjugation) that_Subj;
|
||||||
|
school_N = mkN "skola" ;
|
||||||
|
science_N = mkN "zinātne" ;
|
||||||
|
sea_N = mkN "jūra" ;
|
||||||
|
seek_V2 = mkV2 (mkV "meklēt" second_conjugation) acc_Prep;
|
||||||
|
see_V2 = mkV2 (mkV "redzēt" third_conjugation) acc_Prep;
|
||||||
|
sell_V3 = mkV3 (mkV "pārdot" "pārdodu" "pārdevu") acc_Prep dat_Prep ;
|
||||||
|
send_V3 = mkV3 (mkV "sūtīt" third_conjugation) acc_Prep dat_Prep;
|
||||||
|
sheep_N = mkN "aita" ;
|
||||||
|
ship_N = mkN "kuģis" ;
|
||||||
|
shirt_N = mkN "krekls" ;
|
||||||
|
shoe_N = mkN "kurpe" ;
|
||||||
|
shop_N = mkN "veikals" ;
|
||||||
|
short_A = mkA "īss" ;
|
||||||
|
silver_N = mkN "sudrabs" ;
|
||||||
|
sister_N = mkN "māsa" ; --TODO kāpēc nav kā brālis ar parametru?
|
||||||
|
sleep_V = mkV "gulēt";
|
||||||
|
small_A = mkA "mazs" ;
|
||||||
|
snake_N = mkN "čūska" ;
|
||||||
|
sock_N = mkN "zeķe" ;
|
||||||
|
speak_V2 = mkV2 (mkV "sacīt" third_conjugation) acc_Prep; --TODO - citas valences tur tak
|
||||||
|
star_N = mkN "zvaigzne" ;
|
||||||
|
steel_N = mkN "tērauds" ;
|
||||||
|
stone_N = mkN "akmens" ;
|
||||||
|
stove_N = mkN "plīts" ;
|
||||||
|
student_N = mkN "students" ;
|
||||||
|
stupid_A = mkA "dumjš" ;
|
||||||
|
sun_N = mkN "saule" ;
|
||||||
|
switch8off_V2 = mkV2 (mkV "izslēgt" "izslēdzu" "izslēdzu") acc_Prep;
|
||||||
|
switch8on_V2 = mkV2 (mkV "ieslēgt" "ieslēdzu" "ieslēdzu") acc_Prep;
|
||||||
|
table_N = mkN "galds" ;
|
||||||
|
talk_V3 = mkV3 (mkV "runāt" second_conjugation) to_Prep par_Prep ; --ar ko, par ko
|
||||||
|
teacher_N = mkN "skolotājs" ;
|
||||||
|
teach_V2 = mkV2 (mkV "mācīt" third_conjugation) acc_Prep;
|
||||||
|
television_N = mkN "televīzija" ;
|
||||||
|
thick_A = mkA "biezs" ;
|
||||||
|
thin_A = mkA "plāns" ;
|
||||||
|
train_N = mkN "vilciens" ;
|
||||||
|
travel_V = mkV "ceļot" second_conjugation;
|
||||||
|
tree_N = mkN "koks" ;
|
||||||
|
--trousers_N = mkN "bikses" ;
|
||||||
|
ugly_A = mkA "neglīts" ;
|
||||||
|
understand_V2 = mkV2 (mkV "saprast" "saprotu" "sapratu") acc_Prep;
|
||||||
|
university_N = mkN "universitāte" ;
|
||||||
|
village_N = mkN "village" ;
|
||||||
|
wait_V2 = mkV2 (mkV "gaidīt" third_conjugation) acc_Prep ;
|
||||||
|
walk_V = mkV "staigāt" second_conjugation ;
|
||||||
|
warm_A = mkA "silts" ;
|
||||||
|
war_N = mkN "karš" ;
|
||||||
|
watch_V2 = mkV2 (mkV "skatīties" third_conjugation) acc_Prep;
|
||||||
|
water_N = mkN "ūdens" ;
|
||||||
|
white_A = mkA "balts" ;
|
||||||
|
window_N = mkN "logs" ;
|
||||||
|
wine_N = mkN "vīns" ;
|
||||||
|
win_V2 = mkV2 (mkV "uzvarēt" third_conjugation) acc_Prep;
|
||||||
|
woman_N = mkN "sieviete" ;
|
||||||
|
wonder_VQ = mkVQ (mkV "brīnīties" third_conjugation) ;
|
||||||
|
wood_N = mkN "koks" ;
|
||||||
|
write_V2 = mkV2 (mkV "rakstīt" third_conjugation) acc_Prep;
|
||||||
|
yellow_A = mkA "dzeltens" ;
|
||||||
|
young_A = mkA "jauns" ;
|
||||||
|
do_V2 = mkV2 (mkV "darīt" third_conjugation) acc_Prep;
|
||||||
|
now_Adv = mkAdv "tagad" ;
|
||||||
|
already_Adv = mkAdv "jau" ;
|
||||||
|
song_N = mkN "dziesma" ;
|
||||||
|
add_V3 = mkV3 (mkV "pielikt" "pielieku" "pieliku") acc_Prep dat_Prep ;
|
||||||
|
number_N = mkN "skaitlis" ;
|
||||||
|
put_V2 = mkV2 (mkV "likt" "lieku" "liku") acc_Prep ;
|
||||||
|
stop_V = mkV "apstāties" "apstājos" "apstājos";
|
||||||
|
jump_V = mkV "lēkt" "lecu" "lēcu" ;
|
||||||
|
|
||||||
{-
|
{-
|
||||||
answer_V2S = mkV2S (mkV "answer" "answered") toP ;
|
|
||||||
apartment_N = regN "apartment" ;
|
|
||||||
apple_N = regN "apple" ;
|
|
||||||
art_N = regN "art" ;
|
|
||||||
ask_V2Q = mkV2Q (regV "ask") noPrep ;
|
|
||||||
baby_N = regN "baby" ;
|
|
||||||
bad_A = mkADeg "bad" "worse" "worst" "badly" ;
|
|
||||||
bank_N = regN "bank" ;
|
|
||||||
beautiful_A = compoundADeg (regA "beautiful") ;
|
|
||||||
become_VA = mkVA (irregV "become" "became" "become") ;
|
|
||||||
beer_N = regN "beer" ;
|
|
||||||
beg_V2V = mkV2V (regDuplV "beg") noPrep toP ;
|
|
||||||
big_A = duplADeg "big" ;
|
|
||||||
bike_N = regN "bike" ;
|
|
||||||
bird_N = regN "bird" ;
|
|
||||||
black_A = regADeg "black" ;
|
|
||||||
blue_A = regADeg "blue" ;
|
|
||||||
boat_N = regN "boat" ;
|
|
||||||
book_N = regN "book" ;
|
|
||||||
boot_N = regN "boot" ;
|
|
||||||
boss_N = mkN human (regN "boss") ;
|
|
||||||
boy_N = mkN masculine (regN "boy") ;
|
|
||||||
bread_N = regN "bread" ;
|
|
||||||
break_V2 = dirV2 (irregV "break" "broke" "broken") ;
|
|
||||||
broad_A = regADeg "broad" ;
|
|
||||||
brother_N2 = mkN2 (mkN masculine (mkN "brother")) (mkPrep "of") ;
|
|
||||||
brown_A = regADeg "brown" ;
|
|
||||||
butter_N = regN "butter" ;
|
|
||||||
buy_V2 = dirV2 (irregV "buy" "bought" "bought") ;
|
|
||||||
camera_N = regN "camera" ;
|
|
||||||
cap_N = regN "cap" ;
|
|
||||||
car_N = regN "car" ;
|
|
||||||
carpet_N = regN "carpet" ;
|
|
||||||
cat_N = regN "cat" ;
|
|
||||||
ceiling_N = regN "ceiling" ;
|
|
||||||
chair_N = regN "chair" ;
|
|
||||||
cheese_N = regN "cheese" ;
|
|
||||||
child_N = mk2N "child" "children" ;
|
|
||||||
church_N = regN "church" ;
|
|
||||||
city_N = regN "city" ;
|
|
||||||
clean_A = regADeg "clean" ;
|
|
||||||
clever_A = mkA "clever" "cleverer" ;
|
|
||||||
close_V2 = dirV2 (regV "close") ;
|
|
||||||
coat_N = regN "coat" ;
|
|
||||||
cold_A = regADeg "cold" ;
|
|
||||||
come_V = (irregV "come" "came" "come") ;
|
|
||||||
computer_N = regN "computer" ;
|
|
||||||
country_N = regN "country" ;
|
|
||||||
cousin_N = mkN human (regN "cousin") ;
|
|
||||||
cow_N = regN "cow" ;
|
|
||||||
die_V = (regV "die") ;
|
|
||||||
dirty_A = regADeg "dirty" ;
|
|
||||||
distance_N3 = mkN3 (regN "distance") fromP toP ;
|
|
||||||
doctor_N = mkN human (regN "doctor") ;
|
|
||||||
dog_N = regN "dog" ;
|
|
||||||
door_N = regN "door" ;
|
|
||||||
drink_V2 = dirV2 (irregV "drink" "drank" "drunk") ;
|
|
||||||
easy_A2V = mkA2V (regA "easy") forP ;
|
|
||||||
eat_V2 = dirV2 (irregV "eat" "ate" "eaten") ;
|
|
||||||
empty_A = regADeg "empty" ;
|
|
||||||
enemy_N = regN "enemy" ;
|
|
||||||
factory_N = regN "factory" ;
|
|
||||||
father_N2 = mkN2 (mkN masculine (mkN "father")) (mkPrep "of") ;
|
|
||||||
fear_VS = mkVS (regV "fear") ;
|
|
||||||
find_V2 = dirV2 (irregV "find" "found" "found") ;
|
|
||||||
fish_N = mk2N "fish" "fish" ;
|
|
||||||
floor_N = regN "floor" ;
|
|
||||||
forget_V2 = dirV2 (irregDuplV "forget" "forgot" "forgotten") ;
|
|
||||||
fridge_N = regN "fridge" ;
|
|
||||||
friend_N = mkN human (regN "friend") ;
|
|
||||||
fruit_N = regN "fruit" ;
|
|
||||||
fun_AV = mkAV (regA "fun") ;
|
|
||||||
garden_N = regN "garden" ;
|
|
||||||
girl_N = mkN feminine (regN "girl") ;
|
|
||||||
glove_N = regN "glove" ;
|
|
||||||
gold_N = regN "gold" ;
|
|
||||||
good_A = mkADeg "good" "better" "best" "well" ;
|
|
||||||
go_V = mk5V "go" "goes" "went" "gone" "going" ;
|
|
||||||
green_A = regADeg "green" ;
|
|
||||||
harbour_N = regN "harbour" ;
|
|
||||||
hate_V2 = dirV2 (regV "hate") ;
|
|
||||||
hat_N = regN "hat" ;
|
|
||||||
hear_V2 = dirV2 (irregV "hear" "heard" "heard") ;
|
|
||||||
hill_N = regN "hill" ;
|
|
||||||
hope_VS = mkVS (regV "hope") ;
|
|
||||||
horse_N = regN "horse" ;
|
|
||||||
hot_A = duplADeg "hot" ;
|
|
||||||
house_N = regN "house" ;
|
|
||||||
important_A = compoundADeg (regA "important") ;
|
|
||||||
industry_N = regN "industry" ;
|
|
||||||
iron_N = regN "iron" ;
|
|
||||||
king_N = mkN masculine (regN "king") ;
|
|
||||||
know_V2 = dirV2 (irregV "know" "knew" "known") ;
|
|
||||||
know_VS = mkVS (irregV "know" "knew" "known") ;
|
|
||||||
lake_N = regN "lake" ;
|
|
||||||
lamp_N = regN "lamp" ;
|
|
||||||
learn_V2 = dirV2 (regV "learn") ;
|
|
||||||
leather_N = regN "leather" ;
|
|
||||||
leave_V2 = dirV2 (irregV "leave" "left" "left") ;
|
|
||||||
like_V2 = dirV2 (regV "like") ;
|
|
||||||
listen_V2 = prepV2 (regV "listen") toP ;
|
|
||||||
live_V = (regV "live") ;
|
|
||||||
long_A = regADeg "long" ;
|
|
||||||
lose_V2 = dirV2 (irregV "lose" "lost" "lost") ;
|
|
||||||
love_N = regN "love" ;
|
|
||||||
love_V2 = dirV2 (regV "love") ;
|
|
||||||
man_N = mkN masculine (mk2N "man" "men") ;
|
|
||||||
married_A2 = mkA2 (regA "married") toP ;
|
|
||||||
meat_N = regN "meat" ;
|
|
||||||
milk_N = regN "milk" ;
|
|
||||||
moon_N = regN "moon" ;
|
|
||||||
mother_N2 = mkN2 (mkN feminine (mkN "mother")) (mkPrep "of") ;
|
|
||||||
mountain_N = regN "mountain" ;
|
|
||||||
music_N = regN "music" ;
|
|
||||||
narrow_A = regADeg "narrow" ;
|
|
||||||
new_A = regADeg "new" ;
|
|
||||||
newspaper_N = regN "newspaper" ;
|
|
||||||
oil_N = regN "oil" ;
|
|
||||||
old_A = regADeg "old" ;
|
|
||||||
open_V2 = dirV2 (regV "open") ;
|
|
||||||
paint_V2A = mkV2A (regV "paint") noPrep ;
|
|
||||||
paper_N = regN "paper" ;
|
|
||||||
paris_PN = mkPN (mkN nonhuman (mkN "Paris")) ;
|
|
||||||
peace_N = regN "peace" ;
|
|
||||||
pen_N = regN "pen" ;
|
|
||||||
planet_N = regN "planet" ;
|
|
||||||
plastic_N = regN "plastic" ;
|
|
||||||
play_V2 = dirV2 (regV "play") ;
|
|
||||||
policeman_N = mkN masculine (mkN "policeman" "policemen") ;
|
|
||||||
priest_N = mkN human (regN "priest") ;
|
|
||||||
probable_AS = mkAS (regA "probable") ;
|
|
||||||
queen_N = mkN feminine (regN "queen") ;
|
|
||||||
radio_N = regN "radio" ;
|
|
||||||
rain_V0 = mkV0 (regV "rain") ;
|
|
||||||
read_V2 = dirV2 (irregV "read" "read" "read") ;
|
|
||||||
red_A = duplADeg "red" ;
|
|
||||||
religion_N = regN "religion" ;
|
|
||||||
restaurant_N = regN "restaurant" ;
|
|
||||||
river_N = regN "river" ;
|
|
||||||
rock_N = regN "rock" ;
|
|
||||||
roof_N = regN "roof" ;
|
|
||||||
rubber_N = regN "rubber" ;
|
|
||||||
run_V = (irregDuplV "run" "ran" "run") ;
|
|
||||||
say_VS = mkVS (irregV "say" "said" "said") ;
|
|
||||||
school_N = regN "school" ;
|
|
||||||
science_N = regN "science" ;
|
|
||||||
sea_N = regN "sea" ;
|
|
||||||
seek_V2 = dirV2 (irregV "seek" "sought" "sought") ;
|
|
||||||
see_V2 = dirV2 (irregV "see" "saw" "seen") ;
|
|
||||||
sell_V3 = dirV3 (irregV "sell" "sold" "sold") toP ;
|
|
||||||
send_V3 = dirV3 (irregV "send" "sent" "sent") toP ;
|
|
||||||
sheep_N = mk2N "sheep" "sheep" ;
|
|
||||||
ship_N = regN "ship" ;
|
|
||||||
shirt_N = regN "shirt" ;
|
|
||||||
shoe_N = regN "shoe" ;
|
|
||||||
shop_N = regN "shop" ;
|
|
||||||
short_A = regADeg "short" ;
|
|
||||||
silver_N = regN "silver" ;
|
|
||||||
sister_N = mkN feminine (mkN "sister") ;
|
|
||||||
sleep_V = (irregV "sleep" "slept" "slept") ;
|
|
||||||
small_A = regADeg "small" ;
|
|
||||||
snake_N = regN "snake" ;
|
|
||||||
sock_N = regN "sock" ;
|
|
||||||
speak_V2 = dirV2 (irregV "speak" "spoke" "spoken") ;
|
|
||||||
star_N = regN "star" ;
|
|
||||||
steel_N = regN "steel" ;
|
|
||||||
stone_N = regN "stone" ;
|
|
||||||
stove_N = regN "stove" ;
|
|
||||||
student_N = mkN human (regN "student") ;
|
|
||||||
stupid_A = mkA "stupid" ;
|
|
||||||
sun_N = regN "sun" ;
|
|
||||||
switch8off_V2 = dirV2 (partV (regV "switch") "off") ;
|
|
||||||
switch8on_V2 = dirV2 (partV (regV "switch") "on") ;
|
|
||||||
table_N = regN "table" ;
|
|
||||||
talk_V3 = mkV3 (regV "talk") toP aboutP ;
|
|
||||||
teacher_N = mkN human (regN "teacher") ;
|
|
||||||
teach_V2 = dirV2 (irregV "teach" "taught" "taught") ;
|
|
||||||
television_N = regN "television" ;
|
|
||||||
thick_A = regADeg "thick" ;
|
|
||||||
thin_A = duplADeg "thin" ;
|
|
||||||
train_N = regN "train" ;
|
|
||||||
travel_V = (regDuplV "travel") ;
|
|
||||||
tree_N = regN "tree" ;
|
|
||||||
---- trousers_N = regN "trousers" ;
|
|
||||||
ugly_A = mkA "ugly" ;
|
|
||||||
understand_V2 = dirV2 (irregV "understand" "understood" "understood") ;
|
|
||||||
university_N = regN "university" ;
|
|
||||||
village_N = regN "village" ;
|
|
||||||
wait_V2 = prepV2 (regV "wait") forP ;
|
|
||||||
walk_V = (regV "walk") ;
|
|
||||||
warm_A = regADeg "warm" ;
|
|
||||||
war_N = regN "war" ;
|
|
||||||
watch_V2 = dirV2 (regV "watch") ;
|
|
||||||
water_N = regN "water" ;
|
|
||||||
white_A = mkA "white" ;
|
|
||||||
window_N = regN "window" ;
|
|
||||||
wine_N = regN "wine" ;
|
|
||||||
win_V2 = dirV2 (irregDuplV "win" "won" "won") ;
|
|
||||||
woman_N = mkN feminine (mk2N "woman" "women") ;
|
|
||||||
wonder_VQ = mkVQ (mkV "wonder" "wondered") ;
|
|
||||||
wood_N = regN "wood" ;
|
|
||||||
write_V2 = dirV2 (irregV "write" "wrote" "written") ;
|
|
||||||
yellow_A = mkA "yellow" ;
|
|
||||||
young_A = regADeg "young" ;
|
|
||||||
|
|
||||||
do_V2 = dirV2 (mk5V "do" "does" "did" "done" "doing") ;
|
|
||||||
now_Adv = mkAdv "now" ;
|
|
||||||
already_Adv = mkAdv "already" ;
|
|
||||||
song_N = regN "song" ;
|
|
||||||
add_V3 = dirV3 (regV "add") toP ;
|
|
||||||
number_N = regN "number" ;
|
|
||||||
put_V2 = prepV2 (irregDuplV "put" "put" "put") noPrep ;
|
|
||||||
stop_V = regDuplV "stop" ;
|
|
||||||
jump_V = regV "jump" ;
|
|
||||||
|
|
||||||
left_Ord = mkOrd "left" ;
|
left_Ord = mkOrd "left" ;
|
||||||
right_Ord = mkOrd "right" ;
|
right_Ord = mkOrd "right" ; -}
|
||||||
far_Adv = mkAdv "far" ;
|
far_Adv = mkAdv "tālu" ;
|
||||||
correct_A = (regA "correct") ;
|
correct_A = mkA "pareizs" ;
|
||||||
dry_A = regA "dry" ;
|
dry_A = mkA "sauss" ;
|
||||||
dull_A = regA "dull" ;
|
dull_A = mkA "neass" ; -- garlaicīgs?
|
||||||
full_A = regA "full" ;
|
full_A = mkA "pilns" ;
|
||||||
heavy_A = regA "heavy" ;
|
heavy_A = mkA "smags" ;
|
||||||
near_A = regA "near" ;
|
near_A = mkA "tuvs" ;
|
||||||
rotten_A = (regA "rotten") ;
|
rotten_A = mkA "sapuvis" ;
|
||||||
round_A = regA "round" ;
|
round_A = mkA "apaļš" ;
|
||||||
sharp_A = regA "sharp" ;
|
sharp_A = mkA "ass" ;
|
||||||
smooth_A = regA "smooth" ;
|
smooth_A = mkA "gluds" ;
|
||||||
straight_A = regA "straight" ;
|
straight_A = mkA "taisns" ;
|
||||||
wet_A = regA "wet" ; ----
|
wet_A = mkA "slapjš" ;
|
||||||
wide_A = regA "wide" ;
|
wide_A = mkA "plats" ;
|
||||||
animal_N = regN "animal" ;
|
animal_N = mkN "dzīvnieks" ;
|
||||||
ashes_N = regN "ash" ; -- FIXME: plural only?
|
ashes_N = mkN "pelni" ; -- FIXME: plural only? kā to norāda?
|
||||||
back_N = regN "back" ;
|
back_N = mkN "mugura" ;
|
||||||
bark_N = regN "bark" ;
|
bark_N = mkN "miza" ;
|
||||||
belly_N = regN "belly" ;
|
belly_N = mkN "vēders" ;
|
||||||
blood_N = regN "blood" ;
|
blood_N = mkN "asinis" Fem;
|
||||||
bone_N = regN "bone" ;
|
bone_N = mkN "kauls" ;
|
||||||
breast_N = regN "breast" ;
|
breast_N = mkN "krūts" Fem;
|
||||||
cloud_N = regN "cloud" ;
|
cloud_N = mkN "mākonis" ;
|
||||||
day_N = regN "day" ;
|
day_N = mkN "diena" ;
|
||||||
dust_N = regN "dust" ;
|
dust_N = mkN "putekļi" ;
|
||||||
ear_N = regN "ear" ;
|
ear_N = mkN "auss" ;
|
||||||
earth_N = regN "earth" ;
|
earth_N = mkN "zeme" ;
|
||||||
egg_N = regN "egg" ;
|
egg_N = mkN "ola" ;
|
||||||
eye_N = regN "eye" ;
|
eye_N = mkN "acs" ;
|
||||||
fat_N = regN "fat" ;
|
fat_N = mkN "tauki" ;
|
||||||
feather_N = regN "feather" ;
|
feather_N = mkN "spalva" ;
|
||||||
fingernail_N = regN "fingernail" ;
|
fingernail_N = mkN "nags" ;
|
||||||
fire_N = regN "fire" ;
|
fire_N = mkN "uguns" ;
|
||||||
flower_N = regN "flower" ;
|
flower_N = mkN "puķe" ;
|
||||||
fog_N = regN "fog" ;
|
fog_N = mkN "migla" ;
|
||||||
foot_N = mk2N "foot" "feet" ;
|
foot_N = mkN "pēda" ;
|
||||||
forest_N = regN "forest" ;
|
forest_N = mkN "mežs" ;
|
||||||
grass_N = regN "grass" ;
|
grass_N = mkN "zāle" ;
|
||||||
guts_N = regN "gut" ; -- FIXME: no singular
|
guts_N = mkN "zarnas" ; -- FIXME: no singular
|
||||||
hair_N = regN "hair" ;
|
hair_N = mkN "mati" ;
|
||||||
hand_N = regN "hand" ;
|
hand_N = mkN "roka" ;
|
||||||
head_N = regN "head" ;
|
head_N = mkN "galva" ;
|
||||||
heart_N = regN "heart" ;
|
heart_N = mkN "sirds" ;
|
||||||
horn_N = regN "horn" ;
|
horn_N = mkN "rags" ;
|
||||||
husband_N = mkN masculine (regN "husband") ;
|
husband_N = mkN "vīrs" ; --TODO - kāpēc nav parametrs tāpat kā tēvam?
|
||||||
ice_N = regN "ice" ;
|
ice_N = mkN "ledus" ;
|
||||||
knee_N = regN "knee" ;
|
knee_N = mkN "ceļgals" ;
|
||||||
leaf_N = mk2N "leaf" "leaves" ;
|
leaf_N = mkN "lapa" ;
|
||||||
leg_N = regN "leg" ;
|
leg_N = mkN "kāja" ;
|
||||||
liver_N = regN "liver" ;
|
liver_N = mkN "aknas" ;
|
||||||
louse_N = mk2N "louse" "lice" ;
|
louse_N = mkN "uts" ;
|
||||||
mouth_N = regN "mouth" ;
|
mouth_N = mkN "mute" ;
|
||||||
name_N = regN "name" ;
|
name_N = mkN "vārds" ;
|
||||||
neck_N = regN "neck" ;
|
neck_N = mkN "kakls" ;
|
||||||
night_N = regN "night" ;
|
night_N = mkN "nakts" ;
|
||||||
nose_N = regN "nose" ;
|
nose_N = mkN "deguns" ;
|
||||||
person_N = mkN human (regN "person") ;
|
person_N = mkN "cilvēks" ;
|
||||||
rain_N = regN "rain" ;
|
rain_N = mkN "lietus" ;
|
||||||
road_N = regN "road" ;
|
road_N = mkN "ceļš" ;
|
||||||
root_N = regN "root" ;
|
root_N = mkN "sakne" ;
|
||||||
rope_N = regN "rope" ;
|
rope_N = mkN "virve" ;
|
||||||
salt_N = regN "salt" ;
|
salt_N = mkN "sāls" ;
|
||||||
sand_N = regN "sand" ;
|
sand_N = mkN "smiltis" ;
|
||||||
seed_N = regN "seed" ;
|
seed_N = mkN "sēkla" ;
|
||||||
skin_N = regN "skin" ;
|
skin_N = mkN "āda" ;
|
||||||
sky_N = regN "sky" ;
|
sky_N = mkN "debesis" ;
|
||||||
smoke_N = regN "smoke" ;
|
smoke_N = mkN "dūmi" ;
|
||||||
snow_N = regN "snow" ;
|
snow_N = mkN "sniegs" ;
|
||||||
stick_N = regN "stick" ;
|
stick_N = mkN "nūja" ;
|
||||||
tail_N = regN "tail" ;
|
tail_N = mkN "aste" ;
|
||||||
tongue_N = regN "tongue" ;
|
tongue_N = mkN "mēle" ;
|
||||||
tooth_N = mk2N "tooth" "teeth" ;
|
tooth_N = mkN "zobs";
|
||||||
wife_N = mkN feminine (mk2N "wife" "wives") ;
|
wife_N = mkN "sieva" ;
|
||||||
wind_N = regN "wind" ;
|
wind_N = mkN "vējš" ;
|
||||||
wing_N = regN "wing" ;
|
wing_N = mkN "spārns" ;
|
||||||
worm_N = regN "worm" ;
|
worm_N = mkN "tārps" ;
|
||||||
year_N = regN "year" ;
|
year_N = mkN "gads" ;
|
||||||
blow_V = IrregEng.blow_V ;
|
|
||||||
breathe_V = dirV2 (regV "breathe") ;
|
blow_V = mkV "pūst" "pūšu" "pūtu" ;
|
||||||
burn_V = IrregEng.burn_V ;
|
breathe_V = mkV2 (mkV "elpot" second_conjugation) acc_Prep;
|
||||||
dig_V = IrregEng.dig_V ;
|
burn_V = mkV "degt" "degu" "degu" ;
|
||||||
fall_V = IrregEng.fall_V ;
|
dig_V = mkV "rakt" "roku" "raku" ;
|
||||||
float_V = regV "float" ;
|
fall_V = mkV "krist" "krītu" "kritu" ;
|
||||||
flow_V = regV "flow" ;
|
float_V = mkV "peldēt" third_conjugation;
|
||||||
fly_V = IrregEng.fly_V ;
|
flow_V = mkV "plūst" "plūstu" "plūdu";
|
||||||
freeze_V = IrregEng.freeze_V ;
|
fly_V = mkV "lidot" second_conjugation ;
|
||||||
give_V3 = dirV3 give_V toP ;
|
freeze_V = mkV "sasalt" "sasalstu" "sasalu" ;
|
||||||
laugh_V = regV "laugh" ;
|
give_V3 = mkV3 (mkV "dot" "dodu" "devu") acc_Prep dat_Prep ; -- dot ko kam
|
||||||
lie_V = IrregEng.lie_V ;
|
laugh_V = mkV "smieties" "smejos" "smējos" ;
|
||||||
play_V = regV "play" ;
|
lie_V = mkV "gulties" "guļos" "gūlos" ;
|
||||||
sew_V = IrregEng.sew_V ;
|
play_V = mkV "spēlēt" second_conjugation;
|
||||||
sing_V = IrregEng.sing_V ;
|
sew_V = mkV "šūt" "šuju" "šuvu";
|
||||||
sit_V = IrregEng.sit_V ;
|
sing_V = mkV "dziedāt" third_conjugation ;
|
||||||
smell_V = regV "smell" ;
|
sit_V = mkV "sēdēt" third_conjugation ;
|
||||||
spit_V = IrregEng.spit_V ;
|
smell_V = mkV "smirdēt" third_conjugation;
|
||||||
stand_V = IrregEng.stand_V ;
|
spit_V = mkV "spļaut" "spļauju" "spļāvu" ;
|
||||||
swell_V = IrregEng.swell_V ;
|
stand_V = mkV "stāvēt" third_conjugation;
|
||||||
swim_V = IrregEng.swim_V ;
|
swell_V = mkV "piebriest" "piebriestu" "piebriedu" ;
|
||||||
think_V = IrregEng.think_V ;
|
swim_V = mkV "peldēt" third_conjugation;
|
||||||
turn_V = regV "turn" ;
|
think_V = mkV "domāt" second_conjugation;
|
||||||
vomit_V = mkV "vomit" "vomited" ;
|
turn_V = mkV "griezties" "griežos" "griezos";
|
||||||
|
vomit_V = mkV "vemt" "vemju" "vēmu" ;
|
||||||
|
|
||||||
bite_V2 = dirV2 IrregEng.bite_V ;
|
bite_V2 = mkV2 (mkV "kost" "kožu" "kodu") dat_Prep ;
|
||||||
count_V2 = dirV2 (regV "count") ;
|
count_V2 = mkV2 (mkV "skaitīt" third_conjugation) acc_Prep;
|
||||||
cut_V2 = dirV2 IrregEng.cut_V ;
|
cut_V2 = mkV2 (mkV "griezt" "griežu" "griezu") acc_Prep;
|
||||||
fear_V2 = dirV2 (regV "fear") ;
|
fear_V2 = mkV2 (mkV "baidīties" third_conjugation) from_Prep;
|
||||||
fight_V2 = dirV2 fight_V ;
|
fight_V2 = mkV2 (mkV "cīnīties" third_conjugation) with_Prep;
|
||||||
hit_V2 = dirV2 hit_V ;
|
hit_V2 = mkV2 (mkV "sist" "situ" "situ") dat_Prep; -- TODO - atkal valences, var arī akuzatīvu ar bik citu nozīmi
|
||||||
hold_V2 = dirV2 hold_V ;
|
hold_V2 = mkV2 (mkV "turēt" third_conjugation) acc_Prep ;
|
||||||
hunt_V2 = dirV2 (regV "hunt") ;
|
hunt_V2 = mkV2 (mkV "medīt" second_conjugation) acc_Prep;
|
||||||
kill_V2 = dirV2 (regV "kill") ;
|
kill_V2 = mkV2 (mkV "nogalināt" third_conjugation) acc_Prep;
|
||||||
pull_V2 = dirV2 (regV "pull") ;
|
pull_V2 = mkV2 (mkV "vilkt" "velku" "vilku") acc_Prep;
|
||||||
push_V2 = dirV2 (regV "push") ;
|
push_V2 = mkV2 (mkV "stumt" "stumju" "stūmu") acc_Prep;
|
||||||
rub_V2 = dirV2 (regDuplV "rub") ;
|
rub_V2 = mkV2 (mkV "berzt" "beržu" "berzu") acc_Prep;
|
||||||
scratch_V2 = dirV2 (regV "scratch") ;
|
scratch_V2 = mkV2 (mkV "kasīt" third_conjugation) acc_Prep;
|
||||||
split_V2 = dirV2 split_V ;
|
split_V2 = mkV2 (mkV "sadalīt" third_conjugation) acc_Prep;
|
||||||
squeeze_V2 = dirV2 (regV "squeeze") ;
|
squeeze_V2 = mkV2 (mkV "saspiest" "saspiežu" "saspiedu") acc_Prep;
|
||||||
stab_V2 = dirV2 (regDuplV "stab") ;
|
stab_V2 = mkV2 (mkV "sadurt" "saduru" "sadūru") acc_Prep;
|
||||||
suck_V2 = dirV2 (regV "suck") ;
|
suck_V2 = mkV2 (mkV "sūkt" "sūcu" "sūcu") acc_Prep;
|
||||||
throw_V2 = dirV2 throw_V ;
|
throw_V2 = mkV2 (mkV "mest" "metu" "metu") acc_Prep;
|
||||||
tie_V2 = dirV2 (regV "tie") ;
|
tie_V2 = mkV2 (mkV "piesiet" "piesienu" "piesēju") acc_Prep;
|
||||||
wash_V2 = dirV2 (regV "wash") ;
|
wash_V2 = mkV2 (mkV "mazgāt" second_conjugation) acc_Prep;
|
||||||
wipe_V2 = dirV2 (regV "wipe") ;
|
wipe_V2 = mkV2 (mkV "slaucīt" third_conjugation) acc_Prep;
|
||||||
|
|
||||||
-- other_A = regA "other" ;
|
-- other_A = regA "other" ;
|
||||||
|
|
||||||
grammar_N = regN "grammar" ;
|
grammar_N = mkN "gramatika" ;
|
||||||
language_N = regN "language" ;
|
language_N = mkN "valoda" ;
|
||||||
rule_N = regN "rule" ;
|
rule_N = mkN "likums" ;
|
||||||
|
|
||||||
-- added 4/6/2007
|
john_PN = mkPN "Jānis" ;
|
||||||
john_PN = mkPN (mkN masculine (mkN "John")) ;
|
|
||||||
question_N = regN "question" ;
|
question_N = mkN "jautājums" ;
|
||||||
ready_A = regA "ready" ;
|
ready_A = mkA "gatavs" ;
|
||||||
reason_N = regN "reason" ;
|
reason_N = mkN "iemesls" ;
|
||||||
today_Adv = mkAdv "today" ;
|
today_Adv = mkAdv "šodien" ;
|
||||||
uncertain_A = regA "uncertain" ;
|
uncertain_A = mkA "nepārliecināts" ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
aboutP = mkPrep "about" ;
|
par_Prep = mkPrep "par" Acc Dat;
|
||||||
|
|
||||||
|
{-
|
||||||
atP = mkPrep "at" ;
|
atP = mkPrep "at" ;
|
||||||
forP = mkPrep "for" ;
|
forP = mkPrep "for" ;
|
||||||
fromP = mkPrep "from" ;
|
fromP = mkPrep "from" ;
|
||||||
|
|||||||
@@ -4,147 +4,130 @@ flags optimize=all_subs ;
|
|||||||
lin
|
lin
|
||||||
|
|
||||||
UseN n = {s = \\_ => n.s ; g = n.g} ;
|
UseN n = {s = \\_ => n.s ; g = n.g} ;
|
||||||
|
UsePN pn = { s = pn.s ; a = agrgP3 Sg pn.g } ;
|
||||||
|
UsePron p = p ;
|
||||||
|
|
||||||
|
PredetNP pred np = {
|
||||||
|
s = \\c => pred.s ! (fromAgr np.a).g ++ np.s ! c ;
|
||||||
|
a = np.a
|
||||||
|
} ;
|
||||||
|
|
||||||
|
UseN2 n = {s = \\_ => n.s ; g = n.g};
|
||||||
|
UseN3 n = n;
|
||||||
|
|
||||||
|
ComplN2 f x = {
|
||||||
|
s = \\_,n,c => preOrPost f.isPre (f.p.s ++ x.s ! (f.p.c ! (fromAgr x.a).n)) (f.s ! n ! c);
|
||||||
|
g = f.g
|
||||||
|
} ;
|
||||||
|
ComplN3 f x = {
|
||||||
|
s = \\n,c => preOrPost f.isPre1 (f.p1.s ++ x.s ! (f.p1.c ! (fromAgr x.a).n)) (f.s ! n ! c);
|
||||||
|
g = f.g ;
|
||||||
|
p = f.p2 ;
|
||||||
|
isPre = f.isPre2
|
||||||
|
} ;
|
||||||
|
Use2N3 n = { s = n.s ; g = n.g ; p = n.p1 ; isPre = n.isPre1 };
|
||||||
|
Use3N3 n = { s = n.s ; g = n.g ; p = n.p2 ; isPre = n.isPre2 };
|
||||||
|
|
||||||
|
AdvNP np adv = {
|
||||||
|
s = \\c => np.s ! c ++ adv.s ;
|
||||||
|
a = np.a
|
||||||
|
} ;
|
||||||
|
RelNP np rs = {
|
||||||
|
s = \\c => np.s ! c ++ "," ++ rs.s ! np.a ;
|
||||||
|
a = np.a
|
||||||
|
} ;
|
||||||
|
|
||||||
DetCN det cn = {
|
DetCN det cn = {
|
||||||
s = \\c => det.s ! cn.g ! c ++ cn.s ! det.d ! det.n ! c ;
|
s = \\c => det.s ! cn.g ! c ++ cn.s ! det.d ! det.n ! c ;
|
||||||
g = cn.g ;
|
a = AgP3 det.n cn.g;
|
||||||
n = det.n ;
|
} ;
|
||||||
p = P3 ;
|
|
||||||
} ;
|
DetQuant quant num = {
|
||||||
|
s = \\g,c => quant.s ! g ! num.n ! c ++ num.s ! g ! c;
|
||||||
|
n = num.n ;
|
||||||
|
d = quant.d --FIXME - ja ir kârtas skaitïa vârds, tad tikai noteiktâs formas drîkst bût
|
||||||
|
} ;
|
||||||
|
|
||||||
|
DetQuantOrd quant num ord = {
|
||||||
|
s = \\g,c => quant.s ! g ! num.n ! c ++ num.s ! g ! c ++ ord.s ! g ! c;
|
||||||
|
n = num.n;
|
||||||
|
d = quant.d --FIXME - ja ir kârtas skaitïa vârds, tad tikai noteiktâs formas drîkst bût
|
||||||
|
} ;
|
||||||
|
|
||||||
|
DetNP det = {
|
||||||
|
s = \\c => det.s ! Masc ! c ;
|
||||||
|
a = AgP3 det.n Masc
|
||||||
|
} | {
|
||||||
|
s = \\c => det.s ! Fem ! c ;
|
||||||
|
a = AgP3 det.n Fem
|
||||||
|
};
|
||||||
|
|
||||||
|
AdjCN ap cn = {
|
||||||
|
s = \\d,n,c => ap.s ! d ! cn.g ! n ! c ++ cn.s ! d ! n ! c ;
|
||||||
|
g = cn.g
|
||||||
|
} ;
|
||||||
|
|
||||||
|
DefArt = {
|
||||||
|
s = \\_,_,_ =>[];
|
||||||
|
d = Def
|
||||||
|
} ;
|
||||||
|
|
||||||
|
IndefArt = {
|
||||||
|
s = \\_,_,_ => [];
|
||||||
|
d = Indef
|
||||||
|
} ;
|
||||||
|
|
||||||
|
PossPron p = {
|
||||||
|
s = p.possessive ;
|
||||||
|
d = Def ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
MassNP cn = {
|
||||||
|
s = cn.s ! Indef ! Sg ; -- FIXME a 'ðis alus'? der tak gan 'zaïð alus' gan 'zaïais alus'
|
||||||
|
a = AgP3 Sg cn.g
|
||||||
|
} ;
|
||||||
|
|
||||||
|
NumSg = {s = \\_,_ => []; n = Sg ; hasCard = False} ;
|
||||||
|
NumPl = {s = \\_,_ => []; n = Pl ; hasCard = False} ;
|
||||||
|
|
||||||
|
NumCard n = n ** {hasCard = True} ;
|
||||||
|
|
||||||
|
NumDigits n = {s = \\g,c => n.s ! NCard ; n = n.n} ;
|
||||||
|
OrdDigits n = {s = \\g,c => n.s ! NOrd} ;
|
||||||
|
|
||||||
|
NumNumeral numeral = {s = numeral.s ! NCard; n = numeral.n} ;
|
||||||
|
OrdNumeral numeral = {s = numeral.s ! NOrd} ;
|
||||||
|
|
||||||
|
OrdSuperl a = {s = \\g,c => a.s ! (AAdj Superl Def g Sg c) } ;
|
||||||
|
|
||||||
|
AdNum adn num = {s = \\g,c => adn.s ++ num.s!g!c ; n = num.n; hasCard = num.n} ;
|
||||||
|
|
||||||
|
AdvCN cn ad = {s = \\d,n,c => cn.s ! d ! n ! c ++ ad.s ; g = cn.g} ;
|
||||||
|
|
||||||
|
ApposCN cn np = { -- 'Pielikums'
|
||||||
|
s = \\d,n,c => case (fromAgr np.a).n of {
|
||||||
|
n => cn.s ! d ! n ! c ++ np.s ! c; -- FIXME - comparison not working
|
||||||
|
_ => NON_EXISTENT };
|
||||||
|
g = cn.g
|
||||||
|
} ;
|
||||||
|
|
||||||
|
RelCN cn rs = {
|
||||||
|
s = \\d, n,c => cn.s ! d ! n ! c ++ "," ++ rs.s ! AgP3 n cn.g ;
|
||||||
|
g = cn.g
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- FIXME - placeholder
|
||||||
|
SentCN cn sc = {s = \\_,_,_ => NON_EXISTENT ; g = cn.g};
|
||||||
|
PPartNP np v2 = {s = \\_ => NON_EXISTENT ; a = np.a};
|
||||||
|
|
||||||
{-
|
{-
|
||||||
DetCN det cn = {
|
TODO - ðim vajag -ts -ta divdabjus (+ noteiktâs formas tiem)
|
||||||
s = \\c => det.s ++ cn.s ! det.n ! c ;
|
|
||||||
a = agrgP3 det.n cn.g
|
|
||||||
} ;
|
|
||||||
|
|
||||||
UsePN pn = pn ** {a = agrgP3 Sg pn.g} ;
|
|
||||||
UsePron p = p ;
|
|
||||||
|
|
||||||
PredetNP pred np = {
|
|
||||||
s = \\c => pred.s ++ np.s ! c ;
|
|
||||||
a = np.a
|
|
||||||
} ;
|
|
||||||
|
|
||||||
PPartNP np v2 = {
|
PPartNP np v2 = {
|
||||||
s = \\c => np.s ! c ++ v2.s ! VPPart ;
|
s = \\c => np.s ! c ++ v2.s ! VPPart ;
|
||||||
a = np.a
|
a = np.a
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
RelNP np rs = {
|
|
||||||
s = \\c => np.s ! c ++ "," ++ rs.s ! np.a ;
|
|
||||||
a = np.a
|
|
||||||
} ;
|
|
||||||
|
|
||||||
AdvNP np adv = {
|
|
||||||
s = \\c => np.s ! c ++ adv.s ;
|
|
||||||
a = np.a
|
|
||||||
} ;
|
|
||||||
|
|
||||||
DetQuant quant num = {
|
|
||||||
s = quant.s ! num.hasCard ! num.n ++ num.s ! Nom;
|
|
||||||
sp = \\c => case num.hasCard of {
|
|
||||||
False => quant.sp ! num.hasCard ! num.n ! c ++ num.s ! Nom ;
|
|
||||||
True => quant.sp ! num.hasCard ! num.n ! Nom ++ num.s ! c
|
|
||||||
} ;
|
|
||||||
n = num.n
|
|
||||||
} ;
|
|
||||||
|
|
||||||
DetQuantOrd quant num ord = {
|
|
||||||
s = quant.s ! num.hasCard ! num.n ++ num.s ! Nom ++ ord.s ! Nom;
|
|
||||||
sp = \\c => quant.sp ! num.hasCard ! num.n ! Nom ++ num.s ! Nom ++ ord.s ! c ;
|
|
||||||
n = num.n
|
|
||||||
} ;
|
|
||||||
|
|
||||||
DetNP det = {
|
|
||||||
s = det.sp ;
|
|
||||||
a = agrP3 det.n
|
|
||||||
} ;
|
|
||||||
|
|
||||||
PossPron p = {
|
|
||||||
s = \\_,_ => p.s ! Gen ;
|
|
||||||
sp = \\_,_ => p.sp
|
|
||||||
} ;
|
|
||||||
|
|
||||||
NumSg = {s = \\c => []; n = Sg ; hasCard = False} ;
|
|
||||||
NumPl = {s = \\c => []; n = Pl ; hasCard = False} ;
|
|
||||||
---b NoOrd = {s = []} ;
|
|
||||||
|
|
||||||
NumCard n = n ** {hasCard = True} ;
|
|
||||||
|
|
||||||
NumDigits n = {s = n.s ! NCard ; n = n.n} ;
|
|
||||||
OrdDigits n = {s = n.s ! NOrd} ;
|
|
||||||
|
|
||||||
NumNumeral numeral = {s = numeral.s ! NCard; n = numeral.n} ;
|
|
||||||
OrdNumeral numeral = {s = numeral.s ! NOrd} ;
|
|
||||||
|
|
||||||
AdNum adn num = {s = \\c => adn.s ++ num.s!c ; n = num.n} ;
|
|
||||||
|
|
||||||
OrdSuperl a = {s = \\c => a.s ! AAdj Superl c } ;
|
|
||||||
|
|
||||||
DefArt = {
|
|
||||||
s = \\hasCard,n => artDef ;
|
|
||||||
sp = \\hasCard,n => case <n,hasCard> of {
|
|
||||||
<Sg,False> => table { Gen => "its"; _ => "it" } ;
|
|
||||||
<Pl,False> => table { Nom => "they"; Acc => "them"; Gen => "theirs" } ;
|
|
||||||
_ => \\c => artDef
|
|
||||||
}
|
|
||||||
} ;
|
|
||||||
|
|
||||||
IndefArt = {
|
|
||||||
s = \\hasCard,n => case <n,hasCard> of {
|
|
||||||
<Sg,False> => artIndef ;
|
|
||||||
_ => []
|
|
||||||
} ;
|
|
||||||
sp = \\hasCard,n => case <n,hasCard> of {
|
|
||||||
<Sg,False> => table { Gen => "one's"; _ => "one" };
|
|
||||||
<Pl,False> => table { Gen => "ones'"; _ => "ones" } ;
|
|
||||||
_ => \\c => []
|
|
||||||
}
|
|
||||||
} ;
|
|
||||||
|
|
||||||
MassNP cn = {
|
|
||||||
s = cn.s ! Sg ;
|
|
||||||
a = agrP3 Sg
|
|
||||||
} ;
|
|
||||||
|
|
||||||
UseN n = n ;
|
|
||||||
UseN2 n = n ;
|
|
||||||
---b UseN3 n = n ;
|
|
||||||
|
|
||||||
Use2N3 f = {
|
|
||||||
s = \\n,c => f.s ! n ! Nom ;
|
|
||||||
g = f.g ;
|
|
||||||
c2 = f.c2
|
|
||||||
} ;
|
|
||||||
|
|
||||||
Use3N3 f = {
|
|
||||||
s = \\n,c => f.s ! n ! Nom ;
|
|
||||||
g = f.g ;
|
|
||||||
c2 = f.c3
|
|
||||||
} ;
|
|
||||||
|
|
||||||
ComplN2 f x = {s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! c ; g = f.g} ;
|
|
||||||
ComplN3 f x = {
|
|
||||||
s = \\n,c => f.s ! n ! Nom ++ f.c2 ++ x.s ! c ;
|
|
||||||
g = f.g ;
|
|
||||||
c2 = f.c3
|
|
||||||
} ;
|
|
||||||
|
|
||||||
AdjCN ap cn = {
|
|
||||||
s = \\n,c => preOrPost ap.isPre (ap.s ! agrgP3 n cn.g) (cn.s ! n ! c) ;
|
|
||||||
g = cn.g
|
|
||||||
} ;
|
|
||||||
RelCN cn rs = {
|
|
||||||
s = \\n,c => cn.s ! n ! c ++ rs.s ! agrgP3 n cn.g ;
|
|
||||||
g = cn.g
|
|
||||||
} ;
|
|
||||||
AdvCN cn ad = {s = \\n,c => cn.s ! n ! c ++ ad.s ; g = cn.g} ;
|
|
||||||
|
|
||||||
SentCN cn sc = {s = \\n,c => cn.s ! n ! c ++ sc.s ; g = cn.g} ;
|
SentCN cn sc = {s = \\n,c => cn.s ! n ! c ++ sc.s ; g = cn.g} ;
|
||||||
|
|
||||||
ApposCN cn np = {s = \\n,c => cn.s ! n ! Nom ++ np.s ! c ; g = cn.g} ;
|
|
||||||
-}
|
-}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
concrete NumeralLav of Numeral = CatLav ** open ResLav in {
|
concrete NumeralLav of Numeral = CatLav ** open ResLav, ParadigmsLav in {
|
||||||
|
flags
|
||||||
|
coding = utf8 ;
|
||||||
{-
|
{-
|
||||||
lincat
|
lincat
|
||||||
Digit = {s : DForm => CardOrd => Case => Str} ;
|
Digit = {s : DForm => CardOrd => Case => Str} ;
|
||||||
@@ -6,22 +8,53 @@ lincat
|
|||||||
Sub100 = {s : CardOrd => Case => Str ; n : Number} ;
|
Sub100 = {s : CardOrd => Case => Str ; n : Number} ;
|
||||||
Sub1000 = {s : CardOrd => Case => Str ; n : Number} ;
|
Sub1000 = {s : CardOrd => Case => Str ; n : Number} ;
|
||||||
Sub1000000 = {s : CardOrd => Case => Str ; n : Number} ;
|
Sub1000000 = {s : CardOrd => Case => Str ; n : Number} ;
|
||||||
|
-}
|
||||||
|
lincat --TODO - formas, kas pieprasa ģenitīvu - tūkstotis grāmatu, trīs simti meiteņu
|
||||||
|
Digit = {s : DForm => CardOrd => Gender => Case => Str} ;
|
||||||
|
Sub10 = {s : CardOrd => Gender => Case => Str ; n : Number};
|
||||||
|
Sub100 = {s : CardOrd => Gender => Case => Str ; n : Number};
|
||||||
|
Sub1000 = {s : CardOrd => Gender => Case => Str ; n : Number};
|
||||||
|
Sub1000000 = {s : CardOrd => Gender => Case => Str ; n : Number};
|
||||||
|
|
||||||
lin num x = x ;
|
lin
|
||||||
lin n2 = let two = mkNum "two" "twelve" "twenty" "second" in
|
num x = x;
|
||||||
{s = \\f,o => case <f,o> of {
|
n2 = mkNum "divi" "otrais" Pl;
|
||||||
<teen,NOrd> => regGenitiveS "twelfth" ;
|
n3 = let trijs = mkNumSpec "trijs" "trešais" "trīs" "trīs" Pl in {
|
||||||
_ => two.s ! f ! o
|
s = \\f, o, g, c => case <f, o, g, c> of {
|
||||||
}
|
<unit, NCard, _, Nom> => "trīs";
|
||||||
} ;
|
<unit, NCard, _, Dat> => "trim";
|
||||||
|
<unit, NCard, _, Loc> => "trīs";
|
||||||
|
_ => trijs.s ! f ! o ! g ! c
|
||||||
|
}
|
||||||
|
} | {
|
||||||
|
s = \\f, o, g, c => case <f, o, g, c> of {
|
||||||
|
<unit, NCard, _, Nom> => "trīs";
|
||||||
|
_ => trijs.s ! f ! o ! g ! c
|
||||||
|
}
|
||||||
|
};
|
||||||
|
n4 = mkNum "četri" "ceturtais" Pl;
|
||||||
|
n5 = mkNum "pieci" "piektais" Pl;
|
||||||
|
n6 = mkNum "seši" "sestais" Pl;
|
||||||
|
n7 = mkNum "septiņi" "septītais" Pl;
|
||||||
|
n8 = mkNum "astoņi" "astotais" Pl;
|
||||||
|
n9 = mkNum "deviņi" "devītais" Pl;
|
||||||
|
|
||||||
|
pot01 = {s = viens.s ! unit} ** {n = Sg} ;
|
||||||
|
pot0 d = {s = d.s ! unit} ** {n = Pl} ;
|
||||||
|
pot110 = {s = viens.s ! ten} ** {n = Pl} ;
|
||||||
|
pot111 = {s = viens.s ! teen} ** {n = Pl} ;
|
||||||
|
pot1to19 d = {s = d.s ! teen} ** {n = Pl} ;
|
||||||
|
pot0as1 n = { s = n.s ; n = n.n } ;
|
||||||
|
pot1 d = {s = d.s ! ten} ** {n = Pl} ;
|
||||||
|
pot1plus d e = {s = \\o, g, c => d.s ! ten ! NCard ! Masc ! Nom ++ e.s ! o ! g ! c; n = e.n} ;
|
||||||
|
pot1as2 n = n ;
|
||||||
|
pot2 d = { s = \\o,g,c => d.s ! NCard ! Masc ! Nom ++ simts ! o ! g ! d.n ! c; n = Pl} ; --FIXME - nav īsti labi, kārtas skaitlim ir jābūt 'trīssimtais' utml
|
||||||
|
pot2plus d e = { s = \\o,g,c => d.s ! NCard ! Masc ! Nom ++ simts ! NCard ! Masc ! d.n ! Nom ++ e.s ! o ! g ! c; n = e.n} ;
|
||||||
|
pot2as3 n = n ;
|
||||||
|
pot3 d = { s = \\o,g,c => d.s ! NCard ! Masc ! Nom ++ tuukstotis ! o ! g ! d.n ! c; n = Pl} ;
|
||||||
|
pot3plus d e ={ s = \\o,g,c => d.s ! NCard ! Masc ! Nom ++ tuukstotis ! NCard ! Masc ! d.n ! Nom ++ e.s ! o ! g ! c; n = e.n} ;
|
||||||
|
|
||||||
lin n3 = mkNum "three" "thirteen" "thirty" "third" ;
|
{-
|
||||||
lin n4 = mkNum "four" "fourteen" "forty" "fourth" ;
|
|
||||||
lin n5 = mkNum "five" "fifteen" "fifty" "fifth" ;
|
|
||||||
lin n6 = regNum "six" ;
|
|
||||||
lin n7 = regNum "seven" ;
|
|
||||||
lin n8 = mkNum "eight" "eighteen" "eighty" "eighth" ;
|
|
||||||
lin n9 = mkNum "nine" "nineteen" "ninety" "ninth" ;
|
|
||||||
|
|
||||||
lin pot01 = mkNum "one" "eleven" "ten" "first" ** {n = Sg} ;
|
lin pot01 = mkNum "one" "eleven" "ten" "first" ** {n = Sg} ;
|
||||||
lin pot0 d = d ** {n = Pl} ;
|
lin pot0 d = d ** {n = Pl} ;
|
||||||
@@ -41,25 +74,25 @@ lin pot3 n = {
|
|||||||
s = \\o,c => n.s ! NCard ! Nom ++ mkCard o "thousand" ! c ; n = Pl} ;
|
s = \\o,c => n.s ! NCard ! Nom ++ mkCard o "thousand" ! c ; n = Pl} ;
|
||||||
lin pot3plus n m = {
|
lin pot3plus n m = {
|
||||||
s = \\o,c => n.s ! NCard ! Nom ++ "thousand" ++ m.s ! o ! c; n = Pl} ;
|
s = \\o,c => n.s ! NCard ! Nom ++ "thousand" ++ m.s ! o ! c; n = Pl} ;
|
||||||
|
-}
|
||||||
|
|
||||||
-- numerals as sequences of digits
|
-- numerals as sequences of digits
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
Dig = TDigit ;
|
Dig = {n : Number; s : CardOrd => Str };
|
||||||
|
|
||||||
lin
|
lin
|
||||||
IDig d = d ** {tail = T1} ;
|
IDig d = d ;
|
||||||
|
|
||||||
IIDig d i = {
|
IIDig d i = {
|
||||||
s = \\o,c => d.s ! NCard ! Nom ++ commaIf i.tail ++ i.s ! o ! c ;
|
s = \\o => d.s ! NCard ++ i.s ! o ;
|
||||||
n = Pl ;
|
n = Pl ; --FIXME 1 cilvēks 11 cilvēki 21 cilvēks ...
|
||||||
tail = inc i.tail
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
D_0 = mkDig "0" ;
|
D_0 = mkDig "0" ;
|
||||||
D_1 = mk3Dig "1" "1st" Sg ;
|
D_1 = mk2Dig "1" Sg ;
|
||||||
D_2 = mk2Dig "2" "2nd" ;
|
D_2 = mkDig "2" ;
|
||||||
D_3 = mk2Dig "3" "3rd" ;
|
D_3 = mkDig "3" ;
|
||||||
D_4 = mkDig "4" ;
|
D_4 = mkDig "4" ;
|
||||||
D_5 = mkDig "5" ;
|
D_5 = mkDig "5" ;
|
||||||
D_6 = mkDig "6" ;
|
D_6 = mkDig "6" ;
|
||||||
@@ -68,28 +101,11 @@ lin pot3plus n m = {
|
|||||||
D_9 = mkDig "9" ;
|
D_9 = mkDig "9" ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
commaIf : DTail -> Str = \t -> case t of {
|
mkDig : Str -> Dig = \c -> mk2Dig c Pl ;
|
||||||
T3 => "," ;
|
|
||||||
_ => []
|
|
||||||
} ;
|
|
||||||
|
|
||||||
inc : DTail -> DTail = \t -> case t of {
|
mk2Dig : Str -> Number -> Dig = \c,n -> lin Dig {
|
||||||
T1 => T2 ;
|
s = table {NCard => c ; NOrd => c+"."} ;
|
||||||
T2 => T3 ;
|
|
||||||
T3 => T1
|
|
||||||
} ;
|
|
||||||
|
|
||||||
mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c o Pl ;
|
|
||||||
mkDig : Str -> TDigit = \c -> mk2Dig c (c + "th") ;
|
|
||||||
|
|
||||||
mk3Dig : Str -> Str -> Number -> TDigit = \c,o,n -> {
|
|
||||||
s = table {NCard => regGenitiveS c ; NOrd => regGenitiveS o} ;
|
|
||||||
n = n
|
n = n
|
||||||
} ;
|
|
||||||
|
|
||||||
TDigit = {
|
|
||||||
n : Number ;
|
|
||||||
s : CardOrd => Case => Str
|
|
||||||
} ;
|
} ;
|
||||||
-}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,19 @@
|
|||||||
-- Latvian adjective paradigms - by Normunds Grūzītis; copied off mini-grammar as of 2011-07-12
|
-- Latvian adjective paradigms - by Normunds Grūzītis; copied off mini-grammar as of 2011-07-12
|
||||||
|
|
||||||
resource ParadigmsAdjectivesLav = open
|
resource ParadigmsAdjectivesLav = open
|
||||||
(Predef=Predef),
|
(Predef=Predef),
|
||||||
Prelude,
|
Prelude,
|
||||||
ResLav,
|
ResLav,
|
||||||
CatLav
|
CatLav
|
||||||
in {
|
in {
|
||||||
|
|
||||||
flags
|
flags
|
||||||
coding = utf8;
|
coding = utf8;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
Adj : Type = {s : Degree => Definite => Gender => Number => Case => Str} ;
|
--Adj : Type = {s : Degree => Definite => Gender => Number => Case => Str} ;
|
||||||
|
Adj : Type = {s : AForm => Str} ;
|
||||||
|
|
||||||
-- ADJECTIVES
|
-- ADJECTIVES
|
||||||
|
|
||||||
-- TODO: Parameters and paradigms should be redesigned due to the many NON_EXISTENT forms..?
|
-- TODO: Parameters and paradigms should be redesigned due to the many NON_EXISTENT forms..?
|
||||||
@@ -38,34 +39,45 @@ oper
|
|||||||
-- Indeclinable adjective: theoretically, any #vowel ending
|
-- Indeclinable adjective: theoretically, any #vowel ending
|
||||||
mkAdjective_Indecl : Str -> Adj = \lemma -> {
|
mkAdjective_Indecl : Str -> Adj = \lemma -> {
|
||||||
s = table{
|
s = table{
|
||||||
Posit => \\_,_,_,_ => lemma ;
|
AAdj Superl Indef _ _ _ => NON_EXISTENT;
|
||||||
Compar => \\_,_,_,_ => lemma ;
|
AAdj _ _ _ _ _ => lemma ;
|
||||||
Superl => table {Indef => \\_,_,_ => NON_EXISTENT ; Def => \\_,_,_ => lemma}
|
AAdv d => mkAdjective_Adverb lemma ! d-- TODO - notestēt šādu keisu
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Qualitative adjective: -s, -š
|
-- Qualitative adjective: -s, -š
|
||||||
mkAdjective_Qual : Str -> Adj = \lemma -> {
|
mkAdjective_Qual : Str -> Adj = \lemma -> {
|
||||||
s = table {
|
s = table {
|
||||||
Posit => table {Indef => mkAdjective_Pos lemma Indef ; Def => mkAdjective_Pos lemma Def} ;
|
AAdj Posit d g n c => mkAdjective_Pos lemma d ! g ! n ! c;
|
||||||
Compar => table {Indef => mkAdjective_Comp lemma Indef ; Def => mkAdjective_Comp lemma Def} ;
|
AAdj Compar d g n c => mkAdjective_Comp lemma d ! g ! n ! c;
|
||||||
Superl => table {Indef => \\_,_,_ => NON_EXISTENT ; Def => mkAdjective_Sup lemma}
|
AAdj Superl Def g n c => mkAdjective_Sup lemma ! g ! n ! c;
|
||||||
|
AAdj Superl Indef _ _ _ => NON_EXISTENT;
|
||||||
|
AAdv d => mkAdjective_Adverb lemma ! d
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Relative adjective: -ais (Def only); -s, -š (Indef and Def)
|
-- Relative adjective: -ais (Def only); -s, -š (Indef and Def)
|
||||||
mkAdjective_Rel : Str -> Adj = \lemma -> {
|
mkAdjective_Rel : Str -> Adj = \lemma -> {
|
||||||
s = table {
|
s = table {
|
||||||
Posit => case lemma of {
|
AAdj Posit Def g n c => mkAdjective_Pos lemma Def ! g ! n ! c;
|
||||||
s + "ais" => table {Indef => \\_,_,_ => NON_EXISTENT ; Def => mkAdjective_Pos lemma Def} ;
|
AAdj Posit Indef g n c => case lemma of {
|
||||||
_ => table {Indef => mkAdjective_Pos lemma Indef ; Def => mkAdjective_Pos lemma Def}
|
s + "ais" => NON_EXISTENT ;
|
||||||
|
_ => mkAdjective_Pos lemma Indef ! g ! n ! c
|
||||||
} ;
|
} ;
|
||||||
Compar => table {Indef => \\_,_,_ => NON_EXISTENT ; Def => \\_,_,_ => NON_EXISTENT} ;
|
AAdj _ _ _ _ _ => NON_EXISTENT ;
|
||||||
Superl => table {Indef => \\_,_,_ => NON_EXISTENT ; Def => \\_,_,_ => NON_EXISTENT}
|
AAdv d => mkAdjective_Adverb lemma ! d
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mkAdjective_Participle : Verb -> Adj = \v -> {
|
||||||
|
s = table {
|
||||||
|
AAdj Posit Indef g n c => v.s ! Pos !(Participle g n c); --FIXME - iznest polaritāti ārpusē lai ir noliegtie kā atsevišķi īpašībasvārdi
|
||||||
|
_ => NON_EXISTENT --FIXME - salikt arī tās divdabja formas
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
-- Positive degree: -s, -š (Indef and Def); -ais (Def only)
|
-- Positive degree: -s, -š (Indef and Def); -ais (Def only)
|
||||||
|
-- TODO - atsaukties uz lietvārdu locīšanas tabulām?
|
||||||
mkAdjective_Pos : Str -> Definite -> Gender => Number => Case => Str = \lemma,defin ->
|
mkAdjective_Pos : Str -> Definite -> Gender => Number => Case => Str = \lemma,defin ->
|
||||||
let stem : Str = case lemma of {
|
let stem : Str = case lemma of {
|
||||||
s + "ais" => s ;
|
s + "ais" => s ;
|
||||||
@@ -79,14 +91,16 @@ oper
|
|||||||
Gen => stem + "a" ;
|
Gen => stem + "a" ;
|
||||||
Dat => stem + "am" ;
|
Dat => stem + "am" ;
|
||||||
Acc => stem + "u" ;
|
Acc => stem + "u" ;
|
||||||
Loc => stem + "ā"
|
Loc => stem + "ā" ;
|
||||||
|
Voc => NON_EXISTENT
|
||||||
} ;
|
} ;
|
||||||
Pl => table {
|
Pl => table {
|
||||||
Nom => stem + "i" ;
|
Nom => stem + "i" ;
|
||||||
Gen => stem + "us" ;
|
Gen => stem + "u" ;
|
||||||
Dat => stem + "iem" ;
|
Dat => stem + "iem" ;
|
||||||
Acc => stem + "us" ;
|
Acc => stem + "us" ;
|
||||||
Loc => stem + "os"
|
Loc => stem + "os" ;
|
||||||
|
Voc => NON_EXISTENT
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
Fem => table {
|
Fem => table {
|
||||||
@@ -95,14 +109,16 @@ oper
|
|||||||
Gen => stem + "as" ;
|
Gen => stem + "as" ;
|
||||||
Dat => stem + "ai" ;
|
Dat => stem + "ai" ;
|
||||||
Acc => stem + "u" ;
|
Acc => stem + "u" ;
|
||||||
Loc => stem + "ā"
|
Loc => stem + "ā" ;
|
||||||
|
Voc => NON_EXISTENT
|
||||||
} ;
|
} ;
|
||||||
Pl => table {
|
Pl => table {
|
||||||
Nom => stem + "as" ;
|
Nom => stem + "as" ;
|
||||||
Gen => stem + "u" ;
|
Gen => stem + "u" ;
|
||||||
Dat => stem + "ām" ;
|
Dat => stem + "ām" ;
|
||||||
Acc => stem + "as" ;
|
Acc => stem + "as" ;
|
||||||
Loc => stem + "ās"
|
Loc => stem + "ās" ;
|
||||||
|
Voc => NON_EXISTENT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
@@ -113,14 +129,16 @@ oper
|
|||||||
Gen => stem + "ā" ;
|
Gen => stem + "ā" ;
|
||||||
Dat => case stem of {s + "ēj" => stem + "am" ; _ => stem + "ajam"} ;
|
Dat => case stem of {s + "ēj" => stem + "am" ; _ => stem + "ajam"} ;
|
||||||
Acc => stem + "o" ;
|
Acc => stem + "o" ;
|
||||||
Loc => case stem of {s + "ēj" => stem + "ā" ; _ => stem + "ajā"}
|
Loc => case stem of {s + "ēj" => stem + "ā" ; _ => stem + "ajā"} ;
|
||||||
|
Voc => stem + "ais"
|
||||||
} ;
|
} ;
|
||||||
Pl => table {
|
Pl => table {
|
||||||
Nom => stem + "ie" ;
|
Nom => stem + "ie" ;
|
||||||
Gen => stem + "o" ;
|
Gen => stem + "o" ;
|
||||||
Dat => case stem of {s + "ēj" => stem + "iem" ; _ => stem + "ajiem"} ;
|
Dat => case stem of {s + "ēj" => stem + "iem" ; _ => stem + "ajiem"} ;
|
||||||
Acc => stem + "os" ;
|
Acc => stem + "os" ;
|
||||||
Loc => case stem of {s + "ēj" => stem + "os" ; _ => stem + "ajos"}
|
Loc => case stem of {s + "ēj" => stem + "os" ; _ => stem + "ajos"} ;
|
||||||
|
Voc => stem + "ie"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
Fem => table {
|
Fem => table {
|
||||||
@@ -129,14 +147,16 @@ oper
|
|||||||
Gen => stem + "ās" ;
|
Gen => stem + "ās" ;
|
||||||
Dat => case stem of {s + "ēj" => stem + "ai" ; _ => stem + "ajai"} ;
|
Dat => case stem of {s + "ēj" => stem + "ai" ; _ => stem + "ajai"} ;
|
||||||
Acc => stem + "o" ;
|
Acc => stem + "o" ;
|
||||||
Loc => case stem of {s + "ēj" => stem + "ā" ; _ => stem + "ajā"}
|
Loc => case stem of {s + "ēj" => stem + "ā" ; _ => stem + "ajā"} ;
|
||||||
|
Voc => stem + "ā"
|
||||||
} ;
|
} ;
|
||||||
Pl => table {
|
Pl => table {
|
||||||
Nom => stem + "ās" ;
|
Nom => stem + "ās" ;
|
||||||
Gen => stem + "o" ;
|
Gen => stem + "o" ;
|
||||||
Dat => case stem of {s + "ēj" => stem + "ām" ; _ => stem + "ajām"} ;
|
Dat => case stem of {s + "ēj" => stem + "ām" ; _ => stem + "ajām"} ;
|
||||||
Acc => stem + "ās" ;
|
Acc => stem + "ās" ;
|
||||||
Loc => case stem of {s + "ēj" => stem + "ās" ; _ => stem + "ajās"}
|
Loc => case stem of {s + "ēj" => stem + "ās" ; _ => stem + "ajās"} ;
|
||||||
|
Voc => stem + "ās"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -153,14 +173,16 @@ oper
|
|||||||
Gen => stem + "āka" ;
|
Gen => stem + "āka" ;
|
||||||
Dat => stem + "ākam" ;
|
Dat => stem + "ākam" ;
|
||||||
Acc => stem + "āku" ;
|
Acc => stem + "āku" ;
|
||||||
Loc => stem + "ākā"
|
Loc => stem + "ākā" ;
|
||||||
|
Voc => NON_EXISTENT
|
||||||
} ;
|
} ;
|
||||||
Pl => table {
|
Pl => table {
|
||||||
Nom => stem + "āki" ;
|
Nom => stem + "āki" ;
|
||||||
Gen => stem + "āku" ;
|
Gen => stem + "āku" ;
|
||||||
Dat => stem + "ākiem" ;
|
Dat => stem + "ākiem" ;
|
||||||
Acc => stem + "ākus" ;
|
Acc => stem + "ākus" ;
|
||||||
Loc => stem + "ākos"
|
Loc => stem + "ākos" ;
|
||||||
|
Voc => NON_EXISTENT
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
Fem => table {
|
Fem => table {
|
||||||
@@ -169,14 +191,16 @@ oper
|
|||||||
Gen => stem + "ākas" ;
|
Gen => stem + "ākas" ;
|
||||||
Dat => stem + "ākai" ;
|
Dat => stem + "ākai" ;
|
||||||
Acc => stem + "āku" ;
|
Acc => stem + "āku" ;
|
||||||
Loc => stem + "ākā"
|
Loc => stem + "ākā" ;
|
||||||
|
Voc => NON_EXISTENT
|
||||||
} ;
|
} ;
|
||||||
Pl => table {
|
Pl => table {
|
||||||
Nom => stem + "ākas" ;
|
Nom => stem + "ākas" ;
|
||||||
Gen => stem + "āku" ;
|
Gen => stem + "āku" ;
|
||||||
Dat => stem + "ākām" ;
|
Dat => stem + "ākām" ;
|
||||||
Acc => stem + "ākas" ;
|
Acc => stem + "ākas" ;
|
||||||
Loc => stem + "ākās"
|
Loc => stem + "ākās" ;
|
||||||
|
Voc => NON_EXISTENT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
@@ -187,14 +211,16 @@ oper
|
|||||||
Gen => stem + "ākā" ;
|
Gen => stem + "ākā" ;
|
||||||
Dat => stem + "ākajam" ;
|
Dat => stem + "ākajam" ;
|
||||||
Acc => stem + "āko" ;
|
Acc => stem + "āko" ;
|
||||||
Loc => stem + "ākajā"
|
Loc => stem + "ākajā" ;
|
||||||
|
Voc => stem + "ākais"
|
||||||
} ;
|
} ;
|
||||||
Pl => table {
|
Pl => table {
|
||||||
Nom => stem + "ākie" ;
|
Nom => stem + "ākie" ;
|
||||||
Gen => stem + "āko" ;
|
Gen => stem + "āko" ;
|
||||||
Dat => stem + "ākajiem" ;
|
Dat => stem + "ākajiem" ;
|
||||||
Acc => stem + "ākos" ;
|
Acc => stem + "ākos" ;
|
||||||
Loc => stem + "ākajos"
|
Loc => stem + "ākajos" ;
|
||||||
|
Voc => stem + "ākie"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
Fem => table {
|
Fem => table {
|
||||||
@@ -203,14 +229,16 @@ oper
|
|||||||
Gen => stem + "ākās" ;
|
Gen => stem + "ākās" ;
|
||||||
Dat => stem + "ākajai" ;
|
Dat => stem + "ākajai" ;
|
||||||
Acc => stem + "āko" ;
|
Acc => stem + "āko" ;
|
||||||
Loc => stem + "ākajā"
|
Loc => stem + "ākajā" ;
|
||||||
|
Voc => stem + "ākā"
|
||||||
} ;
|
} ;
|
||||||
Pl => table {
|
Pl => table {
|
||||||
Nom => stem + "ākās" ;
|
Nom => stem + "ākās" ;
|
||||||
Gen => stem + "āko" ;
|
Gen => stem + "āko" ;
|
||||||
Dat => stem + "ākajām" ;
|
Dat => stem + "ākajām" ;
|
||||||
Acc => stem + "ākās" ;
|
Acc => stem + "ākās" ;
|
||||||
Loc => stem + "ākajās"
|
Loc => stem + "ākajās" ;
|
||||||
|
Voc => stem + "ākās"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -218,5 +246,16 @@ oper
|
|||||||
|
|
||||||
-- Superlative degree: Qual only, Def only
|
-- Superlative degree: Qual only, Def only
|
||||||
mkAdjective_Sup : Str -> Gender => Number => Case => Str = \lemma ->
|
mkAdjective_Sup : Str -> Gender => Number => Case => Str = \lemma ->
|
||||||
\\g,n,c => "vis" + (mkAdjective_Comp lemma Def) ! g ! n ! c ;
|
\\g,n,c => "vis" + (mkAdjective_Comp lemma Def) ! g ! n ! c ;
|
||||||
|
|
||||||
|
-- Adverbial form, all 3 degrees
|
||||||
|
mkAdjective_Adverb : Str -> Degree => Str = \lemma ->
|
||||||
|
let stem : Str = case lemma of {
|
||||||
|
s + "ais" => s ;
|
||||||
|
_ => Predef.tk 1 lemma
|
||||||
|
} in table {
|
||||||
|
Posit => stem + "i";
|
||||||
|
Compar => stem + "āk";
|
||||||
|
Superl => "vis" + stem + "āk"
|
||||||
|
};
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -41,7 +41,13 @@ flags
|
|||||||
oper
|
oper
|
||||||
second_conjugation : VerbConj = C2 ;
|
second_conjugation : VerbConj = C2 ;
|
||||||
third_conjugation : VerbConj = C3 ;
|
third_conjugation : VerbConj = C3 ;
|
||||||
|
|
||||||
|
nominative : Case = Nom ;
|
||||||
|
genitive : Case = Gen ;
|
||||||
|
dative : Case = Dat ;
|
||||||
|
accusative : Case = Acc ;
|
||||||
|
locative : Case = Loc ;
|
||||||
|
|
||||||
mkN = overload {
|
mkN = overload {
|
||||||
mkN : (lemma : Str) -> N = \l -> lin N (mkNoun l) ;
|
mkN : (lemma : Str) -> N = \l -> lin N (mkNoun l) ;
|
||||||
|
|
||||||
@@ -55,17 +61,134 @@ oper
|
|||||||
|
|
||||||
mkN : (lemma : Str) -> Gender -> NounDecl -> Bool -> N = \l,g,d,p -> lin N (mkNounByGendDeclPal l g d p) ;
|
mkN : (lemma : Str) -> Gender -> NounDecl -> Bool -> N = \l,g,d,p -> lin N (mkNounByGendDeclPal l g d p) ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
mkPN = overload {
|
||||||
|
mkN : (lemma : Str) -> PN = \l -> lin PN (mkProperNoun l Sg) ;
|
||||||
|
mkN : (lemma : Str) -> Number -> PN = \l,n -> lin PN (mkProperNoun l n) ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkN2 = overload {
|
||||||
|
mkN2 : N -> Prep -> N2 = \n,p -> lin N2 n ** {p = p; isPre = False};
|
||||||
|
mkN2 : N -> Prep -> Bool -> N2 = \n,p,isPre -> lin N2 n ** {p = p; isPre = isPre};
|
||||||
|
} ;
|
||||||
|
mkN3 : N -> Prep -> Prep -> N3 = \n,p1,p2 -> lin N3 n ** {p1 = p1; p2 = p2; isPre1 = False; isPre2 = False};
|
||||||
|
|
||||||
mkA = overload {
|
mkA = overload {
|
||||||
mkA : (lemma : Str) -> A = \s -> lin A (mkAdjective s) ;
|
mkA : (lemma : Str) -> A = \s -> lin A (mkAdjective s) ;
|
||||||
mkA : (lemma : Str) -> AdjType -> A = \s,t -> lin A (mkAdjectiveByType s t) ;
|
mkA : (lemma : Str) -> AdjType -> A = \s,t -> lin A (mkAdjectiveByType s t) ;
|
||||||
|
mkA : (v : Verb) -> A = \v -> lin A (mkAdjective_Participle v) ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
mkA2 : A -> Prep -> A2 = \a,p -> lin A2 (a ** {p = p}); -- precējies ar ...
|
||||||
|
|
||||||
|
mkAS : A -> AS =\a -> lin A a ;
|
||||||
|
mkA2S : A -> Prep -> A2S =\a,p -> lin A2 (a ** {p = p});
|
||||||
|
mkAV : A -> AV = \a -> lin A a ;
|
||||||
|
mkA2V : A -> Prep -> A2V = \a,p -> lin A2 (a ** {p = p} );
|
||||||
|
|
||||||
|
AS, AV : Type = {s : AForm => Str } ;
|
||||||
|
A2S, A2V : Type = {s : AForm => Str; p: Prep};
|
||||||
|
|
||||||
mkV = overload {
|
mkV = overload {
|
||||||
mkV : (lemma : Str) -> V = \l -> lin V (mkVerb_Irreg l) ;
|
mkV : (lemma : Str) -> V = \l -> lin V (mkVerb_Irreg l) ;
|
||||||
mkV : (lemma : Str) -> VerbConj -> V = \l,c -> lin V (mkVerb l c) ;
|
mkV : (lemma : Str) -> VerbConj -> V = \l,c -> lin V (mkVerb l c) ;
|
||||||
mkV : (lemma : Str) -> Str -> Str -> V = \l1,l2,l3 -> lin V (mkVerbC1 l1 l2 l3) ;
|
mkV : (lemma : Str) -> Str -> Str -> V = \l1,l2,l3 -> lin V (mkVerbC1 l1 l2 l3) ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
mkV2 : V -> Prep -> V2 = \v,p -> lin V2 v ** {p = p};
|
||||||
|
mkVS : V -> Subj -> VS = \v,s -> lin VS v ** {subj = s};
|
||||||
|
mkV2S : V -> Prep -> Subj -> V2S = \v,p,s -> lin V2S v ** {p = p; subj = s};
|
||||||
|
mkVA : V -> VA = \v -> lin VA v;
|
||||||
|
mkV2A : V -> Prep -> V2A = \v,p -> lin V2A v ** {p = p};
|
||||||
|
mkVQ : V -> VQ = \v -> lin VQ v;
|
||||||
|
mkV2Q : V -> Prep -> V2Q = \v,p -> lin V2Q v ** {p = p};
|
||||||
|
mkVV : V -> VV = \v -> lin VV v ;
|
||||||
|
mkV2V : V -> Prep -> V2V = \v,p -> lin V2V v ** {p = p};
|
||||||
|
mkV3 : V -> Prep -> Prep -> V3 = \v,p1,p2 -> lin V3 v ** {p1 = p1; p2 = p2};
|
||||||
|
|
||||||
|
mkCAdv : Str -> Str -> Degree -> CAdv = \s,p,d -> {s = s ; p = p ; d = d; lock_CAdv = <>};
|
||||||
|
|
||||||
|
mkPrep = overload {
|
||||||
|
mkPrep : Str -> Case -> Case -> Prep = \prep, sg, pl -> lin Prep { s = prep; c = table { Sg => sg; Pl => pl } };
|
||||||
|
mkPrep : Case -> Prep = \c -> lin Prep { s = []; c = table { _ => c } } ;
|
||||||
|
};
|
||||||
|
|
||||||
|
-- empty fake prepositions for valences / rections that are expressed by simple cases without any prepositions
|
||||||
|
nom_Prep = mkPrep Nom;
|
||||||
|
gen_Prep = mkPrep Gen;
|
||||||
|
dat_Prep = mkPrep Dat;
|
||||||
|
acc_Prep = mkPrep Acc;
|
||||||
|
loc_Prep = mkPrep Loc;
|
||||||
|
|
||||||
|
mkAdv : Str -> Adv = \x -> lin Adv (ss x) ;
|
||||||
|
mkAdV : Str -> AdV = \x -> lin AdV (ss x) ;
|
||||||
|
mkAdA : Str -> AdA = \x -> lin AdA (ss x) ;
|
||||||
|
mkAdN : Str -> AdN = \x -> lin AdN (ss x) ;
|
||||||
|
|
||||||
|
mkConj = overload {
|
||||||
|
mkConj : Str -> Conj = \y -> mk2Conj [] y Pl ;
|
||||||
|
mkConj : Str -> Number -> Conj = \y,n -> mk2Conj [] y n ;
|
||||||
|
mkConj : Str -> Str -> Conj = \x,y -> mk2Conj x y Pl ;
|
||||||
|
mkConj : Str -> Str -> Number -> Conj = mk2Conj ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mk2Conj : Str -> Str -> Number -> Conj = \x,y,n ->
|
||||||
|
lin Conj (sd2 x y ** {n = n}) ;
|
||||||
|
|
||||||
|
viens = mkNumSpec "viens" "pirmais" "vien" "" Sg;
|
||||||
|
mkNum : Str -> Str -> Number -> { s : DForm => CardOrd => Gender => Case => Str } = \pieci,piektais,n -> mkNumSpec pieci piektais (cutStem pieci) (cutStem pieci) n;
|
||||||
|
|
||||||
|
mkNumSpec : Str -> Str -> Str -> Str -> Number -> { s : DForm => CardOrd => Gender => Case => Str } = \pieci,piektais,stem_teen,stem_ten,n -> let
|
||||||
|
masc = mkNoun_D1 pieci ;
|
||||||
|
fem = mkNoun_D4 pieci Fem ;
|
||||||
|
ord = mkAdjective_Pos piektais Def ;
|
||||||
|
padsmit = mkAdjective_Pos (stem_teen+"padsmitais") Def ;
|
||||||
|
desmit = mkAdjective_Pos (stem_ten+"desmitais") Def ;
|
||||||
|
in {
|
||||||
|
s = table {
|
||||||
|
unit => table {
|
||||||
|
NCard => table {
|
||||||
|
Masc => table { c => masc.s ! n ! c } ;
|
||||||
|
Fem => table { c => fem.s ! n ! c }
|
||||||
|
} ;
|
||||||
|
NOrd => table {
|
||||||
|
g => table { c => ord ! g ! Sg ! c } --FIXME - pazaudējam kārtas skaitļu daudzskaitli - 'mēs palikām piektie'
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
teen => table {
|
||||||
|
NCard => table { g => table { c => stem_teen + "padsmit" } } ;
|
||||||
|
NOrd => table { g => table { c => padsmit ! g ! Sg ! c } }
|
||||||
|
} ;
|
||||||
|
ten => table {
|
||||||
|
NCard => table { g => table { c => stem_ten + "desmit" } } ;
|
||||||
|
NOrd => table { g => table { c => desmit ! g ! Sg ! c } }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
simts : CardOrd => Gender => Number => Case => Str = let
|
||||||
|
card = mkNoun_D1 "simts" ;
|
||||||
|
ord = mkAdjective_Pos "simtais" Def ;
|
||||||
|
in table {
|
||||||
|
NCard => table {
|
||||||
|
_ => table { n => table { c => card.s ! n ! c }}
|
||||||
|
} ;
|
||||||
|
NOrd => table {
|
||||||
|
g => table { n => table { c => ord ! g ! n ! c }}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
tuukstotis : CardOrd => Gender => Number => Case => Str = let
|
||||||
|
card = mkNoun_D2 "tūkstotis" True;
|
||||||
|
ord = mkAdjective_Pos "tūkstošais" Def ;
|
||||||
|
in table {
|
||||||
|
NCard => table {
|
||||||
|
_ => table { n => table { c => card.s ! n ! c }}
|
||||||
|
} ;
|
||||||
|
NOrd => table {
|
||||||
|
g => table { n => table { c => ord ! g ! n ! c }}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
{-
|
{-
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +1,53 @@
|
|||||||
-- Latvian noun paradigms - by Normunds Grūzītis; copied off mini-grammar as of 2011-07-12
|
-- Latvian noun paradigms - by Normunds Grūzītis & Pēteris Paikens
|
||||||
|
|
||||||
resource ParadigmsNounsLav = open
|
resource ParadigmsNounsLav = open
|
||||||
(Predef=Predef),
|
(Predef=Predef),
|
||||||
Prelude,
|
Prelude,
|
||||||
ResLav,
|
ResLav,
|
||||||
CatLav
|
CatLav
|
||||||
in {
|
in {
|
||||||
|
|
||||||
flags
|
flags
|
||||||
coding = utf8;
|
coding = utf8 ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
Noun : Type = {s : Number => Case => Str ; g : Gender} ;
|
Noun : Type = {s : Number => Case => Str ; g : Gender} ;
|
||||||
|
ProperNoun : Type = {s : Case => Str; g : Gender; n : Number} ;
|
||||||
masculine : Gender = Masc ;
|
|
||||||
feminine : Gender = Fem ;
|
|
||||||
|
|
||||||
-- NOUNS
|
masculine : Gender = Masc ;
|
||||||
|
feminine : Gender = Fem ;
|
||||||
|
|
||||||
-- No parameters - default assumptions (gender, declension, palatalization)
|
-- No parameters - default assumptions (gender, declension, palatalization)
|
||||||
mkNoun : Str -> Noun = \lemma ->
|
mkNoun : Str -> Noun = \lemma ->
|
||||||
mkNounByPal lemma True ;
|
mkNounByPal lemma True ;
|
||||||
|
|
||||||
|
mkProperNoun : Str -> Number -> ProperNoun = \lemma,number ->
|
||||||
|
let noun = mkNoun lemma
|
||||||
|
in {
|
||||||
|
s = table {
|
||||||
|
c => noun.s ! number ! c
|
||||||
|
} ;
|
||||||
|
g = noun.g ;
|
||||||
|
n = number
|
||||||
|
} ;
|
||||||
|
|
||||||
|
{-
|
||||||
|
mkCardinalNumeral : Str -> CardinalNumeral = \lemma ->
|
||||||
|
let
|
||||||
|
stem : Str = cutStem lemma;
|
||||||
|
masc = mkNoun_D1 lemma;
|
||||||
|
fem = mkNoun_D4 lemma + "a" Fem
|
||||||
|
in {
|
||||||
|
s = table {
|
||||||
|
Masc => table {
|
||||||
|
|
||||||
|
} ;
|
||||||
|
Fem => table {
|
||||||
|
} ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-}
|
||||||
|
|
||||||
-- Specified palatalization; default gender and declension
|
-- Specified palatalization; default gender and declension
|
||||||
mkNounByPal : Str -> Bool -> Noun = \lemma,pal ->
|
mkNounByPal : Str -> Bool -> Noun = \lemma,pal ->
|
||||||
case lemma of {
|
case lemma of {
|
||||||
@@ -94,23 +120,28 @@ oper
|
|||||||
-- Expected endings of a D1 lemma:
|
-- Expected endings of a D1 lemma:
|
||||||
-- Sg: -s, -š
|
-- Sg: -s, -š
|
||||||
-- Pl: -i
|
-- Pl: -i
|
||||||
|
-- should be provided only in the case of plural mass nouns
|
||||||
|
-- produces an incorrect Sg.Nom form if plural lemma is given
|
||||||
|
-- the incorrect Sg.Nom forms should be filtered out by a domain lexicon
|
||||||
mkNoun_D1 : Str -> Noun = \lemma ->
|
mkNoun_D1 : Str -> Noun = \lemma ->
|
||||||
let stem : Str = cutStem lemma
|
let stem : Str = cutStem lemma
|
||||||
in {
|
in {
|
||||||
s = table {
|
s = table {
|
||||||
Sg => table {
|
Sg => table {
|
||||||
Nom => lemma ; -- FIXME: if Pl lemma (-i) => -s or -š?! (default rule, explicit parameter)
|
Nom => lemma ;
|
||||||
Gen => stem + "a" ;
|
Gen => stem + "a" ;
|
||||||
Dat => stem + "am" ;
|
Dat => stem + "am" ;
|
||||||
Acc => stem + "u" ;
|
Acc => stem + "u" ;
|
||||||
Loc => stem + "ā"
|
Loc => stem + "ā" ;
|
||||||
|
Voc => stem
|
||||||
} ;
|
} ;
|
||||||
Pl => table {
|
Pl => table {
|
||||||
Nom => stem + "i" ;
|
Nom => stem + "i" ;
|
||||||
Gen => stem + "u" ;
|
Gen => stem + "u" ;
|
||||||
Dat => stem + "iem" ;
|
Dat => stem + "iem" ;
|
||||||
Acc => stem + "us" ;
|
Acc => stem + "us" ;
|
||||||
Loc => stem + "os"
|
Loc => stem + "os" ;
|
||||||
|
Voc => stem + "i"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
g = Masc
|
g = Masc
|
||||||
@@ -118,25 +149,30 @@ oper
|
|||||||
|
|
||||||
-- Expected endings of a D2 lemma:
|
-- Expected endings of a D2 lemma:
|
||||||
-- Sg: -is, -s
|
-- Sg: -is, -s
|
||||||
|
-- -s is expected only in the case of few predefined exceptions
|
||||||
-- Pl: -i
|
-- Pl: -i
|
||||||
-- Note: ending -s is expected only in the case of few predefined exceptions
|
-- should be provided only in the case of plural mass nouns
|
||||||
|
-- produces an incorrect Sg.Nom form if plural lemma is given
|
||||||
|
-- the incorrect Sg.Nom forms should be filtered out by a domain lexicon
|
||||||
mkNoun_D2 : Str -> Bool -> Noun = \lemma,pal ->
|
mkNoun_D2 : Str -> Bool -> Noun = \lemma,pal ->
|
||||||
let stem : Str = cutStem lemma
|
let stem : Str = cutStem lemma
|
||||||
in {
|
in {
|
||||||
s = table {
|
s = table {
|
||||||
Sg => table {
|
Sg => table {
|
||||||
Nom => lemma ; -- FIXME: if Pl lemma (-i) => -is or -s?! (exceptions only - default rules only?)
|
Nom => lemma ;
|
||||||
Gen => case lemma of {#exception_D2_1 + "s" => lemma ; _ => palatalize stem pal + "a"} ;
|
Gen => case lemma of {#exception_D2_1 + "s" => lemma ; _ => palatalize stem pal + "a"} ;
|
||||||
Dat => stem + "im" ;
|
Dat => stem + "im" ;
|
||||||
Acc => stem + "i" ;
|
Acc => stem + "i" ;
|
||||||
Loc => stem + "ī"
|
Loc => stem + "ī" ;
|
||||||
|
Voc => stem + "i"
|
||||||
} ;
|
} ;
|
||||||
Pl => table {
|
Pl => table {
|
||||||
Nom => palatalize stem pal + "i" ;
|
Nom => palatalize stem pal + "i" ;
|
||||||
Gen => palatalize stem pal + "u" ;
|
Gen => palatalize stem pal + "u" ;
|
||||||
Dat => palatalize stem pal + "iem" ;
|
Dat => palatalize stem pal + "iem" ;
|
||||||
Acc => palatalize stem pal + "us" ;
|
Acc => palatalize stem pal + "us" ;
|
||||||
Loc => palatalize stem pal + "os"
|
Loc => palatalize stem pal + "os" ;
|
||||||
|
Voc => palatalize stem pal + "i"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
g = Masc
|
g = Masc
|
||||||
@@ -154,14 +190,16 @@ oper
|
|||||||
Gen => stem + "us" ;
|
Gen => stem + "us" ;
|
||||||
Dat => stem + "um" ;
|
Dat => stem + "um" ;
|
||||||
Acc => stem + "u" ;
|
Acc => stem + "u" ;
|
||||||
Loc => stem + "ū"
|
Loc => stem + "ū" ;
|
||||||
|
Voc => stem + "u"
|
||||||
} ;
|
} ;
|
||||||
Pl => table {
|
Pl => table {
|
||||||
Nom => stem + "i" ;
|
Nom => stem + "i" ;
|
||||||
Gen => stem + "u" ;
|
Gen => stem + "u" ;
|
||||||
Dat => stem + "iem" ;
|
Dat => stem + "iem" ;
|
||||||
Acc => stem + "us" ;
|
Acc => stem + "us" ;
|
||||||
Loc => stem + "os"
|
Loc => stem + "os" ;
|
||||||
|
Voc => stem + "i"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
g = Masc
|
g = Masc
|
||||||
@@ -179,14 +217,16 @@ oper
|
|||||||
Gen => stem + "as" ;
|
Gen => stem + "as" ;
|
||||||
Dat => case gend of {Fem => stem + "ai" ; Masc => stem + "am"} ;
|
Dat => case gend of {Fem => stem + "ai" ; Masc => stem + "am"} ;
|
||||||
Acc => stem + "u" ;
|
Acc => stem + "u" ;
|
||||||
Loc => stem + "ā"
|
Loc => stem + "ā" ;
|
||||||
|
Vod => stem + "a"
|
||||||
} ;
|
} ;
|
||||||
Pl => table {
|
Pl => table {
|
||||||
Nom => stem + "as" ;
|
Nom => stem + "as" ;
|
||||||
Gen => stem + "u" ;
|
Gen => stem + "u" ;
|
||||||
Dat => stem + "ām" ;
|
Dat => stem + "ām" ;
|
||||||
Acc => stem + "as" ;
|
Acc => stem + "as" ;
|
||||||
Loc => stem + "ās"
|
Loc => stem + "ās" ;
|
||||||
|
Voc => stem + "as"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
g = gend
|
g = gend
|
||||||
@@ -204,14 +244,16 @@ oper
|
|||||||
Gen => stem + "es" ;
|
Gen => stem + "es" ;
|
||||||
Dat => case gend of {Fem => stem + "ei" ; Masc => stem + "em"} ;
|
Dat => case gend of {Fem => stem + "ei" ; Masc => stem + "em"} ;
|
||||||
Acc => stem + "i" ;
|
Acc => stem + "i" ;
|
||||||
Loc => stem + "ē"
|
Loc => stem + "ē" ;
|
||||||
|
Voc => stem + "e"
|
||||||
} ;
|
} ;
|
||||||
Pl => table {
|
Pl => table {
|
||||||
Nom => stem + "es" ;
|
Nom => stem + "es" ;
|
||||||
Gen => palatalize stem pal + "u" ;
|
Gen => palatalize stem pal + "u" ;
|
||||||
Dat => stem + "ēm" ;
|
Dat => stem + "ēm" ;
|
||||||
Acc => stem + "es" ;
|
Acc => stem + "es" ;
|
||||||
Loc => stem + "ēs"
|
Loc => stem + "ēs" ;
|
||||||
|
Voc => stem + "es"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
g = gend
|
g = gend
|
||||||
@@ -231,7 +273,8 @@ oper
|
|||||||
Gen => stem + "s" ;
|
Gen => stem + "s" ;
|
||||||
Dat => case gend of {Fem => stem + "ij" ; Masc => stem + "im"} ;
|
Dat => case gend of {Fem => stem + "ij" ; Masc => stem + "im"} ;
|
||||||
Acc => stem + "i" ;
|
Acc => stem + "i" ;
|
||||||
Loc => stem + "ī"
|
Loc => stem + "ī" ;
|
||||||
|
Voc => stem + "s"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
Pl => table {
|
Pl => table {
|
||||||
@@ -239,7 +282,8 @@ oper
|
|||||||
Gen => palatalize stem pal + "u" ;
|
Gen => palatalize stem pal + "u" ;
|
||||||
Dat => stem + "īm" ;
|
Dat => stem + "īm" ;
|
||||||
Acc => stem + "is" ;
|
Acc => stem + "is" ;
|
||||||
Loc => stem + "īs"
|
Loc => stem + "īs" ;
|
||||||
|
Voc => stem + "is"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
g = gend
|
g = gend
|
||||||
@@ -256,14 +300,16 @@ oper
|
|||||||
Gen => stem + "šanās" ;
|
Gen => stem + "šanās" ;
|
||||||
Dat => NON_EXISTENT ;
|
Dat => NON_EXISTENT ;
|
||||||
Acc => stem + "šanos" ;
|
Acc => stem + "šanos" ;
|
||||||
Loc => NON_EXISTENT
|
Loc => NON_EXISTENT ;
|
||||||
|
Voc => stem + "šanās"
|
||||||
} ;
|
} ;
|
||||||
Pl => table {
|
Pl => table {
|
||||||
Nom => stem + "šanās" ;
|
Nom => stem + "šanās" ;
|
||||||
Gen => stem + "šanos" ;
|
Gen => stem + "šanos" ;
|
||||||
Dat => NON_EXISTENT ;
|
Dat => NON_EXISTENT ;
|
||||||
Acc => stem + "šanās" ;
|
Acc => stem + "šanās" ;
|
||||||
Loc => NON_EXISTENT
|
Loc => NON_EXISTENT ;
|
||||||
|
Voc => stem + "šanās"
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
g = Fem
|
g = Fem
|
||||||
@@ -278,6 +324,8 @@ oper
|
|||||||
exception_D4 : pattern Str = #(_ + "puik") ;
|
exception_D4 : pattern Str = #(_ + "puik") ;
|
||||||
exception_D6 : pattern Str = #(_ + "ļaud") ;
|
exception_D6 : pattern Str = #(_ + "ļaud") ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- Auxiliaries
|
-- Auxiliaries
|
||||||
|
|
||||||
cutStem : Str -> Str = \lemma ->
|
cutStem : Str -> Str = \lemma ->
|
||||||
|
|||||||
@@ -11,8 +11,7 @@ flags
|
|||||||
coding = utf8;
|
coding = utf8;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
Pron : Type = {s : Number => Case => Str ; p : Person} ;
|
PronGend : Type = {s : Gender => Number => Case => Str} ;
|
||||||
PronGend : Type = {s : Gender => Number => Case => Str ; p : Person} ;
|
|
||||||
|
|
||||||
-- PRONOUNS (incl. 'determiners')
|
-- PRONOUNS (incl. 'determiners')
|
||||||
|
|
||||||
@@ -35,14 +34,16 @@ oper
|
|||||||
Gen => stem + "a" ;
|
Gen => stem + "a" ;
|
||||||
Dat => stem + "am" ;
|
Dat => stem + "am" ;
|
||||||
Acc => stem + "u" ;
|
Acc => stem + "u" ;
|
||||||
Loc => stem + "ā"
|
Loc => stem + "ā" ;
|
||||||
|
Voc => NON_EXISTENT
|
||||||
} ;
|
} ;
|
||||||
Pl => table {
|
Pl => table {
|
||||||
Nom => stem + "i" ;
|
Nom => stem + "i" ;
|
||||||
Gen => stem + "u" ;
|
Gen => stem + "u" ;
|
||||||
Dat => stem + "iem" ;
|
Dat => stem + "iem" ;
|
||||||
Acc => stem + "us" ;
|
Acc => stem + "us" ;
|
||||||
Loc => stem + "os"
|
Loc => stem + "os" ;
|
||||||
|
Voc => NON_EXISTENT
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
Fem => table {
|
Fem => table {
|
||||||
@@ -51,18 +52,19 @@ oper
|
|||||||
Gen => stem + "as" ;
|
Gen => stem + "as" ;
|
||||||
Dat => stem + "ai" ;
|
Dat => stem + "ai" ;
|
||||||
Acc => stem + "u" ;
|
Acc => stem + "u" ;
|
||||||
Loc => stem + "ā"
|
Loc => stem + "ā" ;
|
||||||
|
Voc => NON_EXISTENT
|
||||||
} ;
|
} ;
|
||||||
Pl => table {
|
Pl => table {
|
||||||
Nom => stem + "as" ;
|
Nom => stem + "as" ;
|
||||||
Gen => stem + "u" ;
|
Gen => stem + "u" ;
|
||||||
Dat => stem + "ām" ;
|
Dat => stem + "ām" ;
|
||||||
Acc => stem + "as" ;
|
Acc => stem + "as" ;
|
||||||
Loc => stem + "ās"
|
Loc => stem + "ās" ;
|
||||||
|
Voc => NON_EXISTENT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
p = P3
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- A special case (paradigm) of Gender=>Number=>Case P3 pronouns
|
-- A special case (paradigm) of Gender=>Number=>Case P3 pronouns
|
||||||
@@ -80,14 +82,16 @@ oper
|
|||||||
Gen => stem + suff2 ;
|
Gen => stem + suff2 ;
|
||||||
Dat => stem + suff1 + "m" ;
|
Dat => stem + suff1 + "m" ;
|
||||||
Acc => stem + "o" ;
|
Acc => stem + "o" ;
|
||||||
Loc => stem + "ajā"
|
Loc => stem + "ajā" ;
|
||||||
|
Voc => NON_EXISTENT
|
||||||
} ;
|
} ;
|
||||||
Pl => table {
|
Pl => table {
|
||||||
Nom => stem + "ie" ;
|
Nom => stem + "ie" ;
|
||||||
Gen => stem + "o" ;
|
Gen => stem + "o" ;
|
||||||
Dat => stem + "iem" ;
|
Dat => stem + "iem" ;
|
||||||
Acc => stem + "os" ;
|
Acc => stem + "os" ;
|
||||||
Loc => stem + "ajos"
|
Loc => stem + "ajos" ;
|
||||||
|
Voc => NON_EXISTENT
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
Fem => table {
|
Fem => table {
|
||||||
@@ -96,18 +100,19 @@ oper
|
|||||||
Gen => stem + suff2 + "s" ;
|
Gen => stem + suff2 + "s" ;
|
||||||
Dat => stem + "ai" ;
|
Dat => stem + "ai" ;
|
||||||
Acc => stem + "o" ;
|
Acc => stem + "o" ;
|
||||||
Loc => stem + "ajā"
|
Loc => stem + "ajā" ;
|
||||||
|
Voc => NON_EXISTENT
|
||||||
} ;
|
} ;
|
||||||
Pl => table {
|
Pl => table {
|
||||||
Nom => stem + suff2 + "s" ;
|
Nom => stem + suff2 + "s" ;
|
||||||
Gen => stem + "o" ;
|
Gen => stem + "o" ;
|
||||||
Dat => stem + suff2 + "m" ;
|
Dat => stem + suff2 + "m" ;
|
||||||
Acc => stem + suff2 + "s" ;
|
Acc => stem + suff2 + "s" ;
|
||||||
Loc => stem + "ajās"
|
Loc => stem + "ajās" ;
|
||||||
|
Voc => NON_EXISTENT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
p = P3
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
-- Latvian verb paradigms - by Pēteris Paikens & Normunds Grūzītis, copied off mini-grammar as of 2011-07-12
|
-- Latvian verb paradigms - by Pēteris Paikens & Normunds Grūzītis
|
||||||
|
|
||||||
resource ParadigmsVerbsLav = open
|
resource ParadigmsVerbsLav = open
|
||||||
(Predef=Predef),
|
(Predef=Predef),
|
||||||
@@ -8,14 +8,11 @@ resource ParadigmsVerbsLav = open
|
|||||||
in {
|
in {
|
||||||
|
|
||||||
flags
|
flags
|
||||||
coding = utf8;
|
coding = utf8 ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
Verb : Type = {s : Polarity => VerbForm => Str} ;
|
|
||||||
Verb_TMP : Type = {s : VerbForm => Str} ;
|
Verb_TMP : Type = {s : VerbForm => Str} ;
|
||||||
|
|
||||||
-- VERBS
|
|
||||||
|
|
||||||
-- Second and third conjugations
|
-- Second and third conjugations
|
||||||
mkVerb : Str -> VerbConj -> Verb = \lemma,conj -> {
|
mkVerb : Str -> VerbConj -> Verb = \lemma,conj -> {
|
||||||
s = table {
|
s = table {
|
||||||
@@ -84,7 +81,7 @@ oper
|
|||||||
Indicative P1 Pl Fut => pal_C1_1 stem3 stem + "sim" ;
|
Indicative P1 Pl Fut => pal_C1_1 stem3 stem + "sim" ;
|
||||||
Indicative P1 Pl Past => stem3 + "ām" ;
|
Indicative P1 Pl Past => stem3 + "ām" ;
|
||||||
|
|
||||||
Indicative P2 Sg Pres => pal_C1_2 stem3 stem2 ;
|
Indicative P2 Sg Pres => stem3 ;
|
||||||
Indicative P2 Sg Fut => pal_C1_1 stem3 stem + "si" ;
|
Indicative P2 Sg Fut => pal_C1_1 stem3 stem + "si" ;
|
||||||
Indicative P2 Sg Past => stem3 + "i" ;
|
Indicative P2 Sg Past => stem3 + "i" ;
|
||||||
Indicative P2 Pl Pres => stem2 + "at" ;
|
Indicative P2 Pl Pres => stem2 + "at" ;
|
||||||
@@ -104,28 +101,11 @@ oper
|
|||||||
|
|
||||||
Debitive => "jā" + stem2 ;
|
Debitive => "jā" + stem2 ;
|
||||||
DebitiveRelative => "jā" + stem2 + "ot" ;
|
DebitiveRelative => "jā" + stem2 + "ot" ;
|
||||||
|
|
||||||
Participle Masc Sg Nom => pal_C1_4 stem3 + "is" ;
|
Imperative Sg => stem3 ;
|
||||||
Participle Masc Sg Gen => pal_C1_3 stem3 + "uša" ;
|
Imperative Pl => stem3 + "iet" ;
|
||||||
Participle Masc Sg Dat => pal_C1_3 stem3 + "ušam" ;
|
|
||||||
Participle Masc Sg Acc => pal_C1_3 stem3 + "ušu" ;
|
Participle g n c => participle_normal_l g n c (pal_C1_3 stem3) (pal_C1_4 stem3)
|
||||||
Participle Masc Sg Loc => pal_C1_3 stem3 + "ušā" ;
|
|
||||||
Participle Masc Pl Nom => pal_C1_3 stem3 + "uši" ;
|
|
||||||
Participle Masc Pl Gen => pal_C1_3 stem3 + "ušu" ;
|
|
||||||
Participle Masc Pl Dat => pal_C1_3 stem3 + "ušiem" ;
|
|
||||||
Participle Masc Pl Acc => pal_C1_3 stem3 + "ušus" ;
|
|
||||||
Participle Masc Pl Loc => pal_C1_3 stem3 + "ušos" ;
|
|
||||||
|
|
||||||
Participle Fem Sg Nom => pal_C1_3 stem3 + "usi" ;
|
|
||||||
Participle Fem Sg Gen => pal_C1_3 stem3 + "ušas" ;
|
|
||||||
Participle Fem Sg Dat => pal_C1_3 stem3 + "ušai" ;
|
|
||||||
Participle Fem Sg Acc => pal_C1_3 stem3 + "ušu" ;
|
|
||||||
Participle Fem Sg Loc => pal_C1_3 stem3 + "ušā" ;
|
|
||||||
Participle Fem Pl Nom => pal_C1_3 stem3 + "ušas" ;
|
|
||||||
Participle Fem Pl Gen => pal_C1_3 stem3 + "ušu" ;
|
|
||||||
Participle Fem Pl Dat => pal_C1_3 stem3 + "ušām" ;
|
|
||||||
Participle Fem Pl Acc => pal_C1_3 stem3 + "ušas" ;
|
|
||||||
Participle Fem Pl Loc => pal_C1_3 stem3 + "ušās"
|
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -164,28 +144,11 @@ oper
|
|||||||
|
|
||||||
Debitive => "jā" + stem ;
|
Debitive => "jā" + stem ;
|
||||||
DebitiveRelative => "jā" + stem + "jot" ;
|
DebitiveRelative => "jā" + stem + "jot" ;
|
||||||
|
|
||||||
Participle Masc Sg Nom => stem + "jis" ;
|
Imperative Sg => stem ;
|
||||||
Participle Masc Sg Gen => stem + "juša" ;
|
Imperative Pl => stem + "jiet";
|
||||||
Participle Masc Sg Dat => stem + "jušam" ;
|
|
||||||
Participle Masc Sg Acc => stem + "jušu" ;
|
Participle g n c => participle_normal g n c (stem + "j")
|
||||||
Participle Masc Sg Loc => stem + "jušā" ;
|
|
||||||
Participle Masc Pl Nom => stem + "juši" ;
|
|
||||||
Participle Masc Pl Gen => stem + "jušu" ;
|
|
||||||
Participle Masc Pl Dat => stem + "jušiem" ;
|
|
||||||
Participle Masc Pl Acc => stem + "jušus" ;
|
|
||||||
Participle Masc Pl Loc => stem + "jušos" ;
|
|
||||||
|
|
||||||
Participle Fem Sg Nom => stem + "jusi" ;
|
|
||||||
Participle Fem Sg Gen => stem + "jušas" ;
|
|
||||||
Participle Fem Sg Dat => stem + "jušai" ;
|
|
||||||
Participle Fem Sg Acc => stem + "jušu" ;
|
|
||||||
Participle Fem Sg Loc => stem + "jušā" ;
|
|
||||||
Participle Fem Pl Nom => stem + "jušas" ;
|
|
||||||
Participle Fem Pl Gen => stem + "jušu" ;
|
|
||||||
Participle Fem Pl Dat => stem + "jušām" ;
|
|
||||||
Participle Fem Pl Acc => stem + "jušas" ;
|
|
||||||
Participle Fem Pl Loc => stem + "jušās"
|
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -224,28 +187,11 @@ oper
|
|||||||
|
|
||||||
Debitive => pal_C3_3 stem ;
|
Debitive => pal_C3_3 stem ;
|
||||||
DebitiveRelative => pal_C3_3 stem + "ot" ;
|
DebitiveRelative => pal_C3_3 stem + "ot" ;
|
||||||
|
|
||||||
|
Imperative Sg => pal_C3_1 stem + "i" ;
|
||||||
|
Imperative Pl => pal_C3_1 stem + "iet";
|
||||||
|
|
||||||
Participle Masc Sg Nom => stem + "jis" ;
|
Participle g n c => participle_normal g n c (stem + "j")
|
||||||
Participle Masc Sg Gen => stem + "juša" ;
|
|
||||||
Participle Masc Sg Dat => stem + "jušam" ;
|
|
||||||
Participle Masc Sg Acc => stem + "jušu" ;
|
|
||||||
Participle Masc Sg Loc => stem + "jušā" ;
|
|
||||||
Participle Masc Pl Nom => stem + "juši" ;
|
|
||||||
Participle Masc Pl Gen => stem + "jušu" ;
|
|
||||||
Participle Masc Pl Dat => stem + "jušiem" ;
|
|
||||||
Participle Masc Pl Acc => stem + "jušus" ;
|
|
||||||
Participle Masc Pl Loc => stem + "jušos" ;
|
|
||||||
|
|
||||||
Participle Fem Sg Nom => stem + "jusi" ;
|
|
||||||
Participle Fem Sg Gen => stem + "jušas" ;
|
|
||||||
Participle Fem Sg Dat => stem + "jušai" ;
|
|
||||||
Participle Fem Sg Acc => stem + "jušu" ;
|
|
||||||
Participle Fem Sg Loc => stem + "jušā" ;
|
|
||||||
Participle Fem Pl Nom => stem + "jušas" ;
|
|
||||||
Participle Fem Pl Gen => stem + "jušu" ;
|
|
||||||
Participle Fem Pl Dat => stem + "jušām" ;
|
|
||||||
Participle Fem Pl Acc => stem + "jušas" ;
|
|
||||||
Participle Fem Pl Loc => stem + "jušās"
|
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -287,28 +233,11 @@ oper
|
|||||||
|
|
||||||
Debitive => "jā" + stem2 + "as" ;
|
Debitive => "jā" + stem2 + "as" ;
|
||||||
DebitiveRelative => "jā" + stem2 + "oties" ;
|
DebitiveRelative => "jā" + stem2 + "oties" ;
|
||||||
|
|
||||||
|
Imperative Sg => pal_C1_2 stem3 stem2 + "ies" ;
|
||||||
|
Imperative Pl => pal_C1_2 stem3 stem2 + "ieties" ;
|
||||||
|
|
||||||
Participle Masc Sg Nom => pal_C1_4 stem3 + "ies" ;
|
Participle g n c => participle_reflexive_l g n c (pal_C1_3 stem3) (pal_C1_4 stem3)
|
||||||
Participle Masc Sg Gen => NON_EXISTENT ;
|
|
||||||
Participle Masc Sg Dat => NON_EXISTENT ;
|
|
||||||
Participle Masc Sg Acc => pal_C1_3 stem3 + "ušos" ;
|
|
||||||
Participle Masc Sg Loc => NON_EXISTENT ;
|
|
||||||
Participle Masc Pl Nom => pal_C1_3 stem3 + "ušies" ;
|
|
||||||
Participle Masc Pl Gen => pal_C1_3 stem3 + "ušos" ;
|
|
||||||
Participle Masc Pl Dat => NON_EXISTENT ;
|
|
||||||
Participle Masc Pl Acc => pal_C1_3 stem3 + "ušos" ;
|
|
||||||
Participle Masc Pl Loc => NON_EXISTENT ;
|
|
||||||
|
|
||||||
Participle Fem Sg Nom => pal_C1_3 stem3 + "usies" ;
|
|
||||||
Participle Fem Sg Gen => pal_C1_3 stem3 + "ušās" ;
|
|
||||||
Participle Fem Sg Dat => NON_EXISTENT ;
|
|
||||||
Participle Fem Sg Acc => pal_C1_3 stem3 + "ušos" ;
|
|
||||||
Participle Fem Sg Loc => NON_EXISTENT ;
|
|
||||||
Participle Fem Pl Nom => pal_C1_3 stem3 + "ušās" ;
|
|
||||||
Participle Fem Pl Gen => pal_C1_3 stem3 + "ušos" ;
|
|
||||||
Participle Fem Pl Dat => NON_EXISTENT ;
|
|
||||||
Participle Fem Pl Acc => pal_C1_3 stem3 + "ušos" ;
|
|
||||||
Participle Fem Pl Loc => NON_EXISTENT
|
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -347,28 +276,11 @@ oper
|
|||||||
|
|
||||||
Debitive => "jā" + stem + "jas" ;
|
Debitive => "jā" + stem + "jas" ;
|
||||||
DebitiveRelative => "jā" + stem + "joties" ;
|
DebitiveRelative => "jā" + stem + "joties" ;
|
||||||
|
|
||||||
|
Imperative Sg => stem + "jies" ;
|
||||||
|
Imperative Pl => stem + "jieties" ;
|
||||||
|
|
||||||
Participle Masc Sg Nom => stem + "jies" ;
|
Participle g n c => participle_reflexive g n c (stem + "j")
|
||||||
Participle Masc Sg Gen => NON_EXISTENT ;
|
|
||||||
Participle Masc Sg Dat => NON_EXISTENT ;
|
|
||||||
Participle Masc Sg Acc => stem + "jušos" ;
|
|
||||||
Participle Masc Sg Loc => NON_EXISTENT ;
|
|
||||||
Participle Masc Pl Nom => stem + "jušies" ;
|
|
||||||
Participle Masc Pl Gen => stem + "jušos" ;
|
|
||||||
Participle Masc Pl Dat => NON_EXISTENT ;
|
|
||||||
Participle Masc Pl Acc => stem + "jušos" ;
|
|
||||||
Participle Masc Pl Loc => NON_EXISTENT ;
|
|
||||||
|
|
||||||
Participle Fem Sg Nom => stem + "jusies" ;
|
|
||||||
Participle Fem Sg Gen => stem + "jušās" ;
|
|
||||||
Participle Fem Sg Dat => NON_EXISTENT ;
|
|
||||||
Participle Fem Sg Acc => stem + "jušos" ;
|
|
||||||
Participle Fem Sg Loc => NON_EXISTENT ;
|
|
||||||
Participle Fem Pl Nom => stem + "jušās" ;
|
|
||||||
Participle Fem Pl Gen => stem + "jušos" ;
|
|
||||||
Participle Fem Pl Dat => NON_EXISTENT ;
|
|
||||||
Participle Fem Pl Acc => stem + "jušās" ;
|
|
||||||
Participle Fem Pl Loc => NON_EXISTENT
|
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -408,33 +320,18 @@ oper
|
|||||||
Debitive => pal_C3_6 stem + "s" ;
|
Debitive => pal_C3_6 stem + "s" ;
|
||||||
DebitiveRelative => pal_C3_6 stem + "oties" ;
|
DebitiveRelative => pal_C3_6 stem + "oties" ;
|
||||||
|
|
||||||
Participle Masc Sg Nom => stem + "jies" ;
|
Imperative Sg => pal_C3_1 stem + "ies" ;
|
||||||
Participle Masc Sg Gen => NON_EXISTENT ;
|
Imperative Pl => pal_C3_1 stem + "ieties" ;
|
||||||
Participle Masc Sg Dat => NON_EXISTENT ;
|
|
||||||
Participle Masc Sg Acc => stem + "jušos" ;
|
Participle g n c => participle_reflexive g n c (stem + "j")
|
||||||
Participle Masc Sg Loc => NON_EXISTENT ;
|
|
||||||
Participle Masc Pl Nom => stem + "jušies" ;
|
|
||||||
Participle Masc Pl Gen => stem + "jušos" ;
|
|
||||||
Participle Masc Pl Dat => NON_EXISTENT ;
|
|
||||||
Participle Masc Pl Acc => stem + "jušos" ;
|
|
||||||
Participle Masc Pl Loc => NON_EXISTENT ;
|
|
||||||
|
|
||||||
Participle Fem Sg Nom => stem + "jusies" ;
|
|
||||||
Participle Fem Sg Gen => stem + "jušās" ;
|
|
||||||
Participle Fem Sg Dat => NON_EXISTENT ;
|
|
||||||
Participle Fem Sg Acc => stem + "jušos" ;
|
|
||||||
Participle Fem Sg Loc => NON_EXISTENT ;
|
|
||||||
Participle Fem Pl Nom => stem + "jušās" ;
|
|
||||||
Participle Fem Pl Gen => stem + "jušos" ;
|
|
||||||
Participle Fem Pl Dat => NON_EXISTENT ;
|
|
||||||
Participle Fem Pl Acc => stem + "jušās" ;
|
|
||||||
Participle Fem Pl Loc => NON_EXISTENT
|
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkVerb_Irreg : Str -> Verb = \lemma ->
|
mkVerb_Irreg : Str -> Verb = \lemma ->
|
||||||
case lemma of {
|
case lemma of {
|
||||||
"būt" => mkVerb_toBe
|
"būt" => mkVerb_toBe ;
|
||||||
|
"iet" => mkVerb_Walk ;
|
||||||
|
"gulēt" => mkVerb_Sleep
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkVerb_toBe : Verb = {
|
mkVerb_toBe : Verb = {
|
||||||
@@ -456,6 +353,43 @@ oper
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
mkVerb_Walk : Verb = {
|
||||||
|
s = table {
|
||||||
|
Pos => table {
|
||||||
|
Indicative P3 _ Pres => "iet" ;
|
||||||
|
Debitive => "jāiet" ;
|
||||||
|
x => (mkVerb_C1 "iet" "eju" "gāju" ).s ! x -- the incorrect form 'esu' will be overriden
|
||||||
|
} ;
|
||||||
|
Neg => table {
|
||||||
|
Indicative P3 _ Pres => "neiet" ;
|
||||||
|
Debitive => NON_EXISTENT;
|
||||||
|
DebitiveRelative => NON_EXISTENT;
|
||||||
|
x => (mkVerb_C1 "neiet" "neeju" "negāju" ).s ! x -- the incorrect form 'neesu' will be overriden
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkVerb_Sleep : Verb = {
|
||||||
|
s = table {
|
||||||
|
Pos => table {
|
||||||
|
Indicative P2 Sg Pres => (mkVerb_C3 "gulēt").s ! Indicative P2 Sg Pres;
|
||||||
|
Indicative p n Pres => (mkVerb_C3 "guļēt").s ! Indicative p n Pres;
|
||||||
|
Relative Pres => (mkVerb_C3 "guļēt").s ! Relative Pres;
|
||||||
|
Debitive => (mkVerb_C3 "guļēt").s ! Debitive;
|
||||||
|
DebitiveRelative => (mkVerb_C3 "guļēt").s ! DebitiveRelative;
|
||||||
|
x => (mkVerb_C3 "gulēt").s ! x
|
||||||
|
} ;
|
||||||
|
Neg => table {
|
||||||
|
Indicative P2 Sg Pres => (mkVerb_C3 "negulēt").s ! Indicative P2 Sg Pres;
|
||||||
|
Indicative p n Pres => (mkVerb_C3 "neguļēt").s ! Indicative p n Pres;
|
||||||
|
Relative Pres => (mkVerb_C3 "neguļēt").s ! Relative Pres;
|
||||||
|
Debitive => NON_EXISTENT;
|
||||||
|
DebitiveRelative => NON_EXISTENT;
|
||||||
|
x => (mkVerb_C3 "negulēt").s ! x
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
-- Auxiliaries (palatalization rules)
|
-- Auxiliaries (palatalization rules)
|
||||||
|
|
||||||
@@ -465,9 +399,10 @@ oper
|
|||||||
s + "s" => case stem3 of {
|
s + "s" => case stem3 of {
|
||||||
_ + "d" => s + "dī" ;
|
_ + "d" => s + "dī" ;
|
||||||
_ + "t" => s + "tī" ;
|
_ + "t" => s + "tī" ;
|
||||||
_ + "s" => s + "sī" ;
|
_ + "s" => s + "sī" ;
|
||||||
_ => stem
|
_ => stem
|
||||||
} ;
|
} ;
|
||||||
|
s + "z" => s + "zī" ; -- lauzt -> lauzīs
|
||||||
_ => stem
|
_ => stem
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -478,7 +413,12 @@ oper
|
|||||||
_ + "s" => s + "s" ;
|
_ + "s" => s + "s" ;
|
||||||
_ => stem
|
_ => stem
|
||||||
} ;
|
} ;
|
||||||
s + "ž" => s + "d" ;
|
s + "t" => case stem of {
|
||||||
|
_ + "met" => stem ;
|
||||||
|
_ + "cērt" => stem;
|
||||||
|
_ => s + "ti"
|
||||||
|
} ;
|
||||||
|
-- s + "ž" => s + "d" ; -- aizkomentēts jo noveda pie laužu -> laud nevis lauz
|
||||||
s + "ļ" => s + "l" ;
|
s + "ļ" => s + "l" ;
|
||||||
s + "mj" => s + "m" ;
|
s + "mj" => s + "m" ;
|
||||||
s + "bj" => s + "b" ;
|
s + "bj" => s + "b" ;
|
||||||
@@ -520,14 +460,7 @@ oper
|
|||||||
|
|
||||||
-- Ref. to the Java implementation: mija5
|
-- Ref. to the Java implementation: mija5
|
||||||
pal_C3_3 : Str -> Str = \stem ->
|
pal_C3_3 : Str -> Str = \stem ->
|
||||||
"jā" +
|
"jā" + pal_C3_5 stem ;
|
||||||
case stem of {
|
|
||||||
s + "dā" => s + "d" ;
|
|
||||||
s + "ā" => s + "a" ;
|
|
||||||
s + "cī" => s + "ka" ;
|
|
||||||
s + "ī" => s + "a" ;
|
|
||||||
_ => Predef.tk 1 stem
|
|
||||||
} ;
|
|
||||||
|
|
||||||
-- Ref. to the Java implementation: mija8
|
-- Ref. to the Java implementation: mija8
|
||||||
pal_C3_4 : Str -> Str = \stem ->
|
pal_C3_4 : Str -> Str = \stem ->
|
||||||
@@ -558,5 +491,89 @@ oper
|
|||||||
s + "inā" => s + "inā" ;
|
s + "inā" => s + "inā" ;
|
||||||
_ => Predef.tk 1 stem + "a"
|
_ => Predef.tk 1 stem + "a"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
-- Participle paradigms
|
||||||
|
participle_normal : Gender -> Number -> Case -> Str -> Str = \g,n,c, stem -> participle_normal_l g n c stem stem;
|
||||||
|
participle_normal_l : Gender -> Number -> Case -> Str -> Str -> Str = \g,n,c, stem, lemma_stem ->
|
||||||
|
case g of {
|
||||||
|
Masc => case n of {
|
||||||
|
Sg => case c of {
|
||||||
|
Nom => lemma_stem + "is" ;
|
||||||
|
Gen => stem + "uša" ;
|
||||||
|
Dat => stem + "ušam" ;
|
||||||
|
Acc => stem + "ušu" ;
|
||||||
|
Loc => stem + "ušā" ;
|
||||||
|
Voc => NON_EXISTENT
|
||||||
|
} ;
|
||||||
|
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
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
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
|
||||||
|
};
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
participle_reflexive : Gender -> Number -> Case -> Str -> Str = \g,n,c, stem -> participle_reflexive_l g n c stem stem;
|
||||||
|
participle_reflexive_l : Gender -> Number -> Case -> Str -> Str -> Str = \g,n,c, stem, lemma_stem ->
|
||||||
|
case g of {
|
||||||
|
Masc => case n of {
|
||||||
|
Sg => case c of {
|
||||||
|
Nom => lemma_stem + "ies" ;
|
||||||
|
Gen => NON_EXISTENT ;
|
||||||
|
Dat => NON_EXISTENT ;
|
||||||
|
Acc => stem + "ušos" ;
|
||||||
|
Loc => NON_EXISTENT ;
|
||||||
|
Voc => 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
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
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
|
||||||
|
};
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -1,29 +1,29 @@
|
|||||||
concrete PhraseLav of Phrase = CatLav ** open Prelude, ResLav in {
|
concrete PhraseLav of Phrase = CatLav ** open Prelude, ResLav, VerbLav in {
|
||||||
|
flags
|
||||||
|
coding = utf8;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
||||||
UttS s = s ;
|
|
||||||
|
UttS s = {s = s.s} ;
|
||||||
|
UttQS qs = {s = qs.s } ;
|
||||||
|
UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! Sg } ;
|
||||||
|
UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! Pl } ;
|
||||||
|
UttImpPol pol imp = {s = pol.s ++ "lūdzu" ++ imp.s ! pol.p ! Pl } ;
|
||||||
|
|
||||||
|
UttNP np = {s = np.s ! Nom} ;
|
||||||
|
UttCN n = {s = n.s ! Indef ! Sg ! Nom} ;
|
||||||
|
UttAP ap = {s = ap.s ! Indef ! Masc ! Sg ! Nom} ;
|
||||||
|
UttAdv adv = adv ;
|
||||||
|
UttVP vp = {s = build_VP vp Pos Infinitive (AgP3 Pl Masc)} ; --FIXME - neesmu līdz galam drošs vai agreement ir tieši (AgPr Pl)
|
||||||
|
UttIP ip = { s = ip.s ! Nom };
|
||||||
|
UttIAdv iadv = iadv ;
|
||||||
|
UttCard n = { s = n.s ! Masc ! Nom};
|
||||||
|
|
||||||
NoPConj = {s = []} ;
|
NoPConj = {s = []} ;
|
||||||
NoVoc = {s = []} ;
|
NoVoc = {s = []} ;
|
||||||
|
|
||||||
{-
|
VocNP np = {s = "," ++ np.s ! ResLav.Voc} ;
|
||||||
|
PConjConj conj = {s = conj.s2} ;
|
||||||
UttQS qs = {s = qs.s ! QDir} ;
|
|
||||||
UttImpSg pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Sg False} ;
|
|
||||||
UttImpPl pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Pl False} ;
|
|
||||||
UttImpPol pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Sg True} ;
|
|
||||||
|
|
||||||
UttIP ip = {s = ip.s ! Nom} ; --- Acc also
|
|
||||||
UttIAdv iadv = iadv ;
|
|
||||||
UttNP np = {s = np.s ! Nom} ;
|
|
||||||
UttVP vp = {s = infVP False vp (agrP3 Sg)} ;
|
|
||||||
UttAdv adv = adv ;
|
|
||||||
UttCN n = {s = n.s ! Sg ! Nom} ;
|
|
||||||
UttCard n = {s = n.s ! Nom} ;
|
|
||||||
UttAP ap = {s = ap.s ! agrP3 Sg} ;
|
|
||||||
|
|
||||||
PConjConj conj = {s = conj.s2} ; ---
|
|
||||||
|
|
||||||
VocNP np = {s = "," ++ np.s ! Nom} ;
|
|
||||||
-}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,55 +1,51 @@
|
|||||||
concrete QuestionLav of Question = CatLav ** open ResLav, Prelude in {
|
concrete QuestionLav of Question = CatLav ** open ResLav, VerbLav, Prelude, ParadigmsVerbsLav in {
|
||||||
{-
|
flags
|
||||||
flags optimize=all_subs ;
|
optimize=all_subs ;
|
||||||
|
coding = utf8;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
|
|
||||||
QuestCl cl = {
|
QuestCl cl = {
|
||||||
s = \\t,a,p =>
|
s = \\m,p => "vai" ++ cl.s ! m ! p
|
||||||
let cls = cl.s ! t ! a ! p
|
} ;
|
||||||
in table {
|
|
||||||
QDir => cls ! OQuest ;
|
QuestVP ip vp = {
|
||||||
QIndir => "if" ++ cls ! ODir
|
s = \\m,p => ip.s ! Nom ++ buildVerb vp.v m p (AgP3 ip.n Masc)
|
||||||
} ---- "whether" in ExtEng
|
} ;
|
||||||
} ;
|
|
||||||
|
QuestSlash ip slash = {
|
||||||
|
s = \\m,p => slash.p.s ++ ip.s ! (slash.p.c ! ip.n) ++ slash.s ! m ! p
|
||||||
|
} ;
|
||||||
|
|
||||||
|
QuestIAdv iadv cl = {
|
||||||
|
s = \\m,p => iadv.s ++ cl.s ! m ! p ;
|
||||||
|
};
|
||||||
|
|
||||||
|
QuestIComp icomp np = {
|
||||||
|
s = \\m,p => icomp.s ++ buildVerb mkVerb_toBe m p np.a ++ np.s ! Nom
|
||||||
|
};
|
||||||
|
|
||||||
QuestVP qp vp =
|
IdetQuant idet num = {
|
||||||
let cl = mkClause (qp.s ! Nom) (agrP3 qp.n) vp
|
s = \\g => idet.s ! g ! num.n ++ num.s ! g ! Nom ;
|
||||||
in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! ODir} ;
|
n = num.n
|
||||||
|
} ;
|
||||||
QuestSlash ip slash =
|
|
||||||
mkQuestion (ss (slash.c2 ++ ip.s ! Acc)) slash ;
|
|
||||||
--- stranding in ExratEng
|
|
||||||
|
|
||||||
QuestIAdv iadv cl = mkQuestion iadv cl ;
|
|
||||||
|
|
||||||
QuestIComp icomp np =
|
|
||||||
mkQuestion icomp (mkClause (np.s ! Nom) np.a (predAux auxBe)) ;
|
|
||||||
|
|
||||||
|
|
||||||
PrepIP p ip = {s = p.s ++ ip.s ! Acc} ;
|
|
||||||
|
|
||||||
AdvIP ip adv = {
|
AdvIP ip adv = {
|
||||||
s = \\c => ip.s ! c ++ adv.s ;
|
s = \\c => ip.s ! c ++ adv.s ;
|
||||||
n = ip.n
|
n = ip.n
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
PrepIP p ip = {s = p.s ++ ip.s ! (p.c ! ip.n)} ;
|
||||||
|
|
||||||
IdetCN idet cn = {
|
IdetCN idet cn = {
|
||||||
s = \\c => idet.s ++ cn.s ! idet.n ! c ;
|
s = \\c => idet.s ! cn.g ++ cn.s ! Def ! idet.n ! c ;
|
||||||
n = idet.n
|
n = idet.n
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
IdetIP idet = {
|
IdetIP idet = {
|
||||||
s = \\c => idet.s ;
|
s = \\c => (idet.s ! Masc) | (idet.s ! Fem) ;
|
||||||
n = idet.n
|
n = idet.n
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
IdetQuant idet num = {
|
CompIAdv a = a ;
|
||||||
s = idet.s ! num.n ++ num.s ! Nom ;
|
|
||||||
n = num.n
|
|
||||||
} ;
|
|
||||||
|
|
||||||
CompIAdv a = a ;
|
|
||||||
CompIP p = ss (p.s ! Nom) ;
|
CompIP p = ss (p.s ! Nom) ;
|
||||||
-}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,42 +1,46 @@
|
|||||||
concrete RelativeLav of Relative = CatLav ** open ResLav in {
|
concrete RelativeLav of Relative = CatLav ** open ResLav, VerbLav in {
|
||||||
{-
|
flags optimize=all_subs ;
|
||||||
flags optimize=all_subs ;
|
|
||||||
|
|
||||||
lin
|
lin
|
||||||
|
|
||||||
RelCl cl = {
|
RelCl cl = {
|
||||||
s = \\t,a,p,_ => "such" ++ "that" ++ cl.s ! t ! a ! p ! ODir ;
|
s = \\m,p,_ => "ka" ++ cl.s ! m ! p
|
||||||
c = Nom
|
} ;
|
||||||
} ;
|
|
||||||
|
|
||||||
RelVP rp vp = {
|
RelVP rp vp = {
|
||||||
s = \\t,ant,b,ag =>
|
s = \\m,p,ag => rp.s ! Nom ++ buildVerb vp.v m p (toAgr (fromAgr ag).n P3 (fromAgr ag).g) ++ vp.s2 ! ag
|
||||||
let
|
} ;
|
||||||
agr = case rp.a of {
|
|
||||||
RNoAg => ag ;
|
RelSlash rp slash = { -- FIXME - vârdu secîba; nevis 'kas mîl viòu' bet 'kas viòu mîl'
|
||||||
RAg a => a
|
s = \\m,p,ag =>
|
||||||
} ;
|
slash.p.s ++ rp.s ! (slash.p.c ! Sg) ++ slash.s ! m ! p ;
|
||||||
cl = mkClause (rp.s ! RC (fromAgr agr).g Nom) agr vp
|
} ;
|
||||||
in
|
{-
|
||||||
cl.s ! t ! ant ! b ! ODir ;
|
|
||||||
c = Nom
|
|
||||||
} ;
|
|
||||||
|
|
||||||
-- Pied piping: "at which we are looking". Stranding and empty
|
-- Pied piping: "at which we are looking". Stranding and empty
|
||||||
-- relative are defined in $ExtraEng.gf$ ("that we are looking at",
|
-- relative are defined in $ExtraEng.gf$ ("that we are looking at",
|
||||||
-- "we are looking at").
|
-- "we are looking at").
|
||||||
|
|
||||||
RelSlash rp slash = {
|
|
||||||
s = \\t,a,p,agr =>
|
|
||||||
slash.c2 ++ rp.s ! RPrep (fromAgr agr).g ++ slash.s ! t ! a ! p ! ODir ;
|
|
||||||
c = Acc
|
|
||||||
} ;
|
|
||||||
|
|
||||||
FunRP p np rp = {
|
FunRP p np rp = {
|
||||||
s = \\c => np.s ! Acc ++ p.s ++ rp.s ! RPrep (fromAgr np.a).g ;
|
s = \\c => np.s ! Acc ++ p.s ++ rp.s ! RPrep (fromAgr np.a).g ;
|
||||||
a = RAg np.a
|
a = RAg np.a
|
||||||
} ;
|
} ;
|
||||||
|
-}
|
||||||
|
--FIXME placeholder
|
||||||
|
FunRP p np rp = { s = \\_ => NON_EXISTENT } ;
|
||||||
|
|
||||||
|
IdRP = {
|
||||||
|
s = table {
|
||||||
|
Nom => "kas";
|
||||||
|
Gen => "kâ";
|
||||||
|
Dat => "kam";
|
||||||
|
Acc => "ko";
|
||||||
|
Loc => "kur";
|
||||||
|
ResLav.Voc => NON_EXISTENT
|
||||||
|
}
|
||||||
|
};
|
||||||
|
{-
|
||||||
IdRP =
|
IdRP =
|
||||||
{ s = table {
|
{ s = table {
|
||||||
RC _ Gen => "whose" ;
|
RC _ Gen => "whose" ;
|
||||||
@@ -47,6 +51,5 @@ concrete RelativeLav of Relative = CatLav ** open ResLav in {
|
|||||||
RPrep _ => "whom"
|
RPrep _ => "whom"
|
||||||
} ;
|
} ;
|
||||||
a = RNoAg
|
a = RNoAg
|
||||||
} ;
|
} ; -}
|
||||||
-}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ resource ResLav = ParamX ** open Prelude in {
|
|||||||
param
|
param
|
||||||
|
|
||||||
-- Nouns
|
-- Nouns
|
||||||
Case = Nom | Gen | Dat | Acc | Loc ;
|
Case = Nom | Gen | Dat | Acc | Loc | Voc;
|
||||||
Gender = Masc | Fem ;
|
Gender = Masc | Fem ;
|
||||||
Restriction = AllForms | SgOnly | PlOnly | SgGenOnly | PlGenOnly ;
|
Restriction = AllForms | SgOnly | PlOnly | SgGenOnly | PlGenOnly ;
|
||||||
NounDecl = D0 | D1 | D2 | D3 | D4 | D5 | D6 | DR ;
|
NounDecl = D0 | D1 | D2 | D3 | D4 | D5 | D6 | DR ;
|
||||||
@@ -21,6 +21,7 @@ resource ResLav = ParamX ** open Prelude in {
|
|||||||
-- Adjectives
|
-- Adjectives
|
||||||
Definite = Indef | Def ;
|
Definite = Indef | Def ;
|
||||||
AdjType = AdjQual | AdjRel | AdjIndecl ;
|
AdjType = AdjQual | AdjRel | AdjIndecl ;
|
||||||
|
AForm = AAdj Degree Definite Gender Number Case | AAdv Degree; --TODO pârveidot uz ðâdu formu lai ir arî apstâkïa vârdi kas atvasinâti no îpaðîbas vârdiem
|
||||||
|
|
||||||
-- Verbs
|
-- Verbs
|
||||||
-- Ind = Indicative
|
-- Ind = Indicative
|
||||||
@@ -28,14 +29,18 @@ resource ResLav = ParamX ** open Prelude in {
|
|||||||
-- Deb = Debitive (Latvian specific: http://www.isocat.org/rest/dc/3835)
|
-- Deb = Debitive (Latvian specific: http://www.isocat.org/rest/dc/3835)
|
||||||
-- Condit = Conditional
|
-- Condit = Conditional
|
||||||
-- DebitiveRelative - the relative subtype of debitive
|
-- DebitiveRelative - the relative subtype of debitive
|
||||||
VerbForm = Infinitive | Indicative Person Number Tense | Relative Tense | Debitive |
|
VerbForm = Infinitive | Indicative Person Number Tense | Relative Tense | Debitive | Imperative Number |
|
||||||
DebitiveRelative | Participle Gender Number Case ; -- Imperative nav pielikts, bet tur ir kaut kâdas îpatnîbas globâlajâ ParamsX modulî par imperatîvu
|
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 | Deb Anteriority Tense | Condit Anteriority ;
|
||||||
VerbConj = C2 | C3 ;
|
VerbConj = C2 | C3 ;
|
||||||
|
|
||||||
Agr = Ag Gender Number ;
|
--Agr = Ag Gender Number ;
|
||||||
|
Agr = AgP1 Number | AgP2 Number | AgP3 Number Gender ;
|
||||||
|
|
||||||
ThisOrThat = This | That ;
|
ThisOrThat = This | That ;
|
||||||
|
CardOrd = NCard | NOrd ;
|
||||||
|
DForm = unit | teen | ten ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
|
||||||
@@ -48,7 +53,40 @@ resource ResLav = ParamX ** open Prelude in {
|
|||||||
|
|
||||||
NON_EXISTENT : Str = "NON_EXISTENT" ;
|
NON_EXISTENT : Str = "NON_EXISTENT" ;
|
||||||
|
|
||||||
|
Verb : Type = {s : Polarity => VerbForm => Str} ;
|
||||||
|
VP = {v : Verb ; s2 : Agr => Str} ; -- s2 = object(s), complements, adverbial modifiers.
|
||||||
|
VPSlash = VP ** {p : prep} ; -- principâ rekur ir objekts kuram jau kaut kas ir bet ir vçl viena brîva valence..
|
||||||
|
prep = {s : Str; c : Number => Case};
|
||||||
|
--Valence : Type = { p : Prep; c: Number=>Case }; -- e.g. 'ar' + Sg-Acc or Pl-Dat; Preposition may be skipped for simple case-baced valences
|
||||||
|
|
||||||
|
toAgr : Number -> Person -> Gender -> Agr = \n,p,g ->
|
||||||
|
case p of {
|
||||||
|
P1 => AgP1 n ;
|
||||||
|
P2 => AgP2 n ;
|
||||||
|
P3 => AgP3 n g
|
||||||
|
} ;
|
||||||
|
fromAgr : Agr -> {n : Number ; p : Person ; g : Gender} = \a -> case a of {
|
||||||
|
AgP1 n => {n = n ; p = P1 ; g = Masc} ; --fixme 'es esmu skaista' failos...
|
||||||
|
AgP2 n => {n = n ; p = P2 ; g = Masc} ; -- fixme 'tu esi skaista' failos...
|
||||||
|
AgP3 n g => {n = n ; p = P3 ; g = g}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
conjAgr : Agr -> Agr -> Agr = \a0,b0 ->
|
||||||
|
let a = fromAgr a0 ; b = fromAgr b0
|
||||||
|
in
|
||||||
|
toAgr
|
||||||
|
(conjNumber a.n b.n)
|
||||||
|
(conjPerson a.p b.p) --FIXME - personu apvienoðana ir tricky un ir jâuztaisa korekti
|
||||||
|
(conjGender a.g b.g) ;
|
||||||
|
|
||||||
|
conjGender : Gender -> Gender -> Gender = \a,b ->
|
||||||
|
case a of {
|
||||||
|
Fem => b ;
|
||||||
|
_ => Masc
|
||||||
|
} ;
|
||||||
|
|
||||||
|
agrgP3 : Number -> Gender -> Agr = \n,g -> toAgr n P3 g ;
|
||||||
|
|
||||||
{-
|
{-
|
||||||
-- Agreement of $NP$ has 8 values. $Gender$ is needed for "who"/"which" and
|
-- Agreement of $NP$ has 8 values. $Gender$ is needed for "who"/"which" and
|
||||||
-- for "himself"/"herself"/"itself".
|
-- for "himself"/"herself"/"itself".
|
||||||
|
|||||||
@@ -1,91 +1,52 @@
|
|||||||
concrete SentenceLav of Sentence = CatLav ** open Prelude, ResLav, ParadigmsVerbsLav in {
|
concrete SentenceLav of Sentence = CatLav ** open Prelude, ResLav, VerbLav in {
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
|
PredVP np vp = mkClause np vp;
|
||||||
|
|
||||||
|
ImpVP vp = {
|
||||||
|
s = \\pol, n => vp.v.s ! pol ! (Imperative n) ++ vp.s2 ! (AgP2 n)
|
||||||
|
} ;
|
||||||
|
|
||||||
|
SlashVP np vp =
|
||||||
|
mkClause np vp ** {p = vp.p} ;
|
||||||
|
AdvSlash slash adv = {
|
||||||
|
s = \\m,p => slash.s ! m ! p ++ adv.s ;
|
||||||
|
p = slash.p
|
||||||
|
} ;
|
||||||
|
SlashPrep cl prep = cl ** {p = prep};
|
||||||
|
SlashVS np vs slash = mkClause np (lin VP {v = vs; s2 = \\_ => "," ++ vs.subj.s ++ slash.s}) ** {p = slash.p};
|
||||||
|
|
||||||
|
ComplVS v s = {v = v; s2 = \\_ => "," ++ v.subj.s ++ s.s};
|
||||||
|
|
||||||
|
EmbedS s = {s = "ka" ++ s.s} ; --TODO - noèekot kâpçc te ir tieði 'ka'
|
||||||
|
EmbedQS qs = {s = qs.s } ;
|
||||||
|
EmbedVP vp = {s = build_VP vp Pos Infinitive (AgP3 Pl Masc)} ; --FIXME - neesmu lîdz galam droðs vai agreement ir tieði (AgPr Pl)
|
||||||
|
|
||||||
UseCl t p cl = {s = t.s ++ p.s ++ cl.s ! (Ind t.a t.t) ! p.p} ;
|
UseCl t p cl = {s = t.s ++ p.s ++ cl.s ! (Ind t.a t.t) ! p.p} ;
|
||||||
|
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 };
|
||||||
|
UseSlash t p slash = {s = t.s ++ p.s ++ slash.s ! (Ind t.a t.t) ! p.p; p = slash.p};
|
||||||
|
|
||||||
PredVP np vp =
|
--FIXME placeholder
|
||||||
let
|
AdvS a s = { s = NON_EXISTENT } ;
|
||||||
part = vp.v.s ! ResLav.Pos ! (Participle np.g np.n Nom) ;
|
|
||||||
obj = vp.obj ! (Ag np.g np.n)
|
oper
|
||||||
in {
|
mkClause : NP -> VP -> Cl = \np,vp -> lin Cl {
|
||||||
s = \\mood,pol =>
|
s = \\mood,pol =>
|
||||||
case mood of { -- Subject
|
case mood of { -- Subject
|
||||||
Deb _ _ => np.s ! Dat ;
|
Deb _ _ => np.s ! Dat ; -- FIXME jâèeko valences, reizçm arî îstenîbas izteiksmç - 'man patîk kaut kas'
|
||||||
_ => np.s ! Nom
|
_ => np.s ! Nom
|
||||||
} ++
|
} ++
|
||||||
case mood of { -- Verb
|
buildVerb vp.v mood pol np.a ++ -- Verb
|
||||||
Ind Simul tense => vp.v.s ! pol ! (Indicative np.p np.n tense) ;
|
vp.s2 ! np.a -- Object(s), complements, adverbial modifiers;
|
||||||
Ind Anter tense => mkVerb_toBe.s ! pol ! (Indicative np.p np.n tense) ++ part ;
|
|
||||||
|
|
||||||
Rel _ Past => ResLav.NON_EXISTENT ; -- FIXME (?)
|
|
||||||
Rel Simul tense => vp.v.s ! pol ! (Relative tense) ;
|
|
||||||
Rel Anter tense => mkVerb_toBe.s ! pol ! (Relative tense) ++ part ;
|
|
||||||
|
|
||||||
Deb Simul tense => mkVerb_toBe.s ! pol ! (Indicative P3 Sg tense) ++
|
|
||||||
vp.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) ++ vp.v.s ! ResLav.Pos ! Debitive ;
|
|
||||||
|
|
||||||
Condit Simul => vp.v.s ! pol ! (Indicative np.p np.n Cond) ;
|
|
||||||
Condit Anter => mkVerb_toBe.s ! pol ! (Indicative np.p np.n Cond) ++ part
|
|
||||||
} ++
|
|
||||||
obj -- Object
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
{-
|
{-
|
||||||
PredVP np vp = mkClause (np.s ! Nom) np.a vp ;
|
|
||||||
|
|
||||||
PredSCVP sc vp = mkClause sc.s (agrP3 Sg) vp ;
|
PredSCVP sc vp = mkClause sc.s (agrP3 Sg) vp ;
|
||||||
|
|
||||||
ImpVP vp = {
|
|
||||||
s = \\pol,n =>
|
|
||||||
let
|
|
||||||
agr = AgP2 (numImp n) ;
|
|
||||||
verb = infVP True vp agr ;
|
|
||||||
dont = case pol of {
|
|
||||||
CNeg True => "don't" ;
|
|
||||||
CNeg False => "do" ++ "not" ;
|
|
||||||
_ => []
|
|
||||||
}
|
|
||||||
in
|
|
||||||
dont ++ verb
|
|
||||||
} ;
|
|
||||||
|
|
||||||
SlashVP np vp =
|
|
||||||
mkClause (np.s ! Nom) np.a vp ** {c2 = vp.c2} ;
|
|
||||||
|
|
||||||
AdvSlash slash adv = {
|
|
||||||
s = \\t,a,b,o => slash.s ! t ! a ! b ! o ++ adv.s ;
|
|
||||||
c2 = slash.c2
|
|
||||||
} ;
|
|
||||||
|
|
||||||
SlashPrep cl prep = cl ** {c2 = prep.s} ;
|
|
||||||
|
|
||||||
SlashVS np vs slash =
|
|
||||||
mkClause (np.s ! Nom) np.a
|
|
||||||
(insertObj (\\_ => conjThat ++ slash.s) (predV vs)) **
|
|
||||||
{c2 = slash.c2} ;
|
|
||||||
|
|
||||||
EmbedS s = {s = conjThat ++ s.s} ;
|
|
||||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
|
||||||
EmbedVP vp = {s = infVP False vp (agrP3 Sg)} ; --- agr
|
|
||||||
|
|
||||||
UseCl t p cl = {
|
|
||||||
s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! ODir
|
|
||||||
} ;
|
|
||||||
UseQCl t p cl = {
|
|
||||||
s = \\q => t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! q
|
|
||||||
} ;
|
|
||||||
UseRCl t p cl = {
|
|
||||||
s = \\r => t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! r ;
|
|
||||||
c = cl.c
|
|
||||||
} ;
|
|
||||||
UseSlash t p cl = {
|
|
||||||
s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! ctr p.p ! ODir ;
|
|
||||||
c2 = cl.c2
|
|
||||||
} ;
|
|
||||||
|
|
||||||
AdvS a s = {s = a.s ++ "," ++ s.s} ;
|
AdvS a s = {s = a.s ++ "," ++ s.s} ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
concrete StructuralLav of Structural = CatLav **
|
concrete StructuralLav of Structural = CatLav **
|
||||||
open MorphoLav, ResLav, ParadigmsLav, ParadigmsPronounsLav, MakeStructuralLav,
|
open MorphoLav, ResLav, ParadigmsLav, ParadigmsPronounsLav, MakeStructuralLav, Prelude in {
|
||||||
(C = ConstructX), Prelude in {
|
|
||||||
|
|
||||||
flags
|
flags
|
||||||
optimize = all ;
|
optimize = all ;
|
||||||
@@ -24,23 +23,349 @@ lin
|
|||||||
n = Pl ;
|
n = Pl ;
|
||||||
d = Indef
|
d = Indef
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
this_Quant = {
|
||||||
|
s = (mkPronoun_ThisThat This).s ;
|
||||||
|
d = Def
|
||||||
|
} ;
|
||||||
|
|
||||||
|
that_Quant = {
|
||||||
|
s = (mkPronoun_ThisThat That).s ;
|
||||||
|
d = Def
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
i_Pron = {
|
||||||
|
s = table {
|
||||||
|
Nom => "es";
|
||||||
|
Gen => "manis";
|
||||||
|
Dat => "man";
|
||||||
|
Acc => "mani";
|
||||||
|
Loc => "manī";
|
||||||
|
Voc => NON_EXISTENT
|
||||||
|
} ;
|
||||||
|
possessive = table {
|
||||||
|
Masc => table {
|
||||||
|
Sg => table {
|
||||||
|
Nom => "mans";
|
||||||
|
Gen => "mana";
|
||||||
|
Dat => "manam";
|
||||||
|
Acc => "manu";
|
||||||
|
Loc => "manā";
|
||||||
|
Voc => "mans"
|
||||||
|
};
|
||||||
|
Pl => table {
|
||||||
|
Nom => "mani";
|
||||||
|
Gen => "manu";
|
||||||
|
Dat => "maniem";
|
||||||
|
Acc => "manus";
|
||||||
|
Loc => "manos";
|
||||||
|
Voc => "mani"
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
Fem => table {
|
||||||
|
Sg => table {
|
||||||
|
Nom => "mana";
|
||||||
|
Gen => "manas";
|
||||||
|
Dat => "manai";
|
||||||
|
Acc => "manu";
|
||||||
|
Loc => "manā";
|
||||||
|
Voc => "mana"
|
||||||
|
};
|
||||||
|
Pl => table {
|
||||||
|
Nom => "manas";
|
||||||
|
Gen => "manu";
|
||||||
|
Dat => "manām";
|
||||||
|
Acc => "manas";
|
||||||
|
Loc => "manās";
|
||||||
|
Voc => "manas"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
a = AgP1 Sg ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
we_Pron = {
|
||||||
|
s = table {
|
||||||
|
Nom => "mēs";
|
||||||
|
Gen => "mūsu";
|
||||||
|
Dat => "mums";
|
||||||
|
Acc => "mūs";
|
||||||
|
Loc => "mūsos";
|
||||||
|
Voc => NON_EXISTENT
|
||||||
|
} ;
|
||||||
|
possessive = table {
|
||||||
|
_ => table {
|
||||||
|
_ => table {
|
||||||
|
_ => "mūsu"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
a = AgP1 Pl ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
youSg_Pron = {
|
||||||
|
s = table {
|
||||||
|
Nom => "tu";
|
||||||
|
Gen => "tevis";
|
||||||
|
Dat => "tev";
|
||||||
|
Acc => "tevi";
|
||||||
|
Loc => "tevī";
|
||||||
|
Voc => "tu"
|
||||||
|
} ;
|
||||||
|
possessive = table {
|
||||||
|
Masc => table {
|
||||||
|
Sg => table {
|
||||||
|
Nom => "tavs";
|
||||||
|
Gen => "tava";
|
||||||
|
Dat => "tavam";
|
||||||
|
Acc => "tavu";
|
||||||
|
Loc => "tavā" ;
|
||||||
|
Voc => "tavs"
|
||||||
|
};
|
||||||
|
Pl => table {
|
||||||
|
Nom => "tavi";
|
||||||
|
Gen => "tavu";
|
||||||
|
Dat => "taviem";
|
||||||
|
Acc => "tavus";
|
||||||
|
Loc => "tavos";
|
||||||
|
Voc => "tavi"
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
Fem => table {
|
||||||
|
Sg => table {
|
||||||
|
Nom => "tava";
|
||||||
|
Gen => "tavas";
|
||||||
|
Dat => "tavai";
|
||||||
|
Acc => "tavu";
|
||||||
|
Loc => "tavā";
|
||||||
|
Voc => "tava"
|
||||||
|
};
|
||||||
|
Pl => table {
|
||||||
|
Nom => "tavas";
|
||||||
|
Gen => "tavu";
|
||||||
|
Dat => "tavām";
|
||||||
|
Acc => "tavas";
|
||||||
|
Loc => "tavās";
|
||||||
|
Voc => "tavas"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
a = AgP2 Sg ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
youPl_Pron = {
|
||||||
|
s = table {
|
||||||
|
Nom => "jūs";
|
||||||
|
Gen => "jūsu";
|
||||||
|
Dat => "jums";
|
||||||
|
Acc => "jūs";
|
||||||
|
Loc => "jūsos";
|
||||||
|
Voc => "jūs"
|
||||||
|
} ;
|
||||||
|
possessive = table {
|
||||||
|
_ => table {
|
||||||
|
_ => table {
|
||||||
|
_ => "jūsu"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
a = AgP2 Pl ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
youPol_Pron = {
|
||||||
|
s = table {
|
||||||
|
Nom => "jūs";
|
||||||
|
Gen => "jūsu";
|
||||||
|
Dat => "jums";
|
||||||
|
Acc => "jūs";
|
||||||
|
Loc => "jūsos";
|
||||||
|
Voc => "jūs"
|
||||||
|
} ;
|
||||||
|
possessive = table {
|
||||||
|
_ => table {
|
||||||
|
_ => table {
|
||||||
|
_ => "jūsu"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
a = AgP2 Pl ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
he_Pron = {
|
||||||
|
s = (\\c => (mkPronoun_Gend "viņš").s ! Masc ! Sg ! c) ;
|
||||||
|
possessive = table {
|
||||||
|
_ => table {
|
||||||
|
_ => table {
|
||||||
|
_ => "viņa"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
a = AgP3 Sg Masc ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
she_Pron = {
|
||||||
|
s = (\\c => (mkPronoun_Gend "viņš").s ! Fem ! Sg ! c) ;
|
||||||
|
possessive = table {
|
||||||
|
_ => table {
|
||||||
|
_ => table {
|
||||||
|
_ => "viņas"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
a = AgP3 Sg Fem ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
they_Pron = {
|
||||||
|
s = (\\c => (mkPronoun_Gend "viņš").s ! Masc ! Pl ! c) ;
|
||||||
|
possessive = table {
|
||||||
|
_ => table {
|
||||||
|
_ => table {
|
||||||
|
_ => "viņu"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
a = AgP3 Pl Masc ;
|
||||||
|
} |
|
||||||
|
{
|
||||||
|
s = (\\c => (mkPronoun_Gend "viņš").s ! Fem ! Pl ! c) ;
|
||||||
|
possessive = table {
|
||||||
|
_ => table {
|
||||||
|
_ => table {
|
||||||
|
_ => "viņu"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
a = AgP3 Pl Fem ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
it_Pron = {
|
||||||
|
s = \\c => (mkPronoun_ThisThat That).s ! Masc ! Sg ! c;
|
||||||
|
possessive = table { _ => table { _ => table { _ => "tā" }}};
|
||||||
|
a = AgP3 Sg Masc
|
||||||
|
} | {
|
||||||
|
s = \\c => (mkPronoun_ThisThat That).s ! Fem ! Sg ! c;
|
||||||
|
possessive = table { _ => table { _ => table { _ => "tās" }}};
|
||||||
|
a = AgP3 Sg Fem
|
||||||
|
};
|
||||||
|
|
||||||
|
-- manuprāt prievārdi tomēr ir valodas-specifiski un nebūtu tieši 1-pret-1 jātulko
|
||||||
|
above_Prep = mkPrep "virs" Gen Dat;
|
||||||
|
after_Prep = mkPrep "pēc" Gen Dat;
|
||||||
|
before_Prep = mkPrep "pirms" Gen Dat;
|
||||||
|
behind_Prep = mkPrep "aiz" Gen Dat;
|
||||||
|
between_Prep = mkPrep "starp" Acc Dat;
|
||||||
|
for_Prep = mkPrep "priekš" Gen Dat;
|
||||||
|
from_Prep = mkPrep "no" Gen Dat;
|
||||||
|
on_Prep = mkPrep "uz" Gen Dat;
|
||||||
|
with_Prep = mkPrep "ar" Acc Dat; -- ar sievu, ar sievām
|
||||||
|
in_Prep = mkPrep Loc ;
|
||||||
|
to_Prep = mkPrep "līdz" Dat Dat; --FIXME - ļoti dažādi tulkojas
|
||||||
|
possess_Prep = mkPrep Gen ; --FIXME - reku vajadzētu vārdu secību otrādi, ka pirms paskaidrojamā vārda likt
|
||||||
|
under_Prep = mkPrep "zem" Gen Dat;
|
||||||
|
with_Prep = mkPrep "ar" Acc Dat;
|
||||||
|
without_Prep = mkPrep "bez" Gen Dat;
|
||||||
|
|
||||||
|
very_AdA = mkAdA "ļoti" ;
|
||||||
|
almost_AdA = mkAdA "gandrīz" ;
|
||||||
|
so_AdA = mkAdA "tik" ;
|
||||||
|
too_AdA = mkAdA "pārāk" ;
|
||||||
|
|
||||||
|
and_Conj = mkConj "un" ;
|
||||||
|
or_Conj = mkConj "vai" Sg ;
|
||||||
|
|
||||||
|
but_PConj = ss "bet" ;
|
||||||
|
otherwise_PConj = ss "tomēr" ; --?
|
||||||
|
therefore_PConj = ss "tātad" ; --?
|
||||||
|
|
||||||
|
more_CAdv = (mkCAdv [] "nekā" Compar) | (mkCAdv "vairāk" "nekā" Posit);
|
||||||
|
less_CAdv = mkCAdv "mazāk" "nekā" Posit;
|
||||||
|
as_CAdv = mkCAdv "tikpat" "kā" Posit;
|
||||||
|
|
||||||
|
here_Adv = mkAdv "šeit" ;
|
||||||
|
there_Adv = mkAdv "tur" ;
|
||||||
|
|
||||||
|
both7and_DConj = mkConj "gan" ("," ++ "gan"); --FIXME - komati nav tā kā vajag
|
||||||
|
either7or_DConj = mkConj ("vai" ++ "nu") ("," ++ "vai") Sg ; --FIXME - komati nav tā kā vajag
|
||||||
|
|
||||||
|
want_VV = mkVV (mkV "gribēt" third_conjugation) ;
|
||||||
|
|
||||||
|
whoSg_IP = {
|
||||||
|
s = table {
|
||||||
|
Nom => "kurš"; -- FIXME - Fem?
|
||||||
|
Gen => "kura";
|
||||||
|
Dat => "kuram";
|
||||||
|
Acc => "kuru";
|
||||||
|
Loc => "kurā";
|
||||||
|
Voc => NON_EXISTENT
|
||||||
|
};
|
||||||
|
n = Sg
|
||||||
|
};
|
||||||
|
whoPl_IP = {
|
||||||
|
s = table {
|
||||||
|
Nom => "kuri";
|
||||||
|
Gen => "kuru";
|
||||||
|
Dat => "kuriem";
|
||||||
|
Acc => "kurus";
|
||||||
|
Loc => "kuros";
|
||||||
|
Voc => NON_EXISTENT
|
||||||
|
};
|
||||||
|
n = Pl
|
||||||
|
};
|
||||||
|
|
||||||
|
why_IAdv = ss "kāpēc" ;
|
||||||
|
how_IAdv = ss "kā" ;
|
||||||
|
how8much_IAdv = ss "cik daudz" ;
|
||||||
|
when_IAdv = ss "kad" ;
|
||||||
|
where_IAdv = ss "kur" ;
|
||||||
|
|
||||||
|
which_IQuant = {s = table {
|
||||||
|
Masc => table { Sg => "kurš"; Pl => "kuri"};
|
||||||
|
Fem => table { Sg => "kura"; Pl => "kuras"}
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
when_Subj = ss "kad" ;
|
||||||
|
although_Subj = ss "kaut arī" ;
|
||||||
|
because_Subj = ss "jo" ;
|
||||||
|
if_Subj = ss "ja" ;
|
||||||
|
that_Subj = ss "ka" ; -- ja pareizi saprotu šo konkrēto 'that' pielietojumu
|
||||||
|
|
||||||
|
all_Predet = { s = table {
|
||||||
|
Masc => "visi";
|
||||||
|
Fem => "visas"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
only_Predet = { s = table { _ => "tikai"} };
|
||||||
|
most_Predet = { s = table { _ => "vairums"} };
|
||||||
|
|
||||||
|
yes_Utt = ss "jā" ;
|
||||||
|
please_Voc = ss "lūdzu" ;
|
||||||
|
|
||||||
|
almost_AdN = mkAdN "gandrīz" ;
|
||||||
|
at_least_AdN = mkAdN "vismaz" ;
|
||||||
|
at_most_AdN = mkAdN "ne vairāk kā" ;
|
||||||
|
|
||||||
|
always_AdV = mkAdV "vienmēr" ;
|
||||||
|
|
||||||
|
--FIXME placeholder
|
||||||
|
by8agent_Prep = mkPrep NON_EXISTENT Nom Nom;
|
||||||
|
whatSg_IP = {s = \\_ => NON_EXISTENT; n= Sg};
|
||||||
|
|
||||||
|
oper
|
||||||
|
reflPron : Case => Str = table {
|
||||||
|
Nom => NON_EXISTENT;
|
||||||
|
Gen => "sevis";
|
||||||
|
Dat => "sev";
|
||||||
|
Acc => "sevi";
|
||||||
|
Loc => "sevī";
|
||||||
|
Voc => NON_EXISTENT
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lai_Subj = ss "lai" ;
|
||||||
|
kameer_Subj = ss "kamēr" ;
|
||||||
|
|
||||||
{-
|
{-
|
||||||
above_Prep = mkPrep "above" ;
|
|
||||||
after_Prep = mkPrep "after" ;
|
|
||||||
all_Predet = ss "all" ;
|
|
||||||
almost_AdA = mkAdA "almost" ;
|
|
||||||
almost_AdN = mkAdN "almost" ;
|
|
||||||
although_Subj = ss "although" ;
|
|
||||||
always_AdV = mkAdV "always" ;
|
|
||||||
and_Conj = mkConj "and" ;
|
|
||||||
because_Subj = ss "because" ;
|
|
||||||
before_Prep = mkPrep "before" ;
|
|
||||||
behind_Prep = mkPrep "behind" ;
|
|
||||||
between_Prep = mkPrep "between" ;
|
|
||||||
both7and_DConj = mkConj "both" "and";
|
|
||||||
but_PConj = ss "but" ;
|
|
||||||
by8agent_Prep = mkPrep "by" ;
|
by8agent_Prep = mkPrep "by" ;
|
||||||
by8means_Prep = mkPrep "by" ;
|
by8means_Prep = mkPrep "by" ;
|
||||||
can8know_VV, can_VV = {
|
can8know_VV, can_VV = {
|
||||||
@@ -56,31 +381,17 @@ lin
|
|||||||
isAux = True
|
isAux = True
|
||||||
} ;
|
} ;
|
||||||
during_Prep = mkPrep "during" ;
|
during_Prep = mkPrep "during" ;
|
||||||
either7or_DConj = mkConj "either" "or" singular ;
|
|
||||||
everybody_NP = regNP "everybody" singular ;
|
everybody_NP = regNP "everybody" singular ;
|
||||||
every_Det = mkDeterminer singular "every" ;
|
every_Det = mkDeterminer singular "every" ;
|
||||||
everything_NP = regNP "everything" singular ;
|
everything_NP = regNP "everything" singular ;
|
||||||
everywhere_Adv = mkAdv "everywhere" ;
|
everywhere_Adv = mkAdv "everywhere" ;
|
||||||
few_Det = mkDeterminer plural "few" ;
|
few_Det = mkDeterminer plural "few" ;
|
||||||
--- first_Ord = ss "first" ; DEPRECATED
|
--- first_Ord = ss "first" ; DEPRECATED
|
||||||
for_Prep = mkPrep "for" ;
|
|
||||||
from_Prep = mkPrep "from" ;
|
|
||||||
he_Pron = mkPron "he" "him" "his" "his" singular P3 masculine ;
|
|
||||||
here_Adv = mkAdv "here" ;
|
|
||||||
here7to_Adv = mkAdv ["to here"] ;
|
here7to_Adv = mkAdv ["to here"] ;
|
||||||
here7from_Adv = mkAdv ["from here"] ;
|
here7from_Adv = mkAdv ["from here"] ;
|
||||||
how_IAdv = ss "how" ;
|
|
||||||
how8much_IAdv = ss "how much" ;
|
|
||||||
how8many_IDet = mkDeterminer plural ["how many"] ;
|
how8many_IDet = mkDeterminer plural ["how many"] ;
|
||||||
if_Subj = ss "if" ;
|
|
||||||
in8front_Prep = mkPrep ["in front of"] ;
|
in8front_Prep = mkPrep ["in front of"] ;
|
||||||
i_Pron = mkPron "I" "me" "my" "mine" singular P1 human ;
|
|
||||||
in_Prep = mkPrep "in" ;
|
|
||||||
it_Pron = mkPron "it" "it" "its" "its" singular P3 nonhuman ;
|
|
||||||
less_CAdv = C.mkCAdv "less" "than" ;
|
|
||||||
many_Det = mkDeterminer plural "many" ;
|
many_Det = mkDeterminer plural "many" ;
|
||||||
more_CAdv = C.mkCAdv "more" "than" ;
|
|
||||||
most_Predet = ss "most" ;
|
|
||||||
much_Det = mkDeterminer singular "much" ;
|
much_Det = mkDeterminer singular "much" ;
|
||||||
must_VV = {
|
must_VV = {
|
||||||
s = table {
|
s = table {
|
||||||
@@ -96,54 +407,26 @@ lin
|
|||||||
} ;
|
} ;
|
||||||
---b no_Phr = ss "no" ;
|
---b no_Phr = ss "no" ;
|
||||||
no_Utt = ss "no" ;
|
no_Utt = ss "no" ;
|
||||||
on_Prep = mkPrep "on" ;
|
|
||||||
---- one_Quant = mkDeterminer singular "one" ; -- DEPRECATED
|
---- one_Quant = mkDeterminer singular "one" ; -- DEPRECATED
|
||||||
only_Predet = ss "only" ;
|
|
||||||
or_Conj = mkConj "or" singular ;
|
|
||||||
otherwise_PConj = ss "otherwise" ;
|
|
||||||
part_Prep = mkPrep "of" ;
|
part_Prep = mkPrep "of" ;
|
||||||
please_Voc = ss "please" ;
|
|
||||||
possess_Prep = mkPrep "of" ;
|
|
||||||
quite_Adv = mkAdv "quite" ;
|
quite_Adv = mkAdv "quite" ;
|
||||||
she_Pron = mkPron "she" "her" "her" "hers" singular P3 feminine ;
|
|
||||||
so_AdA = mkAdA "so" ;
|
|
||||||
somebody_NP = regNP "somebody" singular ;
|
somebody_NP = regNP "somebody" singular ;
|
||||||
someSg_Det = mkDeterminer singular "some" ;
|
|
||||||
somePl_Det = mkDeterminer plural "some" ;
|
|
||||||
something_NP = regNP "something" singular ;
|
something_NP = regNP "something" singular ;
|
||||||
somewhere_Adv = mkAdv "somewhere" ;
|
somewhere_Adv = mkAdv "somewhere" ;
|
||||||
that_Quant = mkQuant "that" "those" ;
|
that_Quant = mkQuant "that" "those" ;
|
||||||
there_Adv = mkAdv "there" ;
|
|
||||||
there7to_Adv = mkAdv "there" ;
|
there7to_Adv = mkAdv "there" ;
|
||||||
there7from_Adv = mkAdv ["from there"] ;
|
there7from_Adv = mkAdv ["from there"] ;
|
||||||
therefore_PConj = ss "therefore" ;
|
|
||||||
they_Pron = mkPron "they" "them" "their" "theirs" plural P3 human ;
|
|
||||||
this_Quant = mkQuant "this" "these" ;
|
this_Quant = mkQuant "this" "these" ;
|
||||||
through_Prep = mkPrep "through" ;
|
through_Prep = mkPrep "through" ;
|
||||||
too_AdA = mkAdA "too" ;
|
|
||||||
to_Prep = mkPrep "to" ;
|
|
||||||
under_Prep = mkPrep "under" ;
|
|
||||||
very_AdA = mkAdA "very" ;
|
|
||||||
want_VV = mkVV (regV "want") ;
|
|
||||||
we_Pron = mkPron "we" "us" "our" "ours" plural P1 human ;
|
|
||||||
whatPl_IP = mkIP "what" "what" "what's" plural ;
|
whatPl_IP = mkIP "what" "what" "what's" plural ;
|
||||||
whatSg_IP = mkIP "what" "what" "what's" singular ;
|
whatSg_IP = mkIP "what" "what" "what's" singular ;
|
||||||
when_IAdv = ss "when" ;
|
|
||||||
when_Subj = ss "when" ;
|
|
||||||
where_IAdv = ss "where" ;
|
|
||||||
which_IQuant = {s = \\_ => "which"} ;
|
|
||||||
---b whichPl_IDet = mkDeterminer plural ["which"] ;
|
---b whichPl_IDet = mkDeterminer plural ["which"] ;
|
||||||
---b whichSg_IDet = mkDeterminer singular ["which"] ;
|
---b whichSg_IDet = mkDeterminer singular ["which"] ;
|
||||||
whoPl_IP = mkIP "who" "whom" "whose" plural ;
|
whoPl_IP = mkIP "who" "whom" "whose" plural ;
|
||||||
whoSg_IP = mkIP "who" "whom" "whose" singular ;
|
whoSg_IP = mkIP "who" "whom" "whose" singular ;
|
||||||
why_IAdv = ss "why" ;
|
|
||||||
without_Prep = mkPrep "without" ;
|
|
||||||
with_Prep = mkPrep "with" ;
|
|
||||||
---b yes_Phr = ss "yes" ;
|
---b yes_Phr = ss "yes" ;
|
||||||
yes_Utt = ss "yes" ;
|
|
||||||
youSg_Pron = mkPron "you" "you" "your" "yours" singular P2 human ;
|
|
||||||
youPl_Pron = mkPron "you" "you" "your" "yours" plural P2 human ;
|
|
||||||
youPol_Pron = mkPron "you" "you" "your" "yours" singular P2 human ;
|
|
||||||
|
|
||||||
not_Predet = {s = "not" ; lock_Predet = <>} ;
|
not_Predet = {s = "not" ; lock_Predet = <>} ;
|
||||||
no_Quant = mkQuant "no" "no" "none" "none" ;
|
no_Quant = mkQuant "no" "no" "none" "none" ;
|
||||||
@@ -151,15 +434,9 @@ lin
|
|||||||
nobody_NP = regNP "nobody" singular ;
|
nobody_NP = regNP "nobody" singular ;
|
||||||
nothing_NP = regNP "nothing" singular ;
|
nothing_NP = regNP "nothing" singular ;
|
||||||
|
|
||||||
at_least_AdN = mkAdN "at least" ;
|
|
||||||
at_most_AdN = mkAdN "at most" ;
|
|
||||||
|
|
||||||
except_Prep = mkPrep "except" ;
|
except_Prep = mkPrep "except" ;
|
||||||
|
|
||||||
as_CAdv = C.mkCAdv "as" "as" ;
|
|
||||||
|
|
||||||
have_V2 = dirV2 (mk5V "have" "has" "had" "had" "having") ;
|
have_V2 = dirV2 (mk5V "have" "has" "had" "had" "having") ;
|
||||||
that_Subj = ss "that" ;
|
|
||||||
lin language_title_Utt = ss "English" ;
|
lin language_title_Utt = ss "English" ;
|
||||||
-}
|
-}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,30 +1,79 @@
|
|||||||
concrete VerbLav of Verb = CatLav ** open ResLav in {
|
concrete VerbLav of Verb = CatLav ** open ResLav, ParadigmsVerbsLav, StructuralLav in {
|
||||||
|
--FIXME - module relations. VerbLav is included in many places because of buldVerb, and includes ParadigmsVerbsLav because of mkVerb_toBe - they need to be reallocated somehow to ResLav or something similar. not so simple since morphology itself needs ResLav & friends.
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
|
|
||||||
UseV v = {v = v ; obj = \\_ => []} ;
|
UseV v = {v = v ; s2 = \\_ => []} ; -- TODO - rewrite ðo uz valencçm, lai ir semantiskâs saites
|
||||||
|
|
||||||
|
ComplVV v vp = {v = v; s2 = \\agr => build_VP vp Pos Infinitive agr};
|
||||||
|
ComplVS v s = {v = v; s2 = \\_ => "," ++ v.subj.s ++ s.s};
|
||||||
|
ComplVQ v q = {v = v; s2 = \\_ => "," ++ q.s};
|
||||||
|
ComplVA v ap = {v = v; s2 = \\agr => ap.s ! Indef ! (fromAgr agr).g ! (fromAgr agr).n ! Nom };
|
||||||
|
|
||||||
|
SlashV2a v = {v = v ; s2 = \\_ => []; p = v.p};
|
||||||
|
Slash2V3 v np = insertObjc (\\_ => v.p1.s ++ np.s ! (v.p1.c ! (fromAgr np.a).n)) {v = v; s2 = \\_ => []; p = v.p2};
|
||||||
|
Slash3V3 v np = insertObjc (\\_ => v.p2.s ++ np.s ! (v.p2.c ! (fromAgr np.a).n)) {v = v; s2 = \\_ => []; p = v.p1};
|
||||||
|
|
||||||
|
SlashV2V v vp = {v = v; s2 = \\agr => build_VP vp Pos Infinitive agr; p = v.p};
|
||||||
|
SlashV2S v s = {v = v; s2 = \\_ => "," ++ v.subj.s ++ s.s; p = v.p};
|
||||||
|
SlashV2Q v q = {v = v; s2 = \\_ => "," ++ q.s; p = v.p};
|
||||||
|
SlashV2A v ap = {v = v; s2 = \\agr => ap.s ! Indef ! (fromAgr agr).g ! (fromAgr agr).n ! Nom ; p = v.p};
|
||||||
|
|
||||||
|
ComplSlash vp np = insertObjPre (\\_ => vp.p.s ++ np.s ! (vp.p.c ! (fromAgr np.a).n)) vp;
|
||||||
|
|
||||||
|
CompAP ap = {s = \\agr => ap.s ! Indef ! (fromAgr agr).g ! (fromAgr agr).n ! Nom } ;
|
||||||
|
CompNP np = {s = \\_ => np.s ! Nom} ;
|
||||||
|
CompAdv a = {s = \\_ => a.s} ;
|
||||||
|
|
||||||
|
ReflVP vp = insertObjPre ( \\a => vp.p.s ++ reflPron ! (vp.p.c ! (fromAgr a).n)) vp;
|
||||||
|
UseComp comp = {v = lin V mkVerb_toBe; s2 = \\agr => comp.s ! agr};
|
||||||
|
|
||||||
|
AdvVP vp adv = insertObj (\\_ => adv.s) vp ;
|
||||||
|
AdVVP adv vp = insertObjPre (\\_ => adv.s) vp ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
build_VP : ResLav.VP -> Polarity -> VerbForm -> Agr -> Str = \vp,p,vf,agr -> vp.v.s ! p ! vf ++ vp.s2 ! agr;
|
||||||
|
|
||||||
|
insertObj : (Agr => Str) -> {v : Verb ; s2 : Agr => Str} -> {v : Verb ; s2 : Agr => Str} = \obj,vp -> {
|
||||||
|
v = vp.v ;
|
||||||
|
s2 = \\a => vp.s2 ! a ++ obj ! a
|
||||||
|
} ;
|
||||||
|
insertObjPre : (Agr => Str) -> {v : Verb ; s2 : Agr => Str} -> {v : Verb ; s2 : Agr => Str} = \obj,vp -> {
|
||||||
|
v = vp.v ;
|
||||||
|
s2 = \\a => obj ! a ++ vp.s2 ! a
|
||||||
|
} ;
|
||||||
|
insertObjc : (Agr => Str) -> {v : Verb ; s2 : Agr => Str; p: Prep} -> {v : Verb ; s2 : Agr => Str; p: Prep} = \obj,vp ->
|
||||||
|
insertObj obj vp ** {p = vp.p};
|
||||||
|
|
||||||
|
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)
|
||||||
|
in case mood of { -- Verb
|
||||||
|
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 ;
|
||||||
|
|
||||||
|
Rel _ Past => ResLav.NON_EXISTENT ; -- FIXME (?)
|
||||||
|
Rel Simul tense => v.s ! pol ! (Relative tense) ;
|
||||||
|
Rel Anter tense => mkVerb_toBe.s ! pol ! (Relative tense) ++ part ;
|
||||||
|
|
||||||
|
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 ;
|
||||||
|
|
||||||
|
Condit Simul => v.s ! pol ! (Indicative ag.p ag.n Cond) ;
|
||||||
|
Condit Anter => mkVerb_toBe.s ! pol ! (Indicative ag.p ag.n Cond) ++ part
|
||||||
|
};
|
||||||
|
|
||||||
|
--FIXME nav testçts
|
||||||
|
lin
|
||||||
|
SlashVV vv vp = {v = vv; s2 = \\agr => build_VP vp Pos Infinitive agr; p = vp.p};
|
||||||
|
SlashV2VNP vv np vp = insertObjc (\\_ => vv.p.s ++ np.s ! (vv.p.c ! (fromAgr np.a).n)){v = vv; s2 = \\agr => build_VP vp Pos Infinitive agr; p = vp.p};
|
||||||
|
--FIXME placeholder
|
||||||
|
PassV2 v = {v = v; s2 = \\_ => NON_EXISTENT};
|
||||||
|
|
||||||
{-
|
{-
|
||||||
UseV = predV ;
|
|
||||||
|
|
||||||
SlashV2a v = predVc v ;
|
|
||||||
Slash2V3 v np =
|
|
||||||
insertObjc (\\_ => v.c2 ++ np.s ! Acc) (predV v ** {c2 = v.c3}) ;
|
|
||||||
Slash3V3 v np =
|
|
||||||
insertObjc (\\_ => v.c3 ++ np.s ! Acc) (predVc v) ; ----
|
|
||||||
|
|
||||||
ComplVV v vp = insertObj (\\a => infVP v.isAux vp a) (predVV v) ;
|
|
||||||
ComplVS v s = insertObj (\\_ => conjThat ++ s.s) (predV v) ;
|
|
||||||
ComplVQ v q = insertObj (\\_ => q.s ! QIndir) (predV v) ;
|
|
||||||
ComplVA v ap = insertObj (ap.s) (predV v) ;
|
|
||||||
|
|
||||||
SlashV2V v vp = insertObjc (\\a => infVP v.isAux vp a) (predVc v) ;
|
|
||||||
SlashV2S v s = insertObjc (\\_ => conjThat ++ s.s) (predVc v) ;
|
|
||||||
SlashV2Q v q = insertObjc (\\_ => q.s ! QIndir) (predVc v) ;
|
|
||||||
SlashV2A v ap = insertObjc (\\a => ap.s ! a) (predVc v) ; ----
|
|
||||||
|
|
||||||
ComplSlash vp np = insertObjPre (\\_ => vp.c2 ++ np.s ! Acc) vp ;
|
|
||||||
|
|
||||||
SlashVV vv vp =
|
SlashVV vv vp =
|
||||||
insertObj (\\a => infVP vv.isAux vp a) (predVV vv) **
|
insertObj (\\a => infVP vv.isAux vp a) (predVV vv) **
|
||||||
{c2 = vp.c2} ;
|
{c2 = vp.c2} ;
|
||||||
@@ -32,21 +81,7 @@ concrete VerbLav of Verb = CatLav ** open ResLav in {
|
|||||||
insertObjPre (\\_ => vv.c2 ++ np.s ! Acc)
|
insertObjPre (\\_ => vv.c2 ++ np.s ! Acc)
|
||||||
(insertObjc (\\a => infVP vv.isAux vp a) (predVc vv)) **
|
(insertObjc (\\a => infVP vv.isAux vp a) (predVc vv)) **
|
||||||
{c2 = vp.c2} ;
|
{c2 = vp.c2} ;
|
||||||
|
|
||||||
UseComp comp = insertObj comp.s (predAux auxBe) ;
|
|
||||||
|
|
||||||
AdvVP vp adv = insertObj (\\_ => adv.s) vp ;
|
|
||||||
|
|
||||||
AdVVP adv vp = insertAdV adv.s vp ;
|
|
||||||
|
|
||||||
ReflVP v = insertObjPre (\\a => v.c2 ++ reflPron ! a) v ;
|
|
||||||
|
|
||||||
PassV2 v = insertObj (\\_ => v.s ! VPPart) (predAux auxBe) ;
|
PassV2 v = insertObj (\\_ => v.s ! VPPart) (predAux auxBe) ;
|
||||||
|
|
||||||
---b UseVS, UseVQ = \vv -> {s = vv.s ; c2 = [] ; isRefl = vv.isRefl} ; -- no "to"
|
|
||||||
|
|
||||||
CompAP ap = ap ;
|
|
||||||
CompNP np = {s = \\_ => np.s ! Acc} ;
|
|
||||||
CompAdv a = {s = \\_ => a.s} ;
|
|
||||||
-}
|
-}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user