Latvian RG: approaching RGL API

This commit is contained in:
normundsg
2011-12-19 06:03:21 +00:00
parent 342ba2e070
commit d00b425206
39 changed files with 1324 additions and 90521 deletions

View File

@@ -1,14 +1,23 @@
concrete StructuralLav of Structural = CatLav **
open MorphoLav, ResLav, ParadigmsLav, ParadigmsPronounsLav, MakeStructuralLav, Prelude in {
--# -path=.:../abstract:../common:../prelude
concrete StructuralLav of Structural = CatLav ** open
Prelude,
ResLav,
ParadigmsLav,
ParadigmsPronounsLav,
NounLav
in {
flags
optimize = all ;
coding = utf8 ;
lin
coding = utf8 ;
lin
language_title_Utt = ss "Latviešu valoda" ;
-- TODO: kā ar loģikā lietotajiem 'visi', 'katrs' ?
every_Det = {
s = (\\g,c => (mkPronoun_Gend "ikviens").s ! g ! Sg ! c) ; -- TODO - kā ar loģikā lietotajiem 'visi', 'katrs' ?
s = (\\g,c => (mkPronoun_Gend "ikviens").s ! g ! Sg ! c) ;
n = Sg ;
d = Indef
} ;
@@ -18,23 +27,42 @@ lin
n = Sg ;
d = Indef
} ;
somePl_Det = {
s = (\\g,c => (mkPronoun_Gend "kāds").s ! g ! Pl ! c) ; -- lai atļautu arī tukšo, jāliek (\\_,_ => []) | klāt
n = Pl ;
d = Indef
} ;
few_Det = {
s = (\\g,c => (mkPronoun_Gend "dažs").s ! g ! Pl ! c) ;
n = Pl ;
d = Indef
} ;
many_Det = {
s = (\\g,c => (mkPronoun_Gend "daudzs").s ! g ! Pl ! c) ; -- 'daudzs' izlocīsies korekti uz daudzskaitļa 'daudzi'
n = Pl ;
d = Indef
} ;
much_Det = {
s = (\\g,c => "daudz") ; -- FIXME - ņem saistību ar ģenitīvu; kā to realizēt?
n = Sg ;
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";
@@ -42,7 +70,7 @@ lin
Dat => "man";
Acc => "mani";
Loc => "manī";
Voc => NON_EXISTENT
ResLav.Voc => NON_EXISTENT
} ;
possessive = table {
Masc => table {
@@ -52,7 +80,7 @@ lin
Dat => "manam";
Acc => "manu";
Loc => "manā";
Voc => "mans"
ResLav.Voc => "mans"
};
Pl => table {
Nom => "mani";
@@ -60,7 +88,7 @@ lin
Dat => "maniem";
Acc => "manus";
Loc => "manos";
Voc => "mani"
ResLav.Voc => "mani"
}
} ;
Fem => table {
@@ -70,7 +98,7 @@ lin
Dat => "manai";
Acc => "manu";
Loc => "manā";
Voc => "mana"
ResLav.Voc => "mana"
};
Pl => table {
Nom => "manas";
@@ -78,7 +106,7 @@ lin
Dat => "manām";
Acc => "manas";
Loc => "manās";
Voc => "manas"
ResLav.Voc => "manas"
}
}
} ;
@@ -92,15 +120,15 @@ lin
Dat => "mums";
Acc => "mūs";
Loc => "mūsos";
Voc => NON_EXISTENT
} ;
ResLav.Voc => NON_EXISTENT
} ;
possessive = table {
_ => table {
_ => table {
_ => "mūsu"
}
}
} ;
} ;
a = AgP1 Pl ;
} ;
@@ -111,7 +139,7 @@ lin
Dat => "tev";
Acc => "tevi";
Loc => "tevī";
Voc => "tu"
ResLav.Voc => "tu"
} ;
possessive = table {
Masc => table {
@@ -121,7 +149,7 @@ lin
Dat => "tavam";
Acc => "tavu";
Loc => "tavā" ;
Voc => "tavs"
ResLav.Voc => "tavs"
};
Pl => table {
Nom => "tavi";
@@ -129,7 +157,7 @@ lin
Dat => "taviem";
Acc => "tavus";
Loc => "tavos";
Voc => "tavi"
ResLav.Voc => "tavi"
}
} ;
Fem => table {
@@ -139,7 +167,7 @@ lin
Dat => "tavai";
Acc => "tavu";
Loc => "tavā";
Voc => "tava"
ResLav.Voc => "tava"
};
Pl => table {
Nom => "tavas";
@@ -147,10 +175,10 @@ lin
Dat => "tavām";
Acc => "tavas";
Loc => "tavās";
Voc => "tavas"
ResLav.Voc => "tavas"
}
}
} ;
} ;
a = AgP2 Sg ;
} ;
@@ -161,7 +189,7 @@ lin
Dat => "jums";
Acc => "jūs";
Loc => "jūsos";
Voc => "jūs"
ResLav.Voc => "jūs"
} ;
possessive = table {
_ => table {
@@ -169,10 +197,10 @@ lin
_ => "jūsu"
}
}
} ;
} ;
a = AgP2 Pl ;
} ;
youPol_Pron = {
s = table {
Nom => "jūs";
@@ -180,7 +208,7 @@ lin
Dat => "jums";
Acc => "jūs";
Loc => "jūsos";
Voc => "jūs"
ResLav.Voc => "jūs"
} ;
possessive = table {
_ => table {
@@ -188,10 +216,10 @@ lin
_ => "jūsu"
}
}
} ;
} ;
a = AgP2 Pl ;
} ;
he_Pron = {
s = (\\c => (mkPronoun_Gend "viņš").s ! Masc ! Sg ! c) ;
possessive = table {
@@ -200,7 +228,7 @@ lin
_ => "viņa"
}
}
} ;
} ;
a = AgP3 Sg Masc ;
} ;
@@ -212,10 +240,10 @@ lin
_ => "viņas"
}
}
} ;
} ;
a = AgP3 Sg Fem ;
} ;
they_Pron = {
s = (\\c => (mkPronoun_Gend "viņš").s ! Masc ! Pl ! c) ;
possessive = table {
@@ -224,9 +252,9 @@ lin
_ => "viņu"
}
}
} ;
} ;
a = AgP3 Pl Masc ;
} |
} |
{
s = (\\c => (mkPronoun_Gend "viņš").s ! Fem ! Pl ! c) ;
possessive = table {
@@ -235,10 +263,10 @@ lin
_ => "viņu"
}
}
} ;
} ;
a = AgP3 Pl Fem ;
} ;
it_Pron = {
s = \\c => (mkPronoun_ThisThat That).s ! Masc ! Sg ! c;
possessive = table { _ => table { _ => table { _ => "tā" }}};
@@ -247,15 +275,15 @@ lin
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
};
-- 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;
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
@@ -265,7 +293,14 @@ lin
under_Prep = mkPrep "zem" Gen Dat;
with_Prep = mkPrep "ar" Acc Dat;
without_Prep = mkPrep "bez" Gen Dat;
by8agent_Prep = nom_Prep; --- A was attacked by B -> A-Dat uzbruka B-Nom
by8means_Prep = mkPrep "ar" Acc Dat;
during_Prep = mkPrep "laikā" Gen Gen; --FIXME nevaru saprast. laikam postfix 'X laikā' jāliek
in8front_Prep = mkPrep "priekšā" Dat Dat;
part_Prep = mkPrep Gen ; --FIXME - reku vajadzētu vārdu secību otrādi, ka pirms paskaidrojamā vārda likt
through_Prep = mkPrep "cauri" Dat Dat;
except_Prep = mkPrep "izņemot" Acc Acc;
very_AdA = mkAdA "ļoti" ;
almost_AdA = mkAdA "gandrīz" ;
so_AdA = mkAdA "tik" ;
@@ -273,17 +308,25 @@ lin
and_Conj = mkConj "un" ;
or_Conj = mkConj "vai" Sg ;
if_then_Conj = mkConj "ja" "tad";
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;
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" ;
everywhere_Adv = mkAdv "visur" ;
here7to_Adv = mkAdv ["uz šejieni"] ;
here7from_Adv = mkAdv ["no šejienes"] ;
there7to_Adv = mkAdv "uz turieni" ;
there7from_Adv = mkAdv "no turienes";
somewhere_Adv = mkAdv "kaut kur" ;
quite_Adv = mkAdv "diezgan" ;
both7and_DConj = mkConj "gan" ("," ++ "gan"); --FIXME - komati nav tā kā vajag
either7or_DConj = mkConj ("vai" ++ "nu") ("," ++ "vai") Sg ; --FIXME - komati nav tā kā vajag
@@ -297,7 +340,7 @@ lin
Dat => "kuram";
Acc => "kuru";
Loc => "kurā";
Voc => NON_EXISTENT
ResLav.Voc => NON_EXISTENT
};
n = Sg
};
@@ -308,50 +351,79 @@ lin
Dat => "kuriem";
Acc => "kurus";
Loc => "kuros";
Voc => NON_EXISTENT
ResLav.Voc => NON_EXISTENT
};
n = Pl
};
whatSg_IP = {
s = table {
Nom => "kas"; -- FIXME - Fem? standarta locīšana?
Gen => "kā";
Dat => "kam";
Acc => "ko";
Loc => "kur";
ResLav.Voc => NON_EXISTENT
};
n = Sg
};
whatPl_IP = {
s = table {
Nom => "kas"; -- FIXME - Fem? standarta locīšana?
Gen => "kā";
Dat => "kam";
Acc => "ko";
Loc => "kur";
ResLav.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" ;
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"} };
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};
how8many_IDet = { s = table { _ => "cik daudz"}; n = Sg }; --TODO jātestē kā to pielieto un vai nevajag vēl kaut ko
everybody_NP = DetCN emptyPl_Det (UseN (mkN "visi"));
everything_NP = DetCN emptySg_Det (UseN (mkN "viss"));
nobody_NP = DetCN emptySg_Det (UseN (mkN "neviens"));
nothing_NP = DetCN emptySg_Det (UseN (mkN "nekas"));
somebody_NP = DetCN emptySg_Det (UseN (mkN "kāds"));
something_NP = DetCN emptySg_Det (UseN (mkN "kaut kas"));
oper
reflPron : Case => Str = table {
Nom => NON_EXISTENT;
@@ -359,17 +431,28 @@ oper
Dat => "sev";
Acc => "sevi";
Loc => "sevī";
Voc => NON_EXISTENT
ResLav.Voc => NON_EXISTENT
} ;
lai_Subj = ss "lai" ;
kameer_Subj = ss "kamēr" ;
lai_Subj = ss "lai" ;
kameer_Subj = ss "kamēr" ;
emptyPl_Det = {
s:Gender => Case => Str = \\_,_ => [];
n = Pl ;
d = Indef
} ;
emptySg_Det = {
s:Gender => Case => Str = \\_,_ => [];
n = Sg ;
d = Indef
} ;
no_Utt = ss "nē" ;
{-
by8agent_Prep = mkPrep "by" ;
by8means_Prep = mkPrep "by" ;
can8know_VV, can_VV = {
s = table {
s = table {
VVF VInf => ["be able to"] ;
VVF VPres => "can" ;
VVF VPPart => ["been able to"] ;
@@ -380,19 +463,6 @@ oper
} ;
isAux = True
} ;
during_Prep = mkPrep "during" ;
everybody_NP = regNP "everybody" singular ;
every_Det = mkDeterminer singular "every" ;
everything_NP = regNP "everything" singular ;
everywhere_Adv = mkAdv "everywhere" ;
few_Det = mkDeterminer plural "few" ;
--- first_Ord = ss "first" ; DEPRECATED
here7to_Adv = mkAdv ["to here"] ;
here7from_Adv = mkAdv ["from here"] ;
how8many_IDet = mkDeterminer plural ["how many"] ;
in8front_Prep = mkPrep ["in front of"] ;
many_Det = mkDeterminer plural "many" ;
much_Det = mkDeterminer singular "much" ;
must_VV = {
s = table {
VVF VInf => ["have to"] ;
@@ -405,39 +475,12 @@ oper
} ;
isAux = True
} ;
---b no_Phr = ss "no" ;
no_Utt = ss "no" ;
---- one_Quant = mkDeterminer singular "one" ; -- DEPRECATED
part_Prep = mkPrep "of" ;
quite_Adv = mkAdv "quite" ;
somebody_NP = regNP "somebody" singular ;
something_NP = regNP "something" singular ;
somewhere_Adv = mkAdv "somewhere" ;
that_Quant = mkQuant "that" "those" ;
there7to_Adv = mkAdv "there" ;
there7from_Adv = mkAdv ["from there"] ;
this_Quant = mkQuant "this" "these" ;
through_Prep = mkPrep "through" ;
whatPl_IP = mkIP "what" "what" "what's" plural ;
whatSg_IP = mkIP "what" "what" "what's" singular ;
---b whichPl_IDet = mkDeterminer plural ["which"] ;
---b whichSg_IDet = mkDeterminer singular ["which"] ;
whoPl_IP = mkIP "who" "whom" "whose" plural ;
whoSg_IP = mkIP "who" "whom" "whose" singular ;
---b yes_Phr = ss "yes" ;
not_Predet = {s = "not" ; lock_Predet = <>} ;
no_Quant = mkQuant "no" "no" "none" "none" ;
if_then_Conj = mkConj "if" "then" singular ;
nobody_NP = regNP "nobody" singular ;
nothing_NP = regNP "nothing" singular ;
except_Prep = mkPrep "except" ;
have_V2 = dirV2 (mk5V "have" "has" "had" "had" "having") ;
lin language_title_Utt = ss "English" ;
-}
}