polish demo

This commit is contained in:
adam.slaski
2010-05-26 22:34:20 +00:00
parent cca29ffe9d
commit ad1a116dfc
25 changed files with 1114 additions and 830 deletions

View File

@@ -1,28 +1,30 @@
concrete GreetingsPol of Greetings = open Prelude in {
--lincat
-- Greeting = SS ;
flags
optimize =values ; coding =utf8 ;
--lin
-- GBye = ss "bye" ;
-- GCheers = ss "cheers" ;
-- GDamn = ss "damn" ;
-- GExcuse, GExcusePol = ss "excuse me" ;
-- GGoodDay = ss "good afternoon" ; ----
-- GGoodEvening = ss "good evening" ;
-- GGoodMorning = ss "good morning" ;
-- GGoodNight = ss "good night" ;
-- GGoodbye = ss "goodbye" ;
-- GHello = ss "hello" ;
-- GHelp = ss "help" ;
-- GHowAreYou = ss "how are you" ;
-- GLookOut = ss "look out" ;
-- GNiceToMeetYou, GNiceToMeetYouPol = ss "nice to meet you" ;
-- GPleaseGive, GPleaseGivePol = ss "please" ;
-- GSeeYouSoon = ss "see you soon" ;
-- GSorry, GSorryPol = ss "sorry" ;
-- GThanks = ss "thank you" ;
-- GTheCheck = ss "the bill" ;
lincat
Greeting = SS ;
--}
lin
GBye = ss "cześć" ;
GCheers = ss "na zdrowie" ;
GDamn = ss "cholera" ; -- not polite
GExcuse, GExcusePol, GSorry, GSorryPol = ss "przepraszam" ;
GGoodDay, GGoodMorning = ss "dzień dobry" ;
GGoodEvening = ss "dobry wieczór" ;
GGoodNight = ss "dobranoc" ;
GGoodbye = ss "do widzenia" ;
GHello = ss "cześć" ;
GHelp = ss "pomocy" ;
GHowAreYou = ss "jak się masz" ;
GLookOut = ss "uwaga" ;
GNiceToMeetYou = ss "miło mi" ;
GPleaseGive, GPleaseGivePol = ss "poproszę" ;
GSeeYouSoon = ss "do zobaczenia" ;
GThanks = ss "dziękuję" ;
GTheCheck = ss "rachunek" ;
GCongratulations = ss "gratulacje";
GHappyBirthday = ss "wszystkiego najlepszego z okazji urodzin" ;
GGoodLuck = ss "powodzenia" ;
}

View File

@@ -6,6 +6,11 @@ concrete PhrasebookPol of Phrasebook =
SyntaxPol,
Prelude in {
flags
language = pl_PL ; optimize =values ; coding =utf8 ;
lin
PGreeting g = lin Text g ;

View File

@@ -1,4 +1,32 @@
concrete SentencesPol of Sentences = NumeralPol ** SentencesI with
concrete SentencesPol of Sentences =
NumeralPol ** SentencesI - [
Day,PDay,OnDay,Language,PLanguage,
Nationality,Transport,PTransport,ByTransp,
IFemale,YouFamFemale,YouPolFemale,YouPolMale]
with
(Syntax = SyntaxPol),
(Symbolic = SymbolicPol),
(Lexicon = LexiconPol) ;
(Lexicon = LexiconPol) ** open (R = ResPol), (Pron = PronounMorphoPol), Prelude in {
flags
optimize =values ; coding =utf8 ;
lincat
Day = { name,hab,adv:Str } ;
Language = A ;
Citizenship = A ;
Nationality = { lang: A; prop: A; country: NP } ;
Transport = CN ;
lin
PDay d = (ss d.name) ** {lock_Text = <>};
OnDay d = (ss d.adv) ** {lock_Adv = <>};
PLanguage l = (ss l.pos.s1) ** {lock_Text = <>};
PTransport t = mkPhrase (mkUtt t) ;
ByTransp t = (ss (t.s!R.Sg!R.Instr)) ** {lock_Adv = <>};
IFemale = mkPerson (Pron.pronJaFoo (R.PGen R.Fem));
YouFamFemale = mkPerson (Pron.pronTyFoo (R.PGen R.Fem));
YouPolFemale = mkPerson (Pron.pronPani);
YouPolMale = mkPerson (Pron.pronPan);
}

View File

@@ -1,13 +1,19 @@
--2 Implementations of Words, with Polish as example
concrete WordsPol of Words = SentencesPol **
open
ResPol,
SyntaxPol,
ParadigmsPol,
(L = LexiconPol),
(P = ParadigmsPol),
-- ExtraPol,
(Q = QuestionPol),
(N = NounPol),
MorphoPol,
Prelude in {
flags
optimize =values ; coding =utf8 ;
lin
-- Kinds; many of them are in the resource lexicon, others can be built by $mkN$.
@@ -15,162 +21,326 @@ concrete WordsPol of Words = SentencesPol **
Apple = mkCN L.apple_N ;
Beer = mkCN L.beer_N ;
Bread = mkCN L.bread_N ;
-- Cheese = mkCN (mkN "cheese") ;
-- Chicken = mkCN (mkN "chicken") ;
-- Coffee = mkCN (mkN "coffee") ;
Cheese = mkCN L.cheese_N ;
Chicken = mkCN (P.nPtak "kurczak") ;
Coffee = mkCN ({ s = table {
SF Sg Nom => "kawa";
SF Sg (Acc|Gen) => "kawę";
SF Sg Instr => "kawą";
SF Sg VocP => "kawo";
SF Sg _ => "kawie";
SF Pl Gen => "kawy";
SF Pl Dat => "kawom";
SF Pl Instr => "kawami";
SF Pl Loc => "kawach";
SF Pl _ => "kawy"
};
g = Fem;
lock_N : {} = <>});
Fish = mkCN L.fish_N ;
-- Meat = mkCN (mkN "meat") ;
Meat = mkCN L.meat_N ;
Milk = mkCN L.milk_N ;
-- Pizza = mkCN (mkN "pizza") ;
Pizza = mkCN ({ s = table {
SF Sg Nom => "pizza";
SF Sg (Acc) => "pizzę";
SF Sg Instr => "pizzą";
SF Sg (Dat|Gen) => "pizzy";
SF Sg VocP => "pizzo";
SF Sg _ => "pizzie";
SF Pl Gen => "pizz";
SF Pl Dat => "pizzom";
SF Pl Instr => "pizzami";
SF Pl Loc => "pizzach";
SF Pl _ => "pizze"
};
g = Fem;
lock_N : {} = <>});
Salt = mkCN L.salt_N ;
-- Tea = mkCN (mkN "tea") ;
Tea = mkCN (P.nWoda "herbata") ;
Water = mkCN L.water_N ;
Wine = mkCN L.wine_N ;
-- Properties; many of them are in the resource lexicon, others can be built by $mkA$.
Bad = L.bad_A ;
-- Boring = mkA "boring" ;
-- Cheap = mkA "cheap" ;
Boring = mkA (mkRegAdj "nudny" "nudniejszy" "nudno" "nudniej" );
Cheap = mkA (mkRegAdj "tani" "tańszy" "tanio" "taniej" );
Cold = L.cold_A ;
-- Delicious = mkA "delicious" ;
-- Expensive = mkA "expensive" ;
-- Fresh = mkA "fresh" ;
Delicious = mkA (mkRegAdj "pyszny" "pyszniejszy" "pysznie" "pyszniej") ;
Expensive = mkA (mkRegAdj "drogi" "droższy" "drogo" "drożej" );
Fresh = mkA (mkRegAdj "świeży" "świeższy" "świeżo" "świeżej" );
Good = L.good_A ;
-- Suspect = mkA "suspect" ;
Suspect = mkA (mkCompAdj "podejrzany" "podejrzanie" );
Warm = L.warm_A ;
-- Places require different prepositions to express location; in some languages
-- also the directional preposition varies, but in English we use $to$, as
-- defined by $mkPlace$.
-- Airport = mkPlace "airport" "at" ;
-- Bar = mkPlace "bar" "in" ;
-- Church = mkPlace "church" "in" ;
-- Cinema = mkPlace "cinema" "at" ;
-- Hospital = mkPlace "hospital" "in" ;
-- Hotel = mkPlace "hotel" "in" ;
-- Museum = mkPlace "museum" "in" ;
-- Park = mkPlace "park" "in" ;
-- Restaurant = mkPlace "restaurant" "in" ;
-- School = mkPlace "school" "at" ;
-- Shop = mkPlace "shop" "in" ;
-- Station = mkPlace "station" "at" ;
-- Theatre = mkPlace "theatre" "at" ;
-- Toilet = mkPlace "toilet" "in" ;
-- University = mkPlace "university" "at" ;
Airport = mkPlaceNa (P.nWojsko "lotnisko") ;
AmusementPark = mkPlaceDo ["wesołe miasteczko"] ["wesołego miasteczka"] ["wesołym miasteczku"] Neut;
Bank = mkPlaceDo "bank" "banku" "banku" (Masc Inanimate);
Bar = mkPlaceDo "bar" "baru" "barze" (Masc Inanimate);
Cafeteria = mkPlaceDo "stołówka" "stołówki" "stołówce" Fem;
Center = mkPlaceDo "centrum" "centrum" "centrum" Neut;
Cinema = mkPlaceDo "kino" "kina" "kinie" Neut ;
Church = mkPlaceDo "kościół" "kościoła" "kościele" (Masc Inanimate);
Disco = mkPlaceNa "dyskoteka" "dyskotekę" "dyskotece" Fem ;
Hospital = mkPlaceDo "szpital" "szpitala" "szpitalu" (Masc Inanimate);
Hotel = mkPlaceDo "hotel" "hotelu" "hotelu" (Masc Inanimate) ;
Museum = mkPlaceDo "museum" "museum" "museum" Neut ;
Park = mkPlaceDo "park" "parku" "parku" (Masc Inanimate) ;
Parking = mkPlaceNa "parking" "parking" "parkingu" (Masc Inanimate) ;
Pharmacy = mkPlaceDo "apteka" "apteki" "aptece" Fem ;
PostOffice = mkPlaceNa "poczta" "pocztę" "poczcie" Fem ;
Pub = mkPlaceDo "pub" "pubu" "pubie" (Masc Inanimate) ;
Restaurant = mkPlaceDo L.restaurant_N;
School = mkPlaceDo L.school_N;
Shop = mkPlaceDo "sklep" "sklepu" "sklepie" (Masc Inanimate) ;
Station = mkPlaceNa "stacja" "stację" "stacji" Fem ;
Supermarket = mkPlaceDo "supermarket" "supermarketu" "supermarkecie" (Masc Inanimate) ;
Theatre = mkPlaceDo "teatr" "teatru" "teatrze" (Masc Inanimate) ;
Toilet = mkPlaceDo "toaleta" "toalety" "toalecie" Fem ;
University = mkPlaceNa L.university_N;
Zoo = mkPlaceDo "zoo" "zoo" "zoo" Neut ;
CitRestaurant cit = { name=(mkCN cit (mkCN L.restaurant_N));
at = { s="w"; c=LocPrep; lock_Prep = <> }; to = {s="do"; c=GenPrep; lock_Prep = <>} };
-- Currencies; $crown$ is ambiguous between Danish and Swedish crowns.
-- DanishCrown = mkCN (mkA "Danish") (mkN "crown") | mkCN (mkN "crown") ;
-- Dollar = mkCN (mkN "dollar") ;
-- Euro = mkCN (mkN "euro" "euros") ; -- to prevent euroes
-- Lei = mkCN (mkN "leu" "lei") ;
-- SwedishCrown = mkCN (mkA "Swedish") (mkN "crown") | mkCN (mkN "crown") ;
DanishCrown = mkCN (mkCurrency "korona holenderska" "korony holenderskie" "koron holenderskich" Fem);
Dollar = mkCN (P.nSer "dolar") ;
Euro = mkCN (mkCurrency "euro" "euro" "euro" Neut);
Lei = mkCN (mkCurrency "leja" "leje" "lei" Fem);
Leva = mkCN (mkCurrency "lew" "lewy" "lewów" (Masc Animate));
NorwegianCrown = mkCN (mkCurrency "korona norweska" "korony norweskie" "koron norweskich" Fem);
Pound = mkCN (mkCurrency "funt" "funty" "funtów" (Masc Animate));
Rouble = mkCN (mkCurrency "rubel" "ruble" "rubli" (Masc Animate));
SwedishCrown = mkCN (mkCurrency "korona szwedzka" "korony szwedzkie" "koron szwedzkich" Fem);
Zloty = mkCN (mkCurrency "złoty" "złote" "złotych" (Masc Animate));
-- Nationalities
-- język, po języku, obywatelstwo, kraj
Belgian = mkA (mkCompAdj "belgijski") ;
Belgium = mkNP (P.nLilia "Belgia") ;
Bulgarian = mkNat "bułgarski" ["po bułgarsku"] "bułgarski" (P.nLilia "Bułgaria");
Catalan = mkNat "kataloński" ["po katalońsku"] "kataloński" (P.nLilia "Katalonia");
Danish = mkNat "duński" ["po duńsku"] "duński" (P.nLilia "Dania");
Dutch = mkNat "holenderski" ["po holendersku"] "holenderski" (P.nLilia "Holandia");
English = mkNat "angielski" ["po angielsku"] "angielski" (P.nLilia "Anglia");
Finnish = mkNat "fiński" ["po fińsku"] "finladzki" (P.nLilia "Finlandia");
Flemish = mkA (mkCompAdj "flamandzki" ["po flamandzku"]);
French = mkNat "francuski" ["po francusku"] "francuski" (P.nLilia "Francja");
German = mkNat "niemiecki" ["po niemiecku"] "niemiecki" (mkCountry "Niemcy" "Niemczech" Plur);
Italian = mkNat "włoski" ["po włosku"] "włoski" (mkCountry "Włochy" "Włoszech" Plur);
Norwegian = mkNat "norweski" ["po norwesku"] "norweski" (P.nLilia "Norwegia");
Polish = mkNat "polski" ["po polsku"] "polski" (mkCountry "Polska" "Polsce" Fem);
Romanian = mkNat "rumuński" ["po rumuńsku"] "rumuński" (P.nLilia "Rumunia");
Russian = mkNat "rosyjski" ["po rosyjsku"] "rosyjski" (P.nLilia "Rosja");
Spanish = mkNat "hiszpański" ["po hiszpańsku"] "hiszpański" (P.nLilia "Hiszpania");
Swedish = mkNat "szwedzki" ["po szwedzku"] "szwedzki" (P.nLilia "Szwecja");
-- Belgian = mkA "Belgian" ;
-- Belgium = mkNP (mkPN "Belgium") ;
-- English = mkNat "English" "England" ;
-- Finnish = mkNat "Finnish" "Finland" ;
-- Flemish = mkNP (mkPN "Flemish") ;
-- French = mkNat "French" "France" ;
-- Italian = mkNat "Italian" "Italy" ;
-- Romanian = mkNat "Romanian" "Romania" ;
-- Swedish = mkNat "Swedish" "Sweden" ;
-- Means of transportation
Bike = mkCN L.bike_N ;
Bus = mkTransport "autobus" "autobusem" (Masc Inanimate) ;
Car = mkCN L.car_N ;
Ferry = mkTransport "prom" "promem" (Masc Inanimate) ;
Plane = mkCN L.airplane_N ;
Subway = mkTransport "metro" "metrem" Neut ;
Taxi = mkTransport "taksówka" "taksówką" Fem ;
Train = mkTransport "pociąg" "pociągiem" (Masc Inanimate) ;
Tram = mkTransport "tramwaj" "tramwajem" (Masc Inanimate) ;
ByFoot = ss "pieszo" ** {lock_Adv = <>};
-- Actions: the predication patterns are very often language-dependent.
-- AHasAge p num = mkCl p.name (mkNP num L.year_N) ;
AHasChildren p num = mkCl p.name have_V2 (mkNP num L.child_N) ;
-- AHasRoom p num = mkCl p.name have_V2
-- (mkNP (mkNP a_Det (mkN "room")) (SyntaxPol.mkAdv for_Prep (mkNP num (mkN "person")))) ;
-- AHasTable p num = mkCl p.name have_V2
-- (mkNP (mkNP a_Det (mkN "table")) (SyntaxPol.mkAdv for_Prep (mkNP num (mkN "person")))) ;
-- AHasName p name = mkCl (nameOf p) name ;
-- AHungry p = mkCl p.name (mkA "hungry") ;
-- AIll p = mkCl p.name (mkA "ill") ;
-- AKnow p = mkCl p.name IrregPol.know_V ;
-- ALike p item = mkCl p.name (mkV2 (mkV "like")) item ;
-- ALive p co = mkCl p.name (mkVP (mkVP (mkV "live")) (SyntaxPol.mkAdv in_Prep co)) ;
-- ALove p q = mkCl p.name (mkV2 (mkV "love")) q.name ;
-- AMarried p = mkCl p.name (mkA "married") ;
-- AReady p = mkCl p.name (mkA "ready") ;
-- AScared p = mkCl p.name (mkA "scared") ;
-- ASpeak p lang = mkCl p.name (mkV2 IrregPol.speak_V) lang ;
-- AThirsty p = mkCl p.name (mkA "thirsty") ;
-- ATired p = mkCl p.name (mkA "tired") ;
-- AUnderstand p = mkCl p.name IrregPol.understand_V ;
-- AWant p obj = mkCl p.name (mkV2 (mkV "want")) obj ;
-- AWantGo p place = mkCl p.name want_VV (mkVP (mkVP IrregPol.go_V) place.to) ;
-- ok commented because of the effectivness
AHasAge p num = mkCl p.name have_V2 (mkNP (mkDet num) (mkCN L.year_N)) ;
AHasChildren p num = mkCl p.name have_V2 (mkNP num L.child_N) ; --!!!!!!!!!!! FIXME HELP!!!!!
AHasRoom p num = mkCl p.name have_V2
(mkNP (mkNP a_Det (P.nPokoj "pokój")) (SyntaxPol.mkAdv for_Prep (mkNP num (L.person_N)))) ;
AHasTable p num = mkCl p.name have_V2
(mkNP (mkNP a_Det (L.table_N)) (SyntaxPol.mkAdv for_Prep (mkNP num (L.person_N)))) ;
AHasName p name = mkCl p.name (mkVP (mkComplicatedVerb (mkMonoVerb "być" conj1 Imperfective) name.nom));
AHungry p = mkCl p.name (mkA (mkRegAdj "głodny" "głodniejszy" "głodno" "głodniej" )) ;
AIll p = mkCl p.name (mkA (mkCompAdj "chory")) ;
AKnow p = mkCl p.name (mkVP (mkMonoVerb "wiedzieć" conj103 Imperfective)) ;
ALike p item = mkCl p.name (L.like_V2) item ;
ALive p co = mkCl p.name (mkVP (mkComplicatedVerb (mkMonoVerb "mieszkam" conj98 Imperfective) ("w" ++ co.dep!LocPrep)));
ALove p q = mkCl p.name (L.love_V2) q.name ;
AMarried p = mkCl p.name (case p.name.gn of {
MascPersSg|MascAniSg|MascInaniSg|MascPersPl=> mkCompAdj "żonaty";
_=>mkCompAdj "zamężny"}) ;
AReady p = mkCl p.name (L.ready_A) ;
AScared p = mkCl p.name (mkReflVerb (mkMonoVerb "bać" conjbac Imperfective)) ;
ASpeak p lang = mkCl p.name (mkVP (mkComplicatedVerb (mkMonoVerb "mówić" conj72 Imperfective) lang.advpos)) ;
AThirsty p = mkCl p.name (mkVP (mkComplicatedVerb (mkMonoVerb "chcieć" conj45 Imperfective) ["pić"]));
ATired p = mkCl p.name (mkA (mkCompAdj "zmęczony")) ;
AUnderstand p = mkCl p.name (mkVP (mkV "rozumieć" conj101 "zrozumieć" conj101)) ;
AWant p obj = mkCl p.name (dirV2 (mkMonoVerb "chcieć" conj45 Imperfective)) obj ;
AWantGo p place = mkCl p.name want_VV (mkVP (mkComplicatedVerb (mkV1 "iść" conj41a "pójść" conj42) place.to.s)) ;
-- miscellaneous
-- QWhatName p = mkQS (mkQCl whatSg_IP (mkVP (nameOf p))) ;
-- QWhatAge p = mkQS (mkQCl (ICompAP (mkAP L.old_A)) p.name) ;
-- HowMuchCost item = mkQS (mkQCl how8much_IAdv (mkCl item IrregPol.cost_V)) ;
-- ItCost item price = mkCl item (mkV2 IrregPol.cost_V) price ;
QWhatName p = mkQS (mkQCl how_IAdv (mkCl p.name
(mkVP (mkComplicatedVerb (mkMonoVerb "mieć" conj100 Imperfective) ["na imię"]))));
QWhatAge p = mkQS (mkQCl howmany_IAdv (mkCl p.name
(mkVP (mkComplicatedVerb (mkMonoVerb "mieć" conj100 Imperfective) ["lat"]))));
HowMuchCost item = { s="ile" ++
(mkMonoVerb "kosztować" conj53 Imperfective).si!(VFinM (extract_num!item.gn) P3) ++ item.nom;
lock_QS=<> } ;
ItCost item price = mkCl item (dirV2 (mkMonoVerb "kosztować" conj53 Imperfective) ) price ;
-- PropOpen p = mkCl p.name open_Adv ;
-- PropClosed p = mkCl p.name closed_Adv ;
-- PropOpenDate p d = mkCl p.name (mkVP (mkVP open_Adv) d) ;
-- PropClosedDate p d = mkCl p.name (mkVP (mkVP closed_Adv) d) ;
-- PropOpenDay p d = mkCl p.name (mkVP (mkVP open_Adv) d.habitual) ;
-- PropClosedDay p d = mkCl p.name (mkVP (mkVP closed_Adv) d.habitual) ;
PropOpen p = mkCl p.name open_A ;
PropClosed p = mkCl p.name closed_A ;
PropOpenDate p d = mkCl p.name (mkAP d open_A) ;
PropClosedDate p d = mkCl p.name (mkAP d closed_A) ;
PropOpenDay p d = mkCl p.name (mkAP (ss d.hab) open_A) ;
PropClosedDay p d = mkCl p.name (mkAP (ss d.hab) closed_A) ;
-- Building phrases from strings is complicated: the solution is to use
-- mkText : Text -> Text -> Text ;
-- PSeeYou d = mkText (lin Text (ss ("see you"))) (mkPhrase (mkUtt d)) ;
-- PSeeYouPlace p d =
-- mkText (lin Text (ss ("see you")))
-- (mkText (mkPhrase (mkUtt p.at)) (mkPhrase (mkUtt d))) ;
PSeeYouDate d = mkText (lin Text (ss ("do zobaczenia"))) (mkPhrase (mkUtt d)) ;
PSeeYouPlace p = mkText (lin Text (ss ("do zobaczenia"))) (mkPhrase (mkUtt p.at)) ;
PSeeYouPlaceDate p d =
mkText (lin Text (ss ("do zobaczenia")))
(mkText (mkPhrase (mkUtt d)) (mkPhrase (mkUtt p.at))) ;
--
-- Relations are expressed as "my wife" or "my son's wife", as defined by $xOf$
-- below. Languages without productive genitives must use an equivalent of
-- "the wife of my son" for non-pronouns.
-- Wife = xOf sing (mkN "wife") ;
-- Husband = xOf sing (mkN "husband") ;
-- Son = xOf sing (mkN "son") ;
-- Daughter = xOf sing (mkN "daughter") ;
-- Children = xOf plur L.child_N ;
--
Wife p = xOf p N.NumSg L.wife_N ;
Husband p = xOf p N.NumSg L.husband_N ;
Son p = xOf p N.NumSg (mkPer "syn" "syna" "syna" (Masc Personal)) ;
Daughter p = xOf p N.NumSg (mkPer "córka" "córki" "córkę" Fem );
Children p = xOf p N.NumPl L.child_N ;
-- week days
-- Monday = mkDay "Monday" ;
-- Tuesday = mkDay "Tuesday" ;
-- Wednesday = mkDay "Wednesday" ;
-- Thursday = mkDay "Thursday" ;
-- Friday = mkDay "Friday" ;
-- Saturday = mkDay "Saturday" ;
-- Sunday = mkDay "Sunday" ;
Monday = { name="poniedziałek"; hab=["w poniedziałki"]; adv=["w poniedziałek"] } ;
Tuesday = { name="wtorek"; hab=["we wtorki"]; adv=["we wtorek"] } ;
Wednesday = { name="środa"; hab=["we środy"]; adv=["we środę"] } ;
Thursday = { name="czwartek"; hab=["w czwartki"]; adv=["w czwartek"] } ;
Friday = { name="piątek"; hab=["w piątki"]; adv=["w piątek"] } ;
Saturday = { name="sobota"; hab=["w soboty"]; adv=["w sobotę"] } ;
Sunday = { name="niedziela"; hab=["w niedziele"]; adv=["w niedzielę"] } ;
-- Tomorrow = P.mkAdv "tomorrow" ;
Tomorrow = (ss "jutro") ** {lock_Adv = <>} ;
-- modifiers of places
TheBest = mkSuperl L.good_A ;
TheClosest = mkSuperl L.near_A ;
TheCheapest = mkSuperl (mkA (mkRegAdj "tani" "tańszy" "tanio" "taniej") );
TheMostExpensive = mkSuperl (mkA (mkRegAdj "drogi" "droższy" "drogo" "drożej" ) );
TheMostPopular = mkSuperl (mkA (mkRegAdj "popularny" "popularniejszy" "popularnie" "popularniej" ) ) ;
TheWorst = mkSuperl L.bad_A ;
SuperlPlace sup p = placeNP sup p ;
-- transports
HowFar place = mkQS (Q.QuestIComp (Q.CompIAdv far_IAdv) place.name) ;
--jak daleko jest z cenrum do hotelu
HowFarFrom x y = { s=["jak jest daleko z"] ++ x.name.dep!GenPrep ++ y.to.s; lock_QS=<> };
--jak daleko jest pieszo z centrum do hotelu
HowFarFromBy x y t =
{ s=["jak jest daleko"] ++ t.s ++ "z" ++ x.name.dep!GenPrep ++ y.to.s; lock_QS=<> };
HowFarBy y t =
{ s=["jak jest daleko"] ++ t.s ++ y.to.s; lock_QS=<> };
WhichTranspPlace trans place =
{ s= ktory ! AF (cast_gennum!<trans.g,Sg>) Instr ++ trans.s!Sg!Instr ++ place.to.s; lock_QS=<> };
IsTranspPlace trans place =
{ s= ["czy jest stąd"] ++ trans.s!Sg!Nom ++ place.to.s; lock_QS=<> };
-- auxiliaries
-- oper
oper
mkA : Adj -> A = \adj -> adj ** { lock_A = <> };
-- mkNat : Str -> Str -> NPNationality = \nat,co ->
-- mkNPNationality (mkNP (mkPN nat)) (mkNP (mkPN co)) (mkA nat) ;
mkPlaceDo = overload {
mkPlaceDo : N -> {name : CN ; at : Prep ; to : Prep} = \n -> {
name = mkCN n; at = { s="w"; c=LocPrep; lock_Prep = <> }; to = {s="do"; c=GenPrep; lock_Prep = <>} };
mkPlaceDo : Str -> Str -> Str -> Gender -> {name : CN ; at : Prep ; to : Prep} = \nom,gen,loc,g -> {
name = mkCN {
s = table {SF Sg Nom => nom; SF Sg Gen => gen; SF Sg Loc => loc; _ => ["not implemented"]};
g = g;
lock_N=<>
};
at = { s="w"; c=LocPrep; lock_Prep = <> }; to = {s="do"; c=GenPrep; lock_Prep = <>} };
};
mkPlaceNa = overload {
mkPlaceNa : N -> {name : CN ; at : Prep ; to : Prep} = \n -> {
name = mkCN n; at = { s="na"; c=LocPrep; lock_Prep = <> }; to = {s="na"; c=AccPrep; lock_Prep = <>} };
mkPlaceNa : Str -> Str -> Str -> Gender -> {name : CN ; at : Prep ; to : Prep} = \nom,acc,loc,g -> {
name = mkCN {
s = table {SF Sg Nom => nom; SF Sg Acc => acc; SF Sg Loc => loc; _ => ["not implemented"]};
g = g;
lock_N=<>
};
at = { s="na"; c=LocPrep; lock_Prep = <> }; to = {s="na"; c=AccPrep; lock_Prep = <>} };
};
mkTransport : Str -> Str -> Gender -> CN = \nom,instr,g -> {
s = \\n,c => case <n,c> of {<Sg,Nom> => nom; <Sg,Instr> => instr; _ => ["not implemented"]};
g = g;
lock_CN=<>
};
-- mkDay : Str -> {name : NP ; point : Adv ; habitual : Adv} = \d ->
-- let day = mkNP (mkPN d) in
-- mkNPDay day (SyntaxPol.mkAdv on_Prep day)
-- (SyntaxPol.mkAdv on_Prep (mkNP a_Quant plNum (mkCN (mkN d)))) ;
mkCountry : Str -> Str -> Gender -> N = \nom,loc,g -> {
s = table {SF Sg Nom => nom; SF Sg Loc => loc; _ => ["not implemented"]};
g = g;
lock_N=<>
};
-- mkPlace : Str -> Str -> {name : CN ; at : Prep ; to : Prep} = \p,i ->
-- mkCNPlace (mkCN (mkN p)) (P.mkPrep i) to_Prep ;
mkPer : Str -> Str -> Str -> Gender -> N = \nom,gen,acc,g -> {
s = table {SF Sg Nom => nom; SF Sg Gen => gen; SF Sg Acc => acc; _ => ["not implemented"]};
g = g;
lock_N=<>
};
-- open_Adv = P.mkAdv "open" ;
-- closed_Adv = P.mkAdv "closed" ;
mkCurrency : Str -> Str -> Str -> Gender -> N = \nom,nompl,genpl,g -> {
s = table {SF Sg Nom => nom; SF Pl Nom => nompl; SF Pl Gen => genpl; _ => ["not implemented"]};
g = g;
lock_N=<>
};
mkNat : Str -> Str -> Str -> N -> { lang: A; prop: A; country: NP } = \lang,ladv,prop,country -> {
lang = mkA (mkCompAdj lang ladv); prop = mkA (mkCompAdj prop); country=mkNP country };
open_A : A = (mkA (mkCompAdj "otwarty"));
closed_A : A = (mkA (mkCompAdj "zamknięty"));
xOf : NPPerson -> Num -> N -> NPPerson = \p,num,n ->
{ name = case p.isPron of {
True => mkNP (mkDet p.poss num) n;
False => mkNP (mkNP n) ({s=p.name.dep!GenNoPrep; lock_Adv=<>})
};
isPron = False;
poss = p.poss }; --it is not used, because it is not a pron
mkSuperl : A -> Det = \a -> SyntaxPol.mkDet the_Art (SyntaxPol.mkOrd a) ;
-- xOf : GNumber -> N -> NPPerson -> NPPerson = \n,x,p ->
-- relativePerson n (mkCN x) (\a,b,c -> mkNP (GenNP b) a c) p ;
far_IAdv : IAdv = (ss ["jak daleko"]) ** {lock_IAdv = <>};
howmany_IAdv : IAdv = (ss ["ile"]) ** {lock_IAdv = <>};
-- nameOf : NPPerson -> NP = \p -> (xOf sing (mkN "name") p).name ;
--}
}

View File

@@ -163,9 +163,9 @@ resource AdjectiveMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
pos = guess_model pos;
comp = model_comp comp;
super = model_comp ("naj" + comp);
advpos = "["++pos ++ [": the adjective positive form does not exist]"];
advcomp = "["++pos ++ [": the adjective comparative form does not exist]"];
advsuper = "["++pos ++ [": the adjective superlative form does not exist]"]
advpos = "["++pos ++ [": the adverb positive form does not exist]"];
advcomp = "["++pos ++ [": the adverb comparative form does not exist]"];
advsuper = "["++pos ++ [": the adverb superlative form does not exist]"]
};
};
@@ -184,9 +184,9 @@ resource AdjectiveMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
pos = guess_model pos;
comp = guess_model ("bardziej" ++ pos);
super = guess_model ("najbardziej" ++ pos);
advpos = "["++pos ++ [": the adjective positive form does not exist]"];
advcomp = "["++pos ++ [": the adjective comparative form does not exist]"];
advsuper = "["++pos ++ [": the adjective superlative form does not exist]"]
advpos = "["++pos ++ [": the adverb positive form does not exist]"];
advcomp = "["++pos ++ [": the adverb comparative form does not exist]"];
advsuper = "["++pos ++ [": the adverb superlative form does not exist]"]
};
};

View File

@@ -52,7 +52,6 @@ concrete CatPol of Cat = CommonX - [CAdv] ** open ResPol, Prelude, (R = ParamX)
---- Noun
-- CommNoun : Type = { s : SubstForm => Str; g : Gender };
CN = { s : Number => Case => Str; g : Gender };
-- NounPhrase : Type = { s : PronForm => Str; n : Number; g: Gender; p : Person };
@@ -105,7 +104,7 @@ concrete CatPol of Cat = CommonX - [CAdv] ** open ResPol, Prelude, (R = ParamX)
VA = Verb ** { c:{ c:Case; s:Str; adv:Bool } };
V2A = Verb ** { c:{ c:Case; s:Str; adv:Bool }; c2:Complement };
VPSlash = VerbPhrase ** { c : Complement };
VPSlash = VerbPhraseSlash;
VP = VerbPhrase;
Comp = { s: GenNum => Str };

View File

@@ -23,8 +23,9 @@ concrete ConjunctionPol of Conjunction =
voc = conj.s1 ++ list.np1.voc ++ conj.s2 ++ list.np2.voc;
dep = \\c => conj.s1 ++ list.np1.dep !c ++ conj.s2 ++ list.np2.dep !c;
gn = case <list.np1.gn,list.np2.gn> of {
<(MascPersSg|MascPersPl), (MascPersSg|MascPersPl)> => MascPersPl;
<_,_> => OthersPl
<(MascPersSg|MascPersPl), _> => MascPersPl;
<_, (MascPersSg|MascPersPl)> => MascPersPl;
<_,_> => OthersPl
};
p = case <list.np1.p,list.np2.p> of {
<P1, _> => P1;

View File

@@ -13,8 +13,8 @@ concrete GrammarPol of Grammar =
RelativePol,
ConjunctionPol,
PhrasePol,
TenseX - [CAdv],
TextX - [CAdv],
StructuralPol,
IdiomPol,
TenseX - [CAdv]
IdiomPol
** { flags startcat = Phr ; unlexer = text ; lexer = text ;} ;

View File

@@ -11,24 +11,24 @@ concrete IdiomPol of Idiom = CatPol ** open Prelude, ResPol, VerbMorphoPol in {
-- ImpersCl : VP -> Cl ; -- it is hot
ImpersCl vp = {
s = \\pol,anter,tense =>
vp.prefix !pol !NeutSg ++
vp.prefix ++
((indicative_form vp.verb vp.imienne pol) !<tense, anter, NeutSg, P3>) ++
vp.sufix !pol !NeutSg ++ vp.postfix !pol !NeutSg;
vp.sufix !pol !NeutSg
};
-- ImpPl1 : VP -> Utt ; -- let's go
ImpPl1 vp = {
s = vp.prefix !Pos !MascPersPl ++
s = vp.prefix ++
(imperative_form vp.verb vp.imienne Pos MascPersPl P1) ++
vp.sufix !Pos !MascPersPl ++ vp.postfix !Pos !MascPersPl;
vp.sufix !Pos !MascPersPl
};
-- GenericCl : VP -> Cl ; -- one sleeps
GenericCl vp = {
s = \\pol,anter,tense =>
"ktoś" ++ vp.prefix !pol !MascPersSg ++
"ktoś" ++ vp.prefix ++
((indicative_form vp.verb vp.imienne pol) !<tense, anter, MascPersSg, P3>) ++
vp.sufix !pol !MascPersSg ++ vp.postfix !pol !MascPersSg;
vp.sufix !pol !MascPersSg
};
-- CleftNP : NP -> RS -> Cl ; -- it is I who did it
@@ -38,15 +38,23 @@ concrete IdiomPol of Idiom = CatPol ** open Prelude, ResPol, VerbMorphoPol in {
CleftAdv adv s = {s=\\_,_,_ => adv.s ++ s.s };
-- ExistNP : NP -> Cl ; -- there is a house
ExistNP np = {s=\\pol,anter,tense => case pol of {
Pos=> case np.gn of {MascPersPl|OthersPl => "są" ; _=>"jest"} ++ np.nom; -- not in every case
Neg=>["nie ma"] ++ np.dep!GenNoPrep } };
ExistNP np = {s=\\pol,anter,tense => case pol of {
Pos=> jest_op ! <np.gn, np.p, tense, anter> ++ np.nom;
Neg=> niema_op!<tense,anter> ++ np.dep!GenNoPrep } };
-- ExistIP : IP -> QCl ; -- which houses are there
ExistIP ip = {s=\\pol,_,_ => case pol of {
Pos=>ip.nom; -- not in every case
Neg=>ip.dep!GenNoPrep ++ ["nie ma"]} };
ExistIP ip = {s=\\pol,anter,tense => case pol of {
Pos=>ip.nom ++ jest_op ! <ip.gn, ip.p, tense, anter>;
Neg=>ip.dep!GenNoPrep ++ niema_op!<tense,anter>} };
-- ProgrVP : VP -> VP ; -- be sleeping
ProgrVP vp = vp;
ProgrVP vp = {
prefix=vp.prefix; sufix=vp.sufix;
imienne = vp.imienne; exp=vp.exp;
verb= { si,sp= vp.verb.si;
refl=vp.verb.refl;
asp=vp.verb.asp;
ppartp=vp.verb.pparti;
pparti=vp.verb.pparti}
};
} ;

View File

@@ -324,7 +324,7 @@ lin
hear_V2 = dirV2 (mkV "słyszeć" conj94 "usłyszeć" conj94);
suck_V2 = dirV2 (mkMonoVerb "ssać" conj65 Imperfective);
seek_V2 = dirV2 (mkMonoVerb "szukać" conj98 Imperfective);
wipe_V2 = dirV2 (mkV "wycierać" conj98 "trzeć" conj43);
wipe_V2 = dirV2 (mkV "wycierać" conj98 "trzeć" conj43); -- strange?!?!
squeeze_V2 = dirV2 (mkV "ściskać" conj98 "ścisnąć" conj6);
rub_V2 = dirV2 (mkMonoVerb "trzeć" conj43 Imperfective);
hold_V2 = dirV2 (mkMonoVerb "trzymać" conj98 Imperfective);
@@ -378,9 +378,9 @@ lin
live_V = mkV1 "żyć" conj51 "pożyć" conj51;
john_PN = { nom = "Jan"; voc="Janie"; dep=table{GenPrep|GenNoPrep|AccPrep|AccNoPrep=>"Jana"; DatPrep|DatNoPrep=>"Janowi";
InstrNoPrep|InstrPrep=>"Janem"; LocPrep=>"Janie"};
InstrC=>"Janem"; LocPrep=>"Janie"};
gn=MascPersSg; p=P3};
paris_PN = { nom = "Paryż"; voc="Paryżu"; dep=table{GenPrep|GenNoPrep=>"Paryża"; AccPrep|AccNoPrep=>"Paryż";
DatPrep|DatNoPrep=>"Paryżowi"; InstrNoPrep|InstrPrep=>"Paryżem"; LocPrep=>"Paryżu"};
DatPrep|DatNoPrep=>"Paryżowi"; InstrC=>"Paryżem"; LocPrep=>"Paryżu"};
gn=MascPersSg; p=P3};
} ;

View File

@@ -32,7 +32,7 @@ resource MorphoPol =
(GenNoPrep|GenPrep) => "wszystkich";
(DatNoPrep|DatPrep) => "wszystkim";
(AccNoPrep|AccPrep) => "wszystkich";
(InstrNoPrep|InstrPrep) => "wszystkimi";
InstrC => "wszystkimi";
LocPrep => "wszystkich"
};
p = P3 ;
@@ -46,7 +46,7 @@ resource MorphoPol =
(GenNoPrep|GenPrep) => "wszystkiego";
(DatNoPrep|DatPrep) => "wszystkiemu";
(AccNoPrep|AccPrep) => "wszystko";
(InstrNoPrep|InstrPrep) => "wszystkim";
InstrC => "wszystkim";
LocPrep => "wszystkim"
};
p = P3;
@@ -60,7 +60,7 @@ resource MorphoPol =
(GenNoPrep|GenPrep) => "kogoś";
(DatNoPrep|DatPrep) => "komuś";
(AccNoPrep|AccPrep) => "kogoś";
(InstrNoPrep|InstrPrep) => "kimś";
InstrC => "kimś";
LocPrep => "kimś"
};
p = P3 ;
@@ -74,7 +74,7 @@ resource MorphoPol =
(GenNoPrep|GenPrep) => "czegoś";
(DatNoPrep|DatPrep) => "czemuś";
(AccNoPrep|AccPrep) => "coś";
(InstrNoPrep|InstrPrep) => "czymś";
InstrC => "czymś";
LocPrep => "czymś"
};
p = P3 ;
@@ -89,7 +89,7 @@ resource MorphoPol =
(GenNoPrep|GenPrep) => "kogo";
(DatNoPrep|DatPrep) => "komu";
(AccNoPrep|AccPrep) => "kogo";
(InstrNoPrep|InstrPrep) => "kim";
InstrC => "kim";
LocPrep => "kim"
};
p = P3 ;
@@ -103,7 +103,7 @@ resource MorphoPol =
(GenNoPrep|GenPrep) => "czego";
(DatNoPrep|DatPrep) => "czemu";
(AccNoPrep|AccPrep) => "co";
(InstrNoPrep|InstrPrep) => "czym";
InstrC => "czym";
LocPrep => "czym"
};
p = P3 ;
@@ -112,13 +112,13 @@ resource MorphoPol =
kazdyDet : Determiner = {
s,sp = table {
Nom => table {Masc _ => "każdy"; Fem => "każda"; (Neut|NeutGr) => "każde" };
Gen => table {Masc _ => "każdego"; Fem => "każdą"; (Neut|NeutGr) => "każdego" };
Dat => table {Masc _ => "każdemu"; Fem => "każdej"; (Neut|NeutGr) => "każdemu" };
Acc => table {Masc (Personal|Animate) => "każdego"; Masc Inanimate => "każdy"; Fem => "każdą"; (Neut|NeutGr) => "każde" };
Instr => table {Masc _ => "każdym"; Fem => "każdą"; (Neut|NeutGr) => "każdym" };
Loc => table {Masc _ => "każdym"; Fem => "każdej"; (Neut|NeutGr) => "każdym" };
VocP => table {Masc _ => "każdy"; Fem => "każda"; (Neut|NeutGr) => "każde" }
Nom => table {Masc _ => "każdy"; Fem => "każda"; (Neut|NeutGr|Plur) => "każde" };
Gen => table {Masc _ => "każdego"; Fem => "każdą"; (Neut|NeutGr|Plur) => "każdego" };
Dat => table {Masc _ => "każdemu"; Fem => "każdej"; (Neut|NeutGr|Plur) => "każdemu" };
Acc => table {Masc (Personal|Animate) => "każdego"; Masc Inanimate => "każdy"; Fem => "każdą"; (Neut|NeutGr|Plur) => "każde" };
Instr => table {Masc _ => "każdym"; Fem => "każdą"; (Neut|NeutGr|Plur) => "każdym" };
Loc => table {Masc _ => "każdym"; Fem => "każdej"; (Neut|NeutGr|Plur) => "każdym" };
VocP => table {Masc _ => "każdy"; Fem => "każda"; (Neut|NeutGr|Plur) => "każde" }
};
n = Sg;
a = NoA;
@@ -177,7 +177,7 @@ resource MorphoPol =
Loc => table { _ => "ilu" };
VocP => table {Masc Personal => "ilu"; _ => "ile" }
};
n = Pl;
n = Sg;
a = StoA
};
@@ -188,7 +188,7 @@ resource MorphoPol =
(GenNoPrep|GenPrep) => "nikogo";
(DatNoPrep|DatPrep) => "nikomu";
(AccNoPrep|AccPrep) => "nikogo";
(InstrNoPrep|InstrPrep) => "nikim";
InstrC => "nikim";
LocPrep => "nikim"
};
p=P3;
@@ -201,8 +201,8 @@ resource MorphoPol =
dep = table {
(GenNoPrep|GenPrep) => "niczego";
(DatNoPrep|DatPrep) => "niczemu";
(AccNoPrep|AccPrep) => "niczego";
(InstrNoPrep|InstrPrep) => "niczym";
(AccNoPrep|AccPrep) => "nic";
InstrC => "niczym";
LocPrep => "niczym"
};
p=P3;

View File

@@ -257,14 +257,13 @@ resource NounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
"y" => drzw + "ów"};
in
{ s = table {
SF Sg _ => "[" ++ drzwi ++ [": the singl form does not exist]"];
SF Pl Gen => x;
SF Pl Dat => x + "om";
SF Pl Instr => x + "ami";
SF Pl Loc => x + "ach";
SF Pl _ => drzwi
SF _ Gen => x;
SF _ Dat => x + "om";
SF _ Instr => x + "ami";
SF _ Loc => x + "ach";
SF _ _ => drzwi
};
g = Neut
g = Plur
};
@@ -1057,7 +1056,7 @@ resource NounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
SF Pl Loc => z + "ach";
SF Pl _ => z + "a"
};
g = Neut
g = NeutGr
};
@@ -1086,7 +1085,7 @@ resource NounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
SF Pl Loc => z + "ach";
SF Pl _ => z + "a"
};
g = Neut
g = NeutGr
};
@@ -1449,7 +1448,7 @@ resource NounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
SF Pl Loc => w + "ach";
SF Pl _ => u + "i"
};
g = Neut
g = NeutGr --asl
};
@@ -1477,7 +1476,7 @@ resource NounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
SF Pl Loc => y + "ach";
SF Pl _ => y + "y"
};
g = Neut
g = NeutGr
};
-- oper for neuter, subject ending in -k,
@@ -1504,7 +1503,7 @@ resource NounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
SF Pl Loc => y + "ach";
SF Pl _ => y + "y"
};
g = Neut
g = NeutGr
};
@@ -2141,6 +2140,7 @@ resource NounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
{ s = table {
SF Sg Nom => u;
SF Sg Dat => u + "owi";
SF Sg Acc => u;
SF Sg Instr => u + "em";
SF Sg Loc => x + "e";
SF Sg VocP => x + "e";

View File

@@ -90,17 +90,17 @@ concrete NounPol of Noun = CatPol ** open ResPol, Prelude, PronounMorphoPol in {
NumPl = { s = \\_,_ => ""; a = NoA; n = Pl; hasCard = False };
DetQuant q num = {
s = \\c,g => q.s ! AF (cast_gennum!<g,num.n>) c ++ num.s !c !g;
s = \\c,g => q.s ! AF (cast_gennum!<g,num.n>) (accom_case!<num.a,c,g>) ++ num.s !c !g;
sp = \\c,g => case num.hasCard of {
True => q.s ! AF (cast_gennum!<g,num.n>) c ++ num.s !c !g;
False => q.sp ! AF (cast_gennum!<g,num.n>) c ++ num.s !c !g
True => q.s ! AF (cast_gennum!<g,num.n>) (accom_case!<num.a,c,g>) ++ num.s !c !g;
False => q.sp ! AF (cast_gennum!<g,num.n>) (accom_case!<num.a,c,g>) ++ num.s !c !g
};
n = num.n;
a = num.a
};
DetQuantOrd q num ord = {
s,sp = \\c,g => q.s ! AF (cast_gennum!<g,num.n>) c
s,sp = \\c,g => q.s ! AF (cast_gennum!<g,num.n>) (accom_case!<num.a,c,g>)
++ num.s !c !g
++ ord.s ! AF (cast_gennum!<g,num.n>) (accom_case! <num.a,c,g>);
n = num.n;
@@ -156,9 +156,9 @@ concrete NounPol of Noun = CatPol ** open ResPol, Prelude, PronounMorphoPol in {
-- PPartNP : NP -> V2 -> NP ; -- the man seen
PPartNP np v2 = {
nom = np.nom ++ v2.ppart ! AF np.gn Nom;
voc = np.voc ++ v2.ppart ! AF np.gn VocP;
dep = \\cc => np.dep !cc ++ v2.ppart ! AF np.gn (extract_case!cc) ;
nom = np.nom ++ (mkAtable (table2record v2.ppartp)) ! AF np.gn Nom;
voc = np.voc ++ (mkAtable (table2record v2.ppartp)) ! AF np.gn VocP;
dep = \\cc => np.dep !cc ++ (mkAtable (table2record v2.ppartp)) ! AF np.gn (extract_case!cc) ;
gn = np.gn;
p = np.p
};

View File

@@ -24,10 +24,10 @@ concrete NumeralPol of Numeral = CatPol ** open ResPol,Prelude, AdjectiveMorphoP
-- n2, n3, n4, n5, n6, n7, n8, n9 : Digit ;
n2 = { unit = table {
<(Nom|VocP|Acc),NeutGr > => "dwoje";
<Gen,NeutGr > => "dwojga";
<(Dat|Loc),NeutGr > => "dwojgu";
<Instr,NeutGr > => "dwojgiem";
<(Nom|VocP|Acc),NeutGr|Plur > => "dwoje";
<Gen,NeutGr|Plur > => "dwojga";
<(Dat|Loc),NeutGr|Plur > => "dwojgu";
<Instr,NeutGr|Plur > => "dwojgiem";
<(Nom|VocP),Masc Personal > => "dwóch";
<(Nom|VocP|Acc),Fem > => "dwie";
(<Gen,_>|<Acc,Masc Personal>) => "dwóch";
@@ -38,19 +38,19 @@ concrete NumeralPol of Numeral = CatPol ** open ResPol,Prelude, AdjectiveMorphoP
<Loc,_ > => "dwóch"
};
teen = table {
<(Nom|VocP|Acc),NeutGr > => "dwanaścioro";
<Gen,NeutGr > => "dwanaściorga";
<(Dat|Loc),NeutGr > => "dwanaściorgu";
<Instr,NeutGr > => "dwanaściorgiem";
<(Nom|VocP|Acc),NeutGr|Plur > => "dwanaścioro";
<Gen,NeutGr|Plur > => "dwanaściorga";
<(Dat|Loc),NeutGr|Plur > => "dwanaściorgu";
<Instr,NeutGr|Plur > => "dwanaściorgiem";
(<(Nom|VocP|Acc),Masc Personal>|
<Gen|Dat|Instr|Loc,_>) => "dwunastu";
<(Nom|VocP|Acc),_ > => "dwanaście"
};
ten = table {
<(Nom|VocP|Acc),NeutGr > => "dwadzieścioro";
<Gen,NeutGr > => "dwadzieściorga";
<(Dat|Loc),NeutGr > => "dwadzieściorgu";
<Instr,NeutGr > => "dwadzieściorgiem";
<(Nom|VocP|Acc),NeutGr|Plur > => "dwadzieścioro";
<Gen,NeutGr|Plur > => "dwadzieściorga";
<(Dat|Loc),NeutGr|Plur > => "dwadzieściorgu";
<Instr,NeutGr|Plur > => "dwadzieściorgiem";
(<(Nom|VocP|Acc),Masc Personal>|
<Gen|Dat|Instr|Loc,_>) => "dwudziestu";
<(Nom|VocP|Acc),_ > => "dwadzieścia"
@@ -67,10 +67,10 @@ concrete NumeralPol of Numeral = CatPol ** open ResPol,Prelude, AdjectiveMorphoP
a=DwaA
};
n3 = { unit = table {
<(Nom|VocP|Acc),NeutGr > => "troje";
<Gen,NeutGr > => "trojga";
<Dat,NeutGr > => "trojgu";
<Instr,NeutGr > => "trojgiem";
<(Nom|VocP|Acc),NeutGr|Plur > => "troje";
<Gen,NeutGr|Plur > => "trojga";
<Dat,NeutGr|Plur > => "trojgu";
<Instr,NeutGr|Plur > => "trojgiem";
<(Nom|VocP),Masc Personal > => "trzech";
<(Nom|VocP|Acc),Fem > => "trzy";
(<Gen,_>|<Acc,Masc Personal>) => "trzech";
@@ -81,19 +81,19 @@ concrete NumeralPol of Numeral = CatPol ** open ResPol,Prelude, AdjectiveMorphoP
<Loc,_ > => "trzech"
};
teen = table {
<(Nom|VocP|Acc),NeutGr > => "trzynaścioro";
<Gen,NeutGr > => "trzynaściorga";
<(Dat|Loc),NeutGr > => "trzynaściorgu";
<Instr,NeutGr > => "trzynaściorgiem";
<(Nom|VocP|Acc),NeutGr|Plur > => "trzynaścioro";
<Gen,NeutGr|Plur > => "trzynaściorga";
<(Dat|Loc),NeutGr|Plur > => "trzynaściorgu";
<Instr,NeutGr|Plur > => "trzynaściorgiem";
(<(Nom|VocP|Acc),Masc Personal>|
<Gen|Dat|Instr|Loc,_>) => "trzynastu";
<(Nom|VocP|Acc),_ > => "trzynaście"
};
ten = table {
<(Nom|VocP|Acc),NeutGr > => "trzydzieścioro";
<Gen,NeutGr > => "trzydzieściorga";
<(Dat|Loc),NeutGr > => "trzydzieściorgu";
<Instr,NeutGr > => "trzydzieściorgiem";
<(Nom|VocP|Acc),NeutGr|Plur > => "trzydzieścioro";
<Gen,NeutGr|Plur > => "trzydzieściorga";
<(Dat|Loc),NeutGr|Plur > => "trzydzieściorgu";
<Instr,NeutGr|Plur > => "trzydzieściorgiem";
(<(Nom|VocP|Acc),Masc Personal>|
<Gen|Dat|Instr|Loc,_>) => "trzydziestu";
<(Nom|VocP|Acc),_ > => "trzydzieści"
@@ -110,10 +110,10 @@ concrete NumeralPol of Numeral = CatPol ** open ResPol,Prelude, AdjectiveMorphoP
a=DwaA
};
n4 = { unit = table {
<(Nom|VocP|Acc),NeutGr > => "czworo";
<Gen,NeutGr > => "czworga";
<Dat,NeutGr > => "czworgu";
<Instr,NeutGr > => "czworgiem";
<(Nom|VocP|Acc),NeutGr|Plur > => "czworo";
<Gen,NeutGr|Plur > => "czworga";
<Dat,NeutGr|Plur > => "czworgu";
<Instr,NeutGr|Plur > => "czworgiem";
<(Nom|VocP),Masc Personal > => "czterech";
<(Nom|VocP|Acc),Fem > => "cztery";
(<Gen,_>|<Acc,Masc Personal>) => "czterch";
@@ -124,19 +124,19 @@ concrete NumeralPol of Numeral = CatPol ** open ResPol,Prelude, AdjectiveMorphoP
<Loc,_ > => "czterech"
};
teen = table {
<(Nom|VocP|Acc),NeutGr > => "czternaścioro";
<Gen,NeutGr > => "czternaściorga";
<(Dat|Loc),NeutGr > => "czternaściorgu";
<Instr,NeutGr > => "czternaściorgiem";
<(Nom|VocP|Acc),NeutGr|Plur > => "czternaścioro";
<Gen,NeutGr|Plur > => "czternaściorga";
<(Dat|Loc),NeutGr|Plur > => "czternaściorgu";
<Instr,NeutGr|Plur > => "czternaściorgiem";
(<(Nom|VocP|Acc),Masc Personal>|
<Gen|Dat|Instr|Loc,_>) => "czternastu";
<(Nom|VocP|Acc),_ > => "czternaście"
};
ten = table {
<(Nom|VocP|Acc),NeutGr > => "czterdzieścioro";
<Gen,NeutGr > => "czterdzieściorga";
<(Dat|Loc),NeutGr > => "czterdzieściorgu";
<Instr,NeutGr > => "czterdzieściorgiem";
<(Nom|VocP|Acc),NeutGr|Plur > => "czterdzieścioro";
<Gen,NeutGr|Plur > => "czterdzieściorga";
<(Dat|Loc),NeutGr|Plur > => "czterdzieściorgu";
<Instr,NeutGr|Plur > => "czterdzieściorgiem";
(<(Nom|VocP|Acc),Masc Personal>|
<Gen|Dat|Instr|Loc,_>) => "czterdziestu";
<(Nom|VocP|Acc),_ > => "czterdzieści"
@@ -153,10 +153,10 @@ concrete NumeralPol of Numeral = CatPol ** open ResPol,Prelude, AdjectiveMorphoP
a=DwaA
};
n5 = { unit = table {
<(Nom|VocP|Acc),NeutGr > => "pięcioro";
<Gen,NeutGr > => "pięciorga";
<Dat,NeutGr > => "pięciorgu";
<Instr,NeutGr > => "pięciorgiem";
<(Nom|VocP|Acc),NeutGr|Plur > => "pięcioro";
<Gen,NeutGr|Plur > => "pięciorga";
<Dat,NeutGr|Plur > => "pięciorgu";
<Instr,NeutGr|Plur > => "pięciorgiem";
<(Nom|VocP),Masc Personal > => "pięciu";
(<Gen,_>|<Acc,Masc Personal>) => "pięciu";
<(Nom|VocP|Acc),_ > => "pięć";
@@ -165,19 +165,19 @@ concrete NumeralPol of Numeral = CatPol ** open ResPol,Prelude, AdjectiveMorphoP
<Loc,_ > => "pięciu"
};
teen = table {
<(Nom|VocP|Acc),NeutGr > => "piętnaścioro";
<Gen,NeutGr > => "piętnaściorga";
<(Dat|Loc),NeutGr > => "piętnaściorgu";
<Instr,NeutGr > => "piętnaściorgiem";
<(Nom|VocP|Acc),NeutGr|Plur > => "piętnaścioro";
<Gen,NeutGr|Plur > => "piętnaściorga";
<(Dat|Loc),NeutGr|Plur > => "piętnaściorgu";
<Instr,NeutGr|Plur > => "piętnaściorgiem";
(<(Nom|VocP|Acc),Masc Personal>|
<Gen|Dat|Instr|Loc,_>) => "piętnastu";
<(Nom|VocP|Acc),_ > => "piętnaście"
};
ten = table {
<(Nom|VocP|Acc),NeutGr > => "pięćdzieścioro";
<Gen,NeutGr > => "pięćdzieściorga";
<(Dat|Loc),NeutGr > => "pięćdzieściorgu";
<Instr,NeutGr > => "pięćdzieściorgiem";
<(Nom|VocP|Acc),NeutGr|Plur > => "pięćdzieścioro";
<Gen,NeutGr|Plur > => "pięćdzieściorga";
<(Dat|Loc),NeutGr|Plur > => "pięćdzieściorgu";
<Instr,NeutGr|Plur > => "pięćdzieściorgiem";
(<(Nom|VocP|Acc),Masc Personal>|
<Gen|Dat|Instr|Loc,_>) => "pięćdziesięciu";
<(Nom|VocP|Acc),_ > => "pięćdziesiąt"
@@ -195,10 +195,10 @@ concrete NumeralPol of Numeral = CatPol ** open ResPol,Prelude, AdjectiveMorphoP
a=PiecA
};
n6 = { unit = table {
<(Nom|VocP|Acc),NeutGr > => "sześcioro";
<Gen,NeutGr > => "sześciorga";
<Dat,NeutGr > => "sześciorgu";
<Instr,NeutGr > => "sześciorgiem";
<(Nom|VocP|Acc),NeutGr|Plur > => "sześcioro";
<Gen,NeutGr|Plur > => "sześciorga";
<Dat,NeutGr|Plur > => "sześciorgu";
<Instr,NeutGr|Plur > => "sześciorgiem";
<(Nom|VocP),Masc Personal > => "sześciu";
(<Gen,_>|<Acc,Masc Personal>) => "sześciu";
<(Nom|VocP|Acc),_ > => "sześć";
@@ -207,19 +207,19 @@ n6 = { unit = table {
<Loc,_ > => "sześciu"
};
teen = table {
<(Nom|VocP|Acc),NeutGr > => "szesnaścioro";
<Gen,NeutGr > => "szesnaściorga";
<(Dat|Loc),NeutGr > => "szesnaściorgu";
<Instr,NeutGr > => "szesnaściorgiem";
<(Nom|VocP|Acc),NeutGr|Plur > => "szesnaścioro";
<Gen,NeutGr|Plur > => "szesnaściorga";
<(Dat|Loc),NeutGr|Plur > => "szesnaściorgu";
<Instr,NeutGr|Plur > => "szesnaściorgiem";
(<(Nom|VocP|Acc),Masc Personal>|
<Gen|Dat|Instr|Loc,_>) => "szesnastu";
<(Nom|VocP|Acc),_ > => "szesnaście"
};
ten = table {
<(Nom|VocP|Acc),NeutGr > => "sześćdzieścioro";
<Gen,NeutGr > => "sześćdzieściorga";
<(Dat|Loc),NeutGr > => "sześćdzieściorgu";
<Instr,NeutGr > => "sześćdzieściorgiem";
<(Nom|VocP|Acc),NeutGr|Plur > => "sześćdzieścioro";
<Gen,NeutGr|Plur > => "sześćdzieściorga";
<(Dat|Loc),NeutGr|Plur > => "sześćdzieściorgu";
<Instr,NeutGr|Plur > => "sześćdzieściorgiem";
(<(Nom|VocP|Acc),Masc Personal>|
<Gen|Dat|Instr|Loc,_>) => "sześćdziesięciu";
<(Nom|VocP|Acc),_ > => "sześćdziesiąt"
@@ -237,10 +237,10 @@ n6 = { unit = table {
a=PiecA
};
n7 = { unit = table {
<(Nom|VocP|Acc),NeutGr > => "siedmioro";
<Gen,NeutGr > => "siedmiorga";
<Dat,NeutGr > => "siedmiorgu";
<Instr,NeutGr > => "siedmiorgiem";
<(Nom|VocP|Acc),NeutGr|Plur > => "siedmioro";
<Gen,NeutGr|Plur > => "siedmiorga";
<Dat,NeutGr|Plur > => "siedmiorgu";
<Instr,NeutGr|Plur > => "siedmiorgiem";
<(Nom|VocP),Masc Personal > => "siedmiu";
(<Gen,_>|<Acc,Masc Personal>) => "siedmiu";
<(Nom|VocP|Acc),_ > => "siedem";
@@ -249,19 +249,19 @@ n7 = { unit = table {
<Loc,_ > => "siedmiu"
};
teen = table {
<(Nom|VocP|Acc),NeutGr > => "siedemnaścioro";
<Gen,NeutGr > => "siedemnaściorga";
<(Dat|Loc),NeutGr > => "siedemnaściorgu";
<Instr,NeutGr > => "siedemnaściorgiem";
<(Nom|VocP|Acc),NeutGr|Plur > => "siedemnaścioro";
<Gen,NeutGr|Plur > => "siedemnaściorga";
<(Dat|Loc),NeutGr|Plur > => "siedemnaściorgu";
<Instr,NeutGr|Plur > => "siedemnaściorgiem";
(<(Nom|VocP|Acc),Masc Personal>|
<Gen|Dat|Instr|Loc,_>) => "siedemnastu";
<(Nom|VocP|Acc),_ > => "siedemnaście"
};
ten = table {
<(Nom|VocP|Acc),NeutGr > => "siedemdzieścioro";
<Gen,NeutGr > => "siedemdzieściorga";
<(Dat|Loc),NeutGr > => "siedemdzieściorgu";
<Instr,NeutGr > => "siedemdzieściorgiem";
<(Nom|VocP|Acc),NeutGr|Plur > => "siedemdzieścioro";
<Gen,NeutGr|Plur > => "siedemdzieściorga";
<(Dat|Loc),NeutGr|Plur > => "siedemdzieściorgu";
<Instr,NeutGr|Plur > => "siedemdzieściorgiem";
(<(Nom|VocP|Acc),Masc Personal>|
<Gen|Dat|Instr|Loc,_>) => "siedemdziesięciu";
<(Nom|VocP|Acc),_ > => "siedemdziesiąt"
@@ -279,10 +279,10 @@ n7 = { unit = table {
a=PiecA
};
n8 = { unit = table {
<(Nom|VocP|Acc),NeutGr > => "ośmioro";
<Gen,NeutGr > => "ośmiorga";
<Dat,NeutGr > => "ośmiorgu";
<Instr,NeutGr > => "ośmiorgiem";
<(Nom|VocP|Acc),NeutGr|Plur > => "ośmioro";
<Gen,NeutGr|Plur > => "ośmiorga";
<Dat,NeutGr|Plur > => "ośmiorgu";
<Instr,NeutGr|Plur > => "ośmiorgiem";
<(Nom|VocP),Masc Personal > => "ośmiu";
(<Gen,_>|<Acc,Masc Personal>) => "ośmiu";
<(Nom|VocP|Acc),_ > => "osiemm";
@@ -291,19 +291,19 @@ n8 = { unit = table {
<Loc,_ > => "ośmiu"
};
teen = table {
<(Nom|VocP|Acc),NeutGr > => "osiemnaścioro";
<Gen,NeutGr > => "osiemnaściorga";
<(Dat|Loc),NeutGr > => "osiemnaściorgu";
<Instr,NeutGr > => "osiemnaściorgiem";
<(Nom|VocP|Acc),NeutGr|Plur > => "osiemnaścioro";
<Gen,NeutGr|Plur > => "osiemnaściorga";
<(Dat|Loc),NeutGr|Plur > => "osiemnaściorgu";
<Instr,NeutGr|Plur > => "osiemnaściorgiem";
(<(Nom|VocP|Acc),Masc Personal>|
<Gen|Dat|Instr|Loc,_>) => "osiemnastu";
<(Nom|VocP|Acc),_ > => "osiemnaście"
};
ten = table {
<(Nom|VocP|Acc),NeutGr > => "osiemdzieścioro";
<Gen,NeutGr > => "osiemdzieściorga";
<(Dat|Loc),NeutGr > => "osiemdzieściorgu";
<Instr,NeutGr > => "osiemdzieściorgiem";
<(Nom|VocP|Acc),NeutGr|Plur > => "osiemdzieścioro";
<Gen,NeutGr|Plur > => "osiemdzieściorga";
<(Dat|Loc),NeutGr|Plur > => "osiemdzieściorgu";
<Instr,NeutGr|Plur > => "osiemdzieściorgiem";
(<(Nom|VocP|Acc),Masc Personal>|
<Gen|Dat|Instr|Loc,_>) => "osiemdziesięciu";
<(Nom|VocP|Acc),_ > => "osiemdziesiąt"
@@ -320,10 +320,10 @@ n8 = { unit = table {
a=PiecA
};
n9 = { unit = table {
<(Nom|VocP|Acc),NeutGr > => "dziewięcioro";
<Gen,NeutGr > => "dziewięciorga";
<Dat,NeutGr > => "dziewięciorgu";
<Instr,NeutGr > => "dziewięciorgiem";
<(Nom|VocP|Acc),NeutGr|Plur > => "dziewięcioro";
<Gen,NeutGr|Plur > => "dziewięciorga";
<Dat,NeutGr|Plur > => "dziewięciorgu";
<Instr,NeutGr|Plur > => "dziewięciorgiem";
<(Nom|VocP),Masc Personal > => "dziewięciu";
(<Gen,_>|<Acc,Masc Personal>) => "dziewięciu";
<(Nom|VocP|Acc),_ > => "dziewięć";
@@ -332,19 +332,19 @@ n9 = { unit = table {
<Loc,_ > => "dziewięciu"
};
teen = table {
<(Nom|VocP|Acc),NeutGr > => "dziewiętnaścioro";
<Gen,NeutGr > => "dziewiętnaściorga";
<(Dat|Loc),NeutGr > => "dziewiętnaściorgu";
<Instr,NeutGr > => "dziewiętnaściorgiem";
<(Nom|VocP|Acc),NeutGr|Plur > => "dziewiętnaścioro";
<Gen,NeutGr|Plur > => "dziewiętnaściorga";
<(Dat|Loc),NeutGr|Plur > => "dziewiętnaściorgu";
<Instr,NeutGr|Plur > => "dziewiętnaściorgiem";
(<(Nom|VocP|Acc),Masc Personal>|
<Gen|Dat|Instr|Loc,_>) => "dziewiętnastu";
<(Nom|VocP|Acc),_ > => "dziewiętnaście"
};
ten = table {
<(Nom|VocP|Acc),NeutGr > => "dziewięćdzieścioro";
<Gen,NeutGr > => "dziewięćdzieściorga";
<(Dat|Loc),NeutGr > => "dziewięćdzieściorgu";
<Instr,NeutGr > => "dziewięćdzieściorgiem";
<(Nom|VocP|Acc),NeutGr|Plur > => "dziewięćdzieścioro";
<Gen,NeutGr|Plur > => "dziewięćdzieściorga";
<(Dat|Loc),NeutGr|Plur > => "dziewięćdzieściorgu";
<Instr,NeutGr|Plur > => "dziewięćdzieściorgiem";
(<(Nom|VocP|Acc),Masc Personal>|
<Gen|Dat|Instr|Loc,_>) => "dziewięćdziesięciu";
<(Nom|VocP|Acc),_ > => "dziewięćdziesiąt"
@@ -364,7 +364,7 @@ n9 = { unit = table {
pot01 = {
unit = table {
(<(Nom|VocP),Masc _>|<Acc,Masc Inanimate>) => "jeden";
<(Nom|Acc|VocP),Neut|NeutGr> => "jedno";
<(Nom|Acc|VocP),Neut|NeutGr|Plur> => "jedno";
<(Nom|VocP),Fem> => "jedna";
<(Gen|Dat|Loc),Fem> => "jednej";
<(Acc|Instr),Fem> => "jedną";
@@ -394,10 +394,10 @@ n9 = { unit = table {
-- pot110 : Sub100 ; -- 10
pot110 = {
s =table {
<(Nom|VocP|Acc),NeutGr > => "dziesięcioro";
<Gen,NeutGr > => "dziesięciorga";
<(Dat|Loc),NeutGr > => "dziesięciorgu";
<Instr,NeutGr > => "dziesięciorgiem";
<(Nom|VocP|Acc),NeutGr|Plur > => "dziesięcioro";
<Gen,NeutGr|Plur > => "dziesięciorga";
<(Dat|Loc),NeutGr|Plur > => "dziesięciorgu";
<Instr,NeutGr|Plur > => "dziesięciorgiem";
(<(Nom|VocP|Acc),Masc Personal>|
<Gen|Dat|Instr|Loc,_>) => "dziesięciu";
<(Nom|VocP|Acc),_ > => "dziesięć"
@@ -410,10 +410,10 @@ n9 = { unit = table {
-- pot111 : Sub100 ; -- 11
pot111 = {
s = table {
<(Nom|VocP|Acc),NeutGr > => "jedenaścioro";
<Gen,NeutGr > => "jedenaściorga";
<(Dat|Loc),NeutGr > => "jedenaściorgu";
<Instr,NeutGr > => "jedenaściorgiem";
<(Nom|VocP|Acc),NeutGr|Plur > => "jedenaścioro";
<Gen,NeutGr|Plur > => "jedenaściorga";
<(Dat|Loc),NeutGr|Plur > => "jedenaściorgu";
<Instr,NeutGr|Plur > => "jedenaściorgiem";
(<(Nom|VocP|Acc),Masc Personal>|
<Gen|Dat|Instr|Loc,_>) => "jedenastu";
<(Nom|VocP|Acc),_ > => "jedenaście"

View File

@@ -34,53 +34,53 @@
CatPol
in
{
flags coding=utf8 ;
flags coding=utf8;
oper Gender = MorphoPol.Gender ;
Case = MorphoPol.Case ;
Number = MorphoPol.Number ;
Animacy = MorphoPol.Animacy ;
Aspect = MorphoPol.Aspect ;
-- Voice = MorphoPol.Voice ;
-- Tense = Tense ;
Bool = Prelude.Bool ;
oper Gender = MorphoPol.Gender;
Case = MorphoPol.Case;
Number = MorphoPol.Number;
Animacy = MorphoPol.Animacy;
Aspect = MorphoPol.Aspect;
-- Voice = MorphoPol.Voice;
-- Tense = Tense;
Bool = Prelude.Bool;
-- Used abbreviations
masculineA = Masc Animate ;
masculineI = Masc Inanimate ;
masculineP = Masc Personal ;
feminine = Fem ;
neuter = Neut ;
nominative = Nom ;
genitive = Gen ;
dative = Dat ;
accusative = Acc ;
instrumental = Instr ; -- new, is like instrumental in russian
locative = Loc ; -- new, is like prepositional in russian
vocative = VocP ;
singular = Sg ;
plural = Pl ;
animate = Animate ;
inanimate = Inanimate ;
personal = Personal ;
masculineA = Masc Animate;
masculineI = Masc Inanimate;
masculineP = Masc Personal;
feminine = Fem;
neuter = Neut;
nominative = Nom;
genitive = Gen;
dative = Dat;
accusative = Acc;
instrumental = Instr; -- new, is like instrumental in russian
locative = Loc; -- new, is like prepositional in russian
vocative = VocP;
singular = Sg;
plural = Pl;
animate = Animate;
inanimate = Inanimate;
personal = Personal;
true = True ;
false = False ;
true = True;
false = False;
--1 Nouns
-- Parameters --------
Gender : Type ;
Gender : Type;
masculineP : Gender ; -- personal
masculineA : Gender ; -- animate
masculineI : Gender ; -- inanimate
feminine : Gender ;
neuter : Gender ;
masculineP : Gender; -- personal
masculineA : Gender; -- animate
masculineI : Gender; -- inanimate
feminine : Gender;
neuter : Gender;
-- In Polish there are as in German 3 Genders: masculine, feminine and neuter.
-- But !!! in masculine declension we distinguish between:
@@ -95,22 +95,22 @@
-- Animacy is only for masculine Nouns.
Animacy: Type ;
Animacy: Type;
animate: Animacy ;
inanimate: Animacy ;
personal : Animacy ;
animate: Animacy;
inanimate: Animacy;
personal : Animacy;
Case : Type ;
Case : Type;
nominative : Case ;
genitive : Case ;
dative : Case ;
accusative : Case ;
instrumental : Case ;
locative : Case ;
vocative : Case ;
nominative : Case;
genitive : Case;
dative : Case;
accusative : Case;
instrumental : Case;
locative : Case;
vocative : Case;
-- To abstract over case names, I defined seven cases.
-- The seventh case vocative is like in english the phrase
@@ -123,23 +123,23 @@
-- To abstract over number names, I define the following.
Number : Type ;
Number : Type;
singular : Number ;
plural : Number ;
singular : Number;
plural : Number;
--1 Paradigms
-- Best case is for indeclinable nouns. They are: "alibi", "boa", "emu", "jury", "kakao", "menu", "zebu".
mkIndeclinableNoun: Str -> Gender -> N ; --function declaration
mkIndeclinableNoun: Str -> Gender -> N; --function declaration
mkIndeclinableNoun = \str, g -> -- function definition
{
s = table { SF _ _ => str } ;
s = table { SF _ _ => str };
g = g
} ** {lock_N = <>} ;
} ** {lock_N = <>};
-- Worst case gives many forms.
@@ -168,457 +168,457 @@
---------- Patterns for feminine nouns ----------
nKapiel : Str -> N ; -- feminine, subject ending in "-l"
nKapiel = \s -> l_End_F_1 s ** {lock_N = <>} ;
nKapiel : Str -> N; -- feminine, subject ending in "-l"
nKapiel = \s -> l_End_F_1 s ** {lock_N = <>};
nLodz : Str -> N ; -- feminine, subject ending in "-dź"
nLodz = \x -> dzx_End_VA1_CAL_F x ** {lock_N = <>} ;
nLodz : Str -> N; -- feminine, subject ending in "-dź"
nLodz = \x -> dzx_End_VA1_CAL_F x ** {lock_N = <>};
nSul : Str -> N ; -- feminine, subject ending in "-l"
nSul = \x -> l_End_VA1_F x ** {lock_N = <>} ;
nSul : Str -> N; -- feminine, subject ending in "-l"
nSul = \x -> l_End_VA1_F x ** {lock_N = <>};
nKonew : Str -> N ; -- feminine, subject ending in "-w"
nKonew = \s -> w_End_FleetingEminus_F s ** {lock_N = <>} ;
nKonew : Str -> N; -- feminine, subject ending in "-w"
nKonew = \s -> w_End_FleetingEminus_F s ** {lock_N = <>};
nWies : Str -> N ; -- feminine, subject ending in "-ś"
nWies = \x -> sx_End_CAL_FleetingIEminus_F x ** {lock_N = <>} ;
nWies : Str -> N; -- feminine, subject ending in "-ś"
nWies = \x -> sx_End_CAL_FleetingIEminus_F x ** {lock_N = <>};
nDlon : Str -> N ; -- feminine, subject ending in "-ń"
nDlon = \x -> nx_End_CAL_F x ** {lock_N = <>} ;
nDlon : Str -> N; -- feminine, subject ending in "-ń"
nDlon = \x -> nx_End_CAL_F x ** {lock_N = <>};
nSiec : Str -> N ; -- feminine, subject ending in "-ć" (sieć),"-ść" (miłość)
nSiec = \x -> cx_End_CAL_F_1 x ** {lock_N = <>} ;
nSiec : Str -> N; -- feminine, subject ending in "-ć" (sieć),"-ść" (miłość)
nSiec = \x -> cx_End_CAL_F_1 x ** {lock_N = <>};
nDrzwi : Str -> N ; -- drzwi, wnętrzności, usta
nDrzwi = \x -> onlyPlNoun x ** {lock_N = <>} ;
nDrzwi : Str -> N; -- drzwi, wnętrzności, usta
nDrzwi = \x -> onlyPlNoun x ** {lock_N = <>};
nKosc : Str -> N ; -- feminine, subject ending in "-ść"(kość), "-ć" (nić),
nKosc = \x -> cx_End_CAL_F_2 x ** {lock_N = <>} ;
nKosc : Str -> N; -- feminine, subject ending in "-ść"(kość), "-ć" (nić),
nKosc = \x -> cx_End_CAL_F_2 x ** {lock_N = <>};
nNoc : Str -> N ; -- feminine, subject ending in "-c", "-cz", "-rz", "-ż"
nNoc = \s -> hardened_End_F_1 s ** {lock_N = <>} ;
nNoc : Str -> N; -- feminine, subject ending in "-c", "-cz", "-rz", "-ż"
nNoc = \s -> hardened_End_F_1 s ** {lock_N = <>};
nWesz : Str -> N ; -- feminine, subject ending in "-sz"
nWesz = \s -> sz_End_FleetingEminus_F s ** {lock_N = <>} ;
nWesz : Str -> N; -- feminine, subject ending in "-sz"
nWesz = \s -> sz_End_FleetingEminus_F s ** {lock_N = <>};
nKrolowa : Str -> N ; -- feminine, subject ending in "-wa", but also for "księżna"
nKrolowa = \s -> wa_na_End_F s ** {lock_N = <>} ;
nKrolowa : Str -> N; -- feminine, subject ending in "-wa", but also for "księżna"
nKrolowa = \s -> wa_na_End_F s ** {lock_N = <>};
nReka : Str -> N ; -- feminine "ręka", irregularly noun
nReka = \x -> k_End_Unregulary_VA3_CA_F x ** {lock_N = <>} ;
nReka : Str -> N; -- feminine "ręka", irregularly noun
nReka = \x -> k_End_Unregulary_VA3_CA_F x ** {lock_N = <>};
nApteka : Str -> N ; -- feminine, subject ending in "-k", -"g", consonant alternation k:c, g:dz
nApteka = \s -> g_k_End_CA_F s ** {lock_N = <>} ;
nApteka : Str -> N; -- feminine, subject ending in "-k", -"g", consonant alternation k:c, g:dz
nApteka = \s -> g_k_End_CA_F s ** {lock_N = <>};
nDroga : Str -> N ; -- feminine, subject ending in "g", consonant alternation d:dz, vowel alternation o:ó
nDroga = \s -> g_End_VA1_CA_F s ** {lock_N = <>} ;
nDroga : Str -> N; -- feminine, subject ending in "g", consonant alternation d:dz, vowel alternation o:ó
nDroga = \s -> g_End_VA1_CA_F s ** {lock_N = <>};
nMatka : Str -> N ; -- feminine, subject ending in -k,consonant alternation k:c, fleeting e
nMatka = \s -> k_End_CA_FleetingEplus_F s ** {lock_N = <>} ;
nMatka : Str -> N; -- feminine, subject ending in -k,consonant alternation k:c, fleeting e
nMatka = \s -> k_End_CA_FleetingEplus_F s ** {lock_N = <>};
nZiemia : Str -> N ; -- feminine, subject ending in "-ia"
nZiemia = \s -> ia_End_F_1 s ** {lock_N = <>} ;
nZiemia : Str -> N; -- feminine, subject ending in "-ia"
nZiemia = \s -> ia_End_F_1 s ** {lock_N = <>};
nFala : Str -> N ; -- feminine, subject ending in "-l"
nFala = \s -> l_End_F_2 s ** {lock_N = <>} ;
nFala : Str -> N; -- feminine, subject ending in "-l"
nFala = \s -> l_End_F_2 s ** {lock_N = <>};
nLilia : Str -> N ; -- feminine, subject ending in "-ia"
nLilia = \s -> ia_End_F_2 s ** {lock_N = <>} ;
nLilia : Str -> N; -- feminine, subject ending in "-ia"
nLilia = \s -> ia_End_F_2 s ** {lock_N = <>};
nKobieta : Str -> N ; -- feminine, subject ending in "-t"
nKobieta = \s -> hard_End_CAL_F s ** {lock_N = <>} ;
nKobieta : Str -> N; -- feminine, subject ending in "-t"
nKobieta = \s -> hard_End_CAL_F s ** {lock_N = <>};
nLiczba : Str -> N ; -- feminine, subject ending in "-b", "-p", "-n"
nLiczba = \s -> hard_End_CL_F s ** {lock_N = <>} ;
nLiczba : Str -> N; -- feminine, subject ending in "-b", "-p", "-n"
nLiczba = \s -> hard_End_CL_F s ** {lock_N = <>};
nSila : Str -> N ; -- feminine, subject ending in "-ł", "-r"
nSila = \s -> hard_End_CA_F s ** {lock_N = <>} ;
nSila : Str -> N; -- feminine, subject ending in "-ł", "-r"
nSila = \s -> hard_End_CA_F s ** {lock_N = <>};
nDoba : Str -> N ; -- feminine, subject ending in "-b", "-p"
nDoba = \s -> hard_End_VA1_CL_F s ** {lock_N = <>} ;
nDoba : Str -> N; -- feminine, subject ending in "-b", "-p"
nDoba = \s -> hard_End_VA1_CL_F s ** {lock_N = <>};
nWoda : Str -> N ; -- feminine, subject ending in "-d"
nWoda = \s -> hard_End_VA1_CAL_F s ** {lock_N = <>} ;
nWoda : Str -> N; -- feminine, subject ending in "-d"
nWoda = \s -> hard_End_VA1_CAL_F s ** {lock_N = <>};
nSzkola : Str -> N ; -- feminine, subject ending in "-oła", "-ra"
nSzkola = \s -> hard_End_VA1_CA_F s ** {lock_N = <>} ;
nSzkola : Str -> N; -- feminine, subject ending in "-oła", "-ra"
nSzkola = \s -> hard_End_VA1_CA_F s ** {lock_N = <>};
nWojna : Str -> N ; -- feminine, subject ending in two consonants: jn, łz, łn, ćm,żw
nWojna = \s -> hard_End_CL_FleetingEplus_F s ** {lock_N = <>} ;
nWojna : Str -> N; -- feminine, subject ending in two consonants: jn, łz, łn, ćm,żw
nWojna = \s -> hard_End_CL_FleetingEplus_F s ** {lock_N = <>};
nWiosna : Str -> N ; -- feminine, subject ending in two consonants: sn
nWiosna = \s -> sn_End_CAL_FleetingIEplus_F s ** {lock_N = <>} ;
nWiosna : Str -> N; -- feminine, subject ending in two consonants: sn
nWiosna = \s -> sn_End_CAL_FleetingIEplus_F s ** {lock_N = <>};
nMgla : Str -> N ; -- feminine, subject ending in "-gł"
nMgla = \x -> hard_l_End_CA_FleetingIEplus_F x ** {lock_N = <>} ;
nMgla : Str -> N; -- feminine, subject ending in "-gł"
nMgla = \x -> hard_l_End_CA_FleetingIEplus_F x ** {lock_N = <>};
nGwiazda : Str -> N ; -- feminine, subject ending in "-zd"
nGwiazda = \s -> zd_st_End_VA2_CAL_F s ** {lock_N = <>} ;
nGwiazda : Str -> N; -- feminine, subject ending in "-zd"
nGwiazda = \s -> zd_st_End_VA2_CAL_F s ** {lock_N = <>};
nUlica : Str -> N ; -- feminine, subject ending mainly in "-c", but also in "-ż", "-rz", "-dz"
nUlica = \s -> hardened_End_F_2 s ** {lock_N = <>} ;
nUlica : Str -> N; -- feminine, subject ending mainly in "-c", but also in "-ż", "-rz", "-dz"
nUlica = \s -> hardened_End_F_2 s ** {lock_N = <>};
nOwca : Str -> N ; -- feminine, subject ending in "-c"
nOwca = \x -> c_End_FleetingIEplus_F x ** {lock_N = <>} ;
nOwca : Str -> N; -- feminine, subject ending in "-c"
nOwca = \x -> c_End_FleetingIEplus_F x ** {lock_N = <>};
-------- Patterns for neuter nouns ----------
nDanie : Str -> N ; -- neuter, subject ending in "-ni"
nDanie = \s -> ci_ni_week_End_CA_N s ** {lock_N = <>} ;
nDanie : Str -> N; -- neuter, subject ending in "-ni"
nDanie = \s -> ci_ni_week_End_CA_N s ** {lock_N = <>};
nSerce : Str -> N ; -- neuter, subject ending in a hardened consonant "-c", "-rz"
nSerce = \s -> hardened_End_N s ** {lock_N = <>} ;
nSerce : Str -> N; -- neuter, subject ending in a hardened consonant "-c", "-rz"
nSerce = \s -> hardened_End_N s ** {lock_N = <>};
nNasienie : Str -> N ; -- neuter, subject ending in "-ni" (only for "nasienie")
nNasienie = \x -> ni_End_VA2_N x ** {lock_N = <>} ;
nNasienie : Str -> N; -- neuter, subject ending in "-ni" (only for "nasienie")
nNasienie = \x -> ni_End_VA2_N x ** {lock_N = <>};
nMorze : Str -> N ; -- neuter, subject ending in "-rz", "-ż"
nMorze = \x -> rz_zx_End_VA1_N x ** {lock_N = <>} ;
nMorze : Str -> N; -- neuter, subject ending in "-rz", "-ż"
nMorze = \x -> rz_zx_End_VA1_N x ** {lock_N = <>};
nImie : Str -> N ; -- neuter, subject ending in "-ę"
nImie = \x -> ex_End_VA2_N x ** {lock_N = <>} ;
nImie : Str -> N; -- neuter, subject ending in "-ę"
nImie = \x -> ex_End_VA2_N x ** {lock_N = <>};
nCiele : Str -> N ; -- neuter, subject ending in "-ę"
nCiele = \s -> ex_End_VA3_N s ** {lock_N = <>} ;
nCiele : Str -> N; -- neuter, subject ending in "-ę"
nCiele = \s -> ex_End_VA3_N s ** {lock_N = <>};
nUdo : Str -> N ; -- neuter, subject ending in hard consonant + "o"
nUdo = \s -> hard_End_CAL_N s ** {lock_N = <>} ;
nUdo : Str -> N; -- neuter, subject ending in hard consonant + "o"
nUdo = \s -> hard_End_CAL_N s ** {lock_N = <>};
nPiwo : Str -> N ; -- neuter, subject ending in a hard consonant + "o"
nPiwo = \s -> hard_End_CL_N s ** {lock_N = <>} ;
nPiwo : Str -> N; -- neuter, subject ending in a hard consonant + "o"
nPiwo = \s -> hard_End_CL_N s ** {lock_N = <>};
nZero : Str -> N ; -- neuter, subject ending in "-r"
nZero = \s -> r_End_CA_N s ** {lock_N = <>} ;
nZero : Str -> N; -- neuter, subject ending in "-r"
nZero = \s -> r_End_CA_N s ** {lock_N = <>};
nNiebo : Str -> N ; -- neuter, declension for "niebo"
nNiebo = \x -> niebo_Unregulary_N x ** {lock_N = <>} ;
nNiebo : Str -> N; -- neuter, declension for "niebo"
nNiebo = \x -> niebo_Unregulary_N x ** {lock_N = <>};
nTlo : Str -> N ; -- neuter, subject ending in "-ło"
nTlo = \s -> lx_End_CA_FleetingEplus_N s ** {lock_N = <>} ;
nTlo : Str -> N; -- neuter, subject ending in "-ło"
nTlo = \s -> lx_End_CA_FleetingEplus_N s ** {lock_N = <>};
nZebro : Str -> N ; -- neuter, subject ending in "-r"
nZebro = \s -> hard_End_CA_FleetingEplus_N s ** {lock_N = <>} ;
nZebro : Str -> N; -- neuter, subject ending in "-r"
nZebro = \s -> hard_End_CA_FleetingEplus_N s ** {lock_N = <>};
nOkno : Str -> N ; -- neuter, subject ending in "-n"
nOkno = \s -> n_End_CL_FleetingIEplus_N s ** {lock_N = <>} ;
nOkno : Str -> N; -- neuter, subject ending in "-n"
nOkno = \s -> n_End_CL_FleetingIEplus_N s ** {lock_N = <>};
nGniazdo : Str -> N ; -- neuter, subject ending in "-zd", "-st"
nGniazdo = \s -> hard_End_VA_CAL_N s ** {lock_N = <>} ;
nGniazdo : Str -> N; -- neuter, subject ending in "-zd", "-st"
nGniazdo = \s -> hard_End_VA_CAL_N s ** {lock_N = <>};
nWojsko : Str -> N ; -- neuter, subject ending in "-k"
nWojsko = \s -> k_End_CL_N s ** {lock_N = <>} ;
nWojsko : Str -> N; -- neuter, subject ending in "-k"
nWojsko = \s -> k_End_CL_N s ** {lock_N = <>};
nJajo : Str -> N ; -- neuter, subject ending in "-j"
nJajo = \s -> j_End_N s ** {lock_N = <>} ;
nJajo : Str -> N; -- neuter, subject ending in "-j"
nJajo = \s -> j_End_N s ** {lock_N = <>};
nJablko : Str -> N ; -- neuter, subject ending in "-k"
nJablko = \s -> k_End_CL_FleetingEplus_N s ** {lock_N = <>} ;
nJablko : Str -> N; -- neuter, subject ending in "-k"
nJablko = \s -> k_End_CL_FleetingEplus_N s ** {lock_N = <>};
nStudio : Str -> N ; -- neuter, subject ending in "-n"
nStudio = \s -> o_End_N s ** {lock_N = <>} ;
nStudio : Str -> N; -- neuter, subject ending in "-n"
nStudio = \s -> o_End_N s ** {lock_N = <>};
nDziecko : Str -> N ; -- neuter, subject ending in "-n"
nDziecko = \s -> k_End_CAL_N s ** {lock_N = <>} ;
nDziecko : Str -> N; -- neuter, subject ending in "-n"
nDziecko = \s -> k_End_CAL_N s ** {lock_N = <>};
nUcho : Str -> N ; -- neuter, subject ending in "-ch"
nUcho = \x -> ch_End_Unregulary_CA_N x ** {lock_N = <>} ;
nUcho : Str -> N; -- neuter, subject ending in "-ch"
nUcho = \x -> ch_End_Unregulary_CA_N x ** {lock_N = <>};
nOko : Str -> N ; -- neuter, subject ending in "-k"
nOko = \x -> k_End_Unregulary_CAL_N x ** {lock_N = <>} ;
nOko : Str -> N; -- neuter, subject ending in "-k"
nOko = \x -> k_End_Unregulary_CAL_N x ** {lock_N = <>};
---- Patterns for personal masculine nouns ------
nFacet : Str -> N ; -- masculine personal, subject ending in a hard consonant "-t", -"n", nom pl "-i"
nFacet = \s -> hard_End_CAL_MP_1 s ** {lock_N = <>} ;
nFacet : Str -> N; -- masculine personal, subject ending in a hard consonant "-t", -"n", nom pl "-i"
nFacet = \s -> hard_End_CAL_MP_1 s ** {lock_N = <>};
nArab : Str -> N ; -- masculine personal, subject ending in a hard consonant "-t", -"n", nom pl "-y"
nArab = \s -> hard_End_CAL_MP_2 s ** {lock_N = <>} ;
nArab : Str -> N; -- masculine personal, subject ending in a hard consonant "-t", -"n", nom pl "-y"
nArab = \s -> hard_End_CAL_MP_2 s ** {lock_N = <>};
nPrzyjaciel : Str -> N ; -- masculine personal, subject ending in a hard consonant "-l"
nPrzyjaciel = \s -> przyjaciel_VA1_VA2_CA_MP s ** {lock_N = <>} ;
nPrzyjaciel : Str -> N; -- masculine personal, subject ending in a hard consonant "-l"
nPrzyjaciel = \s -> przyjaciel_VA1_VA2_CA_MP s ** {lock_N = <>};
nKowal : Str -> N ; -- masculine personal, subject ending in a hard consonant "-l"
nKowal = \s -> l_End_MP s ** {lock_N = <>} ;
nKowal : Str -> N; -- masculine personal, subject ending in a hard consonant "-l"
nKowal = \s -> l_End_MP s ** {lock_N = <>};
nLekarz : Str -> N ; -- masculine personal ending in -rz, -ż, -cz, -sz (piekarz, lekarz, papież, tłumacz, piwosz)
nLekarz = \s -> hardened_End_MP s ** {lock_N = <>} ;
nLekarz : Str -> N; -- masculine personal ending in -rz, -ż, -cz, -sz (piekarz, lekarz, papież, tłumacz, piwosz)
nLekarz = \s -> hardened_End_MP s ** {lock_N = <>};
nKrol : Str -> N ; -- masculine personal, subject ending in "-ul"
nKrol = \s -> ul_End_MP s ** {lock_N = <>} ;
nKrol : Str -> N; -- masculine personal, subject ending in "-ul"
nKrol = \s -> ul_End_MP s ** {lock_N = <>};
nMaz : Str -> N ; -- masculine personal
nMaz = \s -> maz_MP s ** {lock_N = <>} ;
nMaz : Str -> N; -- masculine personal
nMaz = \s -> maz_MP s ** {lock_N = <>};
nWrog : Str -> N ; -- masculine personal, subject ending in "-g" ; only for "wróg"
nWrog = \s -> wrog_VA1_CL_MP s ** {lock_N = <>} ;
nWrog : Str -> N; -- masculine personal, subject ending in "-g"; only for "wróg"
nWrog = \s -> wrog_VA1_CL_MP s ** {lock_N = <>};
-- nCzlowiek : Str -> N ; -- masculine personal
-- nCzlowiek = \s -> ul_End_MP s ** {lock_N = <>} ;
-- nCzlowiek : Str -> N; -- masculine personal
-- nCzlowiek = \s -> ul_End_MP s ** {lock_N = <>};
nKsiadz : Str -> N ; -- masculine personal
nKsiadz = \s -> ksiadz_VA3_CA_MP s ** {lock_N = <>} ;
nKsiadz : Str -> N; -- masculine personal
nKsiadz = \s -> ksiadz_VA3_CA_MP s ** {lock_N = <>};
nOjciec : Str -> N ; -- masculine personal for "ojciec"
nOjciec = \s -> ciec_End_CA_FleetingIEminus_MP s ** {lock_N = <>} ;
nOjciec : Str -> N; -- masculine personal for "ojciec"
nOjciec = \s -> ciec_End_CA_FleetingIEminus_MP s ** {lock_N = <>};
nBrat : Str -> N ; -- masculine personal
nBrat = \s -> hard_End_CAL_MP s ** {lock_N = <>} ;
nBrat : Str -> N; -- masculine personal
nBrat = \s -> hard_End_CAL_MP s ** {lock_N = <>};
nBog : Str -> N ; -- masculine personal
nBog = \s -> bog_VA1_CAL_MP s ** {lock_N = <>} ;
nBog : Str -> N; -- masculine personal
nBog = \s -> bog_VA1_CAL_MP s ** {lock_N = <>};
nChlopiec : Str -> N ; -- masculine personal
nChlopiec = \s -> iec_End_CA_FleetingIEminus_MP s ** {lock_N = <>} ;
nChlopiec : Str -> N; -- masculine personal
nChlopiec = \s -> iec_End_CA_FleetingIEminus_MP s ** {lock_N = <>};
nMezczyzna : Str -> N ; -- masculine personal
nMezczyzna = \s -> zna_End_CAL_MP s ** {lock_N = <>} ;
nMezczyzna : Str -> N; -- masculine personal
nMezczyzna = \s -> zna_End_CAL_MP s ** {lock_N = <>};
------------------- Patterns for animate masculine nouns -------
nKon : Str -> N ; -- masculine animate, for "koń"
nKon = \s -> kon_CAL_MA s ** {lock_N = <>} ;
nKon : Str -> N; -- masculine animate, for "koń"
nKon = \s -> kon_CAL_MA s ** {lock_N = <>};
nWaz : Str -> N ; -- masculine animate, for "wąż"
nWaz = \s -> waz_VA3_MA s ** {lock_N = <>} ;
nWaz : Str -> N; -- masculine animate, for "wąż"
nWaz = \s -> waz_VA3_MA s ** {lock_N = <>};
nPtak : Str -> N ; -- masculine animate, subject ending in "-k"
nPtak = \s -> k_End_CL_MA s ** {lock_N = <>} ;
nPtak : Str -> N; -- masculine animate, subject ending in "-k"
nPtak = \s -> k_End_CL_MA s ** {lock_N = <>};
nKot : Str -> N ; -- masculine animate, for "kot"
nKot = \s -> kot_CAL_MA s ** {lock_N = <>} ;
nKot : Str -> N; -- masculine animate, for "kot"
nKot = \s -> kot_CAL_MA s ** {lock_N = <>};
nPies : Str -> N ; -- masculine animate, for "pies"
nPies = \s -> pies_CL_FleetingIEminus_MA s ** {lock_N = <>} ;
nPies : Str -> N; -- masculine animate, for "pies"
nPies = \s -> pies_CL_FleetingIEminus_MA s ** {lock_N = <>};
------------------ Patterns for inanimate masculine nouns -----
nBat : Str -> N ; -- masculine inanimate, subject ending in a vowel + hard consonant
nBat = \s -> vowel_hard_CAL_MI s ** {lock_N = <>} ;
nBat : Str -> N; -- masculine inanimate, subject ending in a vowel + hard consonant
nBat = \s -> vowel_hard_CAL_MI s ** {lock_N = <>};
nChleb : Str -> N ; -- masculine inanimate, subject ending in a vowel + hard consonant
nChleb = \s -> vowel_hard_CL_MI s ** {lock_N = <>} ;
nChleb : Str -> N; -- masculine inanimate, subject ending in a vowel + hard consonant
nChleb = \s -> vowel_hard_CL_MI s ** {lock_N = <>};
nSer : Str -> N ; -- masculine inanimate, subject ending in "-r"
nSer = \s -> r_End_CA_MI s ** {lock_N = <>} ;
nSer : Str -> N; -- masculine inanimate, subject ending in "-r"
nSer = \s -> r_End_CA_MI s ** {lock_N = <>};
nZab : Str -> N ; -- masculine inanimate, subject ending in "-ąb"
nZab = \s -> ab_End_VA3_CL_MI s ** {lock_N = <>} ;
nZab : Str -> N; -- masculine inanimate, subject ending in "-ąb"
nZab = \s -> ab_End_VA3_CL_MI s ** {lock_N = <>};
nKosciol : Str -> N ; -- masculine inanimate, for "kosciół"
nKosciol = \s -> kosciol_VA1_VA2_CA_MI s ** {lock_N = <>} ;
nKosciol : Str -> N; -- masculine inanimate, for "kosciół"
nKosciol = \s -> kosciol_VA1_VA2_CA_MI s ** {lock_N = <>};
nCien : Str -> N ; -- masculine inanimate, subject ending in a week consonant
nCien = \s -> week_End_CAL_MI s ** {lock_N = <>} ;
nCien : Str -> N; -- masculine inanimate, subject ending in a week consonant
nCien = \s -> week_End_CAL_MI s ** {lock_N = <>};
nPien : Str -> N ; -- masculine inanimate, subject ending in a week consonant
nPien = \s -> week_End_CAL_FleetingIEminus_MI s ** {lock_N = <>} ;
nPien : Str -> N; -- masculine inanimate, subject ending in a week consonant
nPien = \s -> week_End_CAL_FleetingIEminus_MI s ** {lock_N = <>};
nLisc : Str -> N ; -- masculine inanimate, subject ending in a vowel + hard consonant
nLisc = \s -> lisc_CAL_MI s ** {lock_N = <>} ;
nLisc : Str -> N; -- masculine inanimate, subject ending in a vowel + hard consonant
nLisc = \s -> lisc_CAL_MI s ** {lock_N = <>};
nKoc : Str -> N ; -- masculine inanimate, subject ending in a hardened consonant
nKoc = \s -> hardened_End_MI_1 s ** {lock_N = <>} ;
nKoc : Str -> N; -- masculine inanimate, subject ending in a hardened consonant
nKoc = \s -> hardened_End_MI_1 s ** {lock_N = <>};
nWiersz : Str -> N ; -- masculine inanimate, subject ending in a hardened consonant
nWiersz = \s -> hardened_End_MI_2 s ** {lock_N = <>} ;
nWiersz : Str -> N; -- masculine inanimate, subject ending in a hardened consonant
nWiersz = \s -> hardened_End_MI_2 s ** {lock_N = <>};
nDzien : Str -> N ; -- masculine inanimate, for "dzień"
nDzien = \s -> dzien_MI s ** {lock_N = <>} ;
nDzien : Str -> N; -- masculine inanimate, for "dzień"
nDzien = \s -> dzien_MI s ** {lock_N = <>};
nKajak : Str -> N ; -- masculine inanimate, subject ending in -g or -k
nKajak = \s -> g_k_End_CL_MI_1 s ** {lock_N = <>} ;
nKajak : Str -> N; -- masculine inanimate, subject ending in -g or -k
nKajak = \s -> g_k_End_CL_MI_1 s ** {lock_N = <>};
nMlotek : Str -> N ; -- masculine inanimate, subject ending in -ek
nMlotek = \s -> k_End_CL_FleetingEminus_MI s ** {lock_N = <>} ;
nMlotek : Str -> N; -- masculine inanimate, subject ending in -ek
nMlotek = \s -> k_End_CL_FleetingEminus_MI s ** {lock_N = <>};
nMiech : Str -> N ; -- masculine inanimate, subject ending in -ch
nMiech = \s -> ch_End_MI s ** {lock_N = <>} ;
nMiech : Str -> N; -- masculine inanimate, subject ending in -ch
nMiech = \s -> ch_End_MI s ** {lock_N = <>};
nSad : Str -> N ; -- masculine inanimate, subject ending in a hard consonant
nSad = \s -> hard_End_CAL_MI s ** {lock_N = <>} ;
nSad : Str -> N; -- masculine inanimate, subject ending in a hard consonant
nSad = \s -> hard_End_CAL_MI s ** {lock_N = <>};
nDym : Str -> N ; -- masculine inanimate, subject ending in a hard consonant
nDym = \s -> hard_End_CL_MI s ** {lock_N = <>} ;
nDym : Str -> N; -- masculine inanimate, subject ending in a hard consonant
nDym = \s -> hard_End_CL_MI s ** {lock_N = <>};
nWal : Str -> N ; -- masculine inanimate, subject ending in a vowel + hard consonant
nWal = \s -> hard_End_CA_MI s ** {lock_N = <>} ;
nWal : Str -> N; -- masculine inanimate, subject ending in a vowel + hard consonant
nWal = \s -> hard_End_CA_MI s ** {lock_N = <>};
nDol : Str -> N ; -- masculine inanimate, subject ending in a vowel + hard consonant
nDol = \s -> hard_End_VA1_CA_MI s ** {lock_N = <>} ;
nDol : Str -> N; -- masculine inanimate, subject ending in a vowel + hard consonant
nDol = \s -> hard_End_VA1_CA_MI s ** {lock_N = <>};
nOgrod : Str -> N ; -- masculine inanimate, subject ending in a vowel + hard consonant
nOgrod = \s -> hard_End_VA1_CAL_MI s ** {lock_N = <>} ;
nOgrod : Str -> N; -- masculine inanimate, subject ending in a vowel + hard consonant
nOgrod = \s -> hard_End_VA1_CAL_MI s ** {lock_N = <>};
nKwiat : Str -> N ; -- masculine inanimate, subject ending in a vowel + hard consonant
nKwiat = \s -> hard_End_VA2_CAL_MI s ** {lock_N = <>} ;
nKwiat : Str -> N; -- masculine inanimate, subject ending in a vowel + hard consonant
nKwiat = \s -> hard_End_VA2_CAL_MI s ** {lock_N = <>};
nLas : Str -> N ; -- masculine inanimate, subject ending in a vowel + hard consonant
nLas = \s -> hard_End_VA2_CL_MI s ** {lock_N = <>} ;
nLas : Str -> N; -- masculine inanimate, subject ending in a vowel + hard consonant
nLas = \s -> hard_End_VA2_CL_MI s ** {lock_N = <>};
nWiatr : Str -> N ; -- masculine inanimate, subject ending in a vowel + hard consonant
nWiatr = \s -> wiatr_VA2_CA_MI s ** {lock_N = <>} ;
nWiatr : Str -> N; -- masculine inanimate, subject ending in a vowel + hard consonant
nWiatr = \s -> wiatr_VA2_CA_MI s ** {lock_N = <>};
nPopiol : Str -> N ; -- masculine inanimate, subject ending in a vowel + hard consonant
nPopiol = \s -> popiol_VA2_CA_MI s ** {lock_N = <>} ;
nPopiol : Str -> N; -- masculine inanimate, subject ending in a vowel + hard consonant
nPopiol = \s -> popiol_VA2_CA_MI s ** {lock_N = <>};
nPokoj : Str -> N ; -- masculine inanimate, subject ending in -ój
nPokoj = \s -> onlySgNoun s ** {lock_N = <>} ;
nPokoj : Str -> N; -- masculine inanimate, subject ending in -ój
nPokoj = \s -> onlySgNoun s ** {lock_N = <>};
nGaj : Str -> N ; -- masculine inanimate, subject ending in a vowel + hard consonant j
nGaj = \s -> vowel_j_or_handened_End_MI s ** {lock_N = <>} ;
nGaj : Str -> N; -- masculine inanimate, subject ending in a vowel + hard consonant j
nGaj = \s -> vowel_j_or_handened_End_MI s ** {lock_N = <>};
nBrzeg : Str -> N ; -- masculine inanimate, subject ending in -g or -k
nBrzeg = \s -> g_k_End_CL_MI_2 s ** {lock_N = <>} ;
nBrzeg : Str -> N; -- masculine inanimate, subject ending in -g or -k
nBrzeg = \s -> g_k_End_CL_MI_2 s ** {lock_N = <>};
nRok : Str -> Str -> N ; -- masculine inanimate for "rok", form in pl irregular
nRok = \s, t -> rok_UnregularyPl_CL_MI s t ** {lock_N = <>} ;
nRok : Str -> Str -> N; -- masculine inanimate for "rok", form in pl irregular
nRok = \s, t -> rok_UnregularyPl_CL_MI s t ** {lock_N = <>};
nProg : Str -> N ; -- masculine inanimate, subject ending in -óg
nProg = \s -> ug_End_VA1_CL_MI s ** {lock_N = <>} ;
nProg : Str -> N; -- masculine inanimate, subject ending in -óg
nProg = \s -> ug_End_VA1_CL_MI s ** {lock_N = <>};
nStatek : Str -> N ; -- masculine inanimate, subject ending in -ek
nStatek = \s -> k_End_CL_FleetingEmins_MI s ** {lock_N = <>} ;
nStatek : Str -> N; -- masculine inanimate, subject ending in -ek
nStatek = \s -> k_End_CL_FleetingEmins_MI s ** {lock_N = <>};
nDom : Str -> N ; -- masculine inanimate, subject ending in -ch and for dom
nDom = \s -> ch_End_dom_MI s ** {lock_N = <>} ;
nDom : Str -> N; -- masculine inanimate, subject ending in -ch and for dom
nDom = \s -> ch_End_dom_MI s ** {lock_N = <>};
-- Nominative, Genetive, Dative, Accusative, Instrumental, Locative and Vocative ;
-- Nominative, Genetive, Dative, Accusative, Instrumental, Locative and Vocative;
-- corresponding seven plural forms and the gender.
mkN : (nomSg, genSg, datSg, accSg, instrSg, locSg, vocSg,
nomPl, genPl, datPl, accPl, instrPl, locPl, vocPl: Str) -> Gender -> N ;
nomPl, genPl, datPl, accPl, instrPl, locPl, vocPl: Str) -> Gender -> N;
mkN = \nomSg, genSg, datSg, accSg, instrSg, locSg, vocSg,
nomPl, genPl, datPl, accPl, instrPl, locPl, vocPl, g ->
{
s = table {
SF Sg Nom => nomSg ;
SF Sg Gen => genSg ;
SF Sg Dat => datSg ;
SF Sg Acc => accSg ;
SF Sg Instr => instrSg ;
SF Sg Loc => locSg ;
SF Sg VocP => vocSg ;
SF Pl Nom => nomPl ;
SF Pl Gen => genPl ;
SF Pl Dat => datPl ;
SF Pl Acc => accPl ;
SF Pl Instr => instrPl ;
SF Pl Loc => locPl ;
SF Sg Nom => nomSg;
SF Sg Gen => genSg;
SF Sg Dat => datSg;
SF Sg Acc => accSg;
SF Sg Instr => instrSg;
SF Sg Loc => locSg;
SF Sg VocP => vocSg;
SF Pl Nom => nomPl;
SF Pl Gen => genPl;
SF Pl Dat => datPl;
SF Pl Acc => accPl;
SF Pl Instr => instrPl;
SF Pl Loc => locPl;
SF Pl VocP => vocPl
} ;
g = g ;
} ** {lock_N = <> } ;
};
g = g;
} ** {lock_N = <> } ;
-- Nouns used as functions need a preposition. The most common is with Genitive.
mkN2 : N -> N2 ;
mkN2 n = mkFun n nullPrep ;
mkN2 : N -> N2 ;
mkN2 n = mkFun n nullPrep ;
mkFun : N -> Prep -> N2 ;
mkFun f p = { s = f.s ; g = f.g ; c = { c = p.c ; s=p.s} ; lock_N2=<> } ;
mkFun : N -> Prep -> N2;
mkFun f p = { s = f.s; g = f.g; c = { c = p.c; s=p.s}; lock_N2=<> } ;
-- The commonest cases are functions with Genitive.
nullPrep : Prep = {s = [] ; c= GenNoPrep ; lock_Prep=<>} ;
nullPrep : Prep = {s = []; c= GenNoPrep; lock_Prep=<>};
mkN3 : N -> Prep -> Prep -> N3 ;
mkN3 f p r = { s = f.s ; g = f.g ; c = {s=p.s ; c=p.c} ; c2 = {s=r.s ; c=r.c} ; lock_N3=<>} ;
mkN3 : N -> Prep -> Prep -> N3;
mkN3 f p r = { s = f.s; g = f.g; c = {s=p.s; c=p.c} ; c2 = {s=r.s; c=r.c}; lock_N3=<>};
--6 Preposition
-- A preposition is formed from a string and a case.
mkPrep : Str -> Case -> Prep ;
mkPrep s c = mkCompl s c ** {lock_Prep = <>} ;
mkPrep : Str -> Case -> Prep;
mkPrep s c = mkCompl s c ** {lock_Prep = <>};
-- Often just a case with the empty string is enough.
-- the directly following noun without a preposition
genPrep : Prep ;
genPrep = mkPrep [] genitive ;
genPrep : Prep;
genPrep = mkPrep [] genitive;
datPrep : Prep ;
datPrep = mkPrep [] dative ;
datPrep : Prep;
datPrep = mkPrep [] dative;
accPrep : Prep ;
accPrep = mkPrep [] accusative ;
accPrep : Prep;
accPrep = mkPrep [] accusative;
instrPrep : Prep ;
instrPrep = mkPrep [] instrumental ;
instrPrep : Prep;
instrPrep = mkPrep [] instrumental;
-- A great many of common prepositions are always with the genitive.
bez_Prep : Prep ; --without
bez_Prep = mkPrep "bez" genitive ;
bez_Prep : Prep; --without
bez_Prep = mkPrep "bez" genitive;
dla_Prep : Prep ; --for
dla_Prep = mkPrep "dla" genitive ;
dla_Prep : Prep; --for
dla_Prep = mkPrep "dla" genitive;
do_Prep : Prep ; --to
do_Prep = mkPrep "do" genitive ;
do_Prep : Prep; --to
do_Prep = mkPrep "do" genitive;
dookola_Prep : Prep ; --(a)round
dookola_Prep = mkPrep "dookoła" genitive ;
dookola_Prep : Prep; --(a)round
dookola_Prep = mkPrep "dookoła" genitive;
kolo_Prep : Prep ; --near
kolo_Prep = mkPrep "koło" genitive ;
kolo_Prep : Prep; --near
kolo_Prep = mkPrep "koło" genitive;
obok_Prep : Prep ; --beside, next to
obok_Prep = mkPrep "obok" genitive ;
obok_Prep : Prep; --beside, next to
obok_Prep = mkPrep "obok" genitive;
od_Prep : Prep ; --from
od_Prep = mkPrep "od" genitive ;
od_Prep : Prep; --from
od_Prep = mkPrep "od" genitive;
oprocz_Prep : Prep ; --out of
oprocz_Prep = mkPrep "oprócz" genitive ;
oprocz_Prep : Prep; --out of
oprocz_Prep = mkPrep "oprócz" genitive;
podczas_Prep : Prep ; --during
podczas_Prep = mkPrep "podczas" genitive ;
podczas_Prep : Prep; --during
podczas_Prep = mkPrep "podczas" genitive;
mimo_Prep : Prep ; -- despite
mimo_Prep = mkPrep "mimo" genitive ;
mimo_Prep : Prep; -- despite
mimo_Prep = mkPrep "mimo" genitive;
spod_Prep : Prep ; --under
spod_Prep = mkPrep "spod" genitive ;
spod_Prep : Prep; --under
spod_Prep = mkPrep "spod" genitive;
u_Prep : Prep ; --by, with (I was by Peter last sunday.)
u_Prep = mkPrep "u" genitive ;
u_Prep : Prep; --by, with (I was by Peter last sunday.)
u_Prep = mkPrep "u" genitive;
wzdluz_Prep : Prep ; --along
wzdluz_Prep = mkPrep "wzdłuż" genitive ;
wzdluz_Prep : Prep; --along
wzdluz_Prep = mkPrep "wzdłuż" genitive;
z_Prep : Prep ; --from (I come from Italy.), of/ from (The ring is made of silver.)
z_Prep = mkPrep "z" genitive ;
z_Prep : Prep; --from (I come from Italy.), of/ from (The ring is made of silver.)
z_Prep = mkPrep "z" genitive;
zamiast_Prep : Prep ; --instead of
zamiast_Prep = mkPrep "zamiast" genitive ;
zamiast_Prep : Prep; --instead of
zamiast_Prep = mkPrep "zamiast" genitive;
znad_Prep : Prep ; --over, above
znad_Prep = mkPrep "znad" genitive ;
znad_Prep : Prep; --over, above
znad_Prep = mkPrep "znad" genitive;
zza_Prep : Prep ; --behind
zza_Prep = mkPrep "zza" genitive ;
zza_Prep : Prep; --behind
zza_Prep = mkPrep "zza" genitive;
-- Prepositions always with the dative.
dzieki_Prep : Prep ; -- thanks for
dzieki_Prep = mkPrep "dzięki" dative ;
dzieki_Prep : Prep; -- thanks for
dzieki_Prep = mkPrep "dzięki" dative;
przeciw_Prep : Prep ; -- against
przeciw_Prep = mkPrep "przeciw" dative ;
przeciw_Prep : Prep; -- against
przeciw_Prep = mkPrep "przeciw" dative;
}
};

View File

@@ -16,16 +16,16 @@ concrete PhrasePol of Phrase = CatPol ** open Prelude, ResPol, VerbMorphoPol in
UttIP ip = {s = ip.nom};
UttIAdv iadv = iadv ;
UttNP np = {s = np.nom};
UttVP vp = { -- I assume positive polarization to avoid variants
s = vp.prefix !Pos !MascAniSg ++
UttVP vp = { -- I assume the positive polarization to avoid variants
s = vp.prefix ++
(infinitive_form vp.verb vp.imienne Pos) ++
vp.sufix !Pos !MascAniSg ++ vp.postfix !Pos !MascAniSg
vp.sufix !Pos !MascAniSg
};
UttAdv adv = adv ;
UttCN n = {s = n.s ! Sg ! Nom} ;
UttCard n = {s = n.s ! Nom ! Neut} ;
UttAP ap = {s = ap.s ! AF NeutSg Nom} ; ---- gennum ? (AR)
UttCN n = {s = n.s ! Sg ! Nom};
UttAP ap = {s = ap.s ! AF MascPersSg Nom} ;
UttCard c = {s = c.s ! Nom ! Fem } ;
NoPConj = {s = []} ;
PConjConj conj = {s = conj.s2} ; ---

View File

@@ -19,7 +19,8 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
--4.2 Personal pronouns and their possessive forms
-- for "I", "my", "mine"
oper pronJa: Pron =
oper pronJa: Pron = pronJaFoo PNoGen;
oper pronJaFoo: PronGen -> Pron = \gender ->
{ nom = "ja";
voc = "ja";
dep = table {
@@ -27,7 +28,7 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
DatNoPrep => "mi";
DatPrep => "mnie";
(AccNoPrep|AccPrep) => "mnie";
(InstrNoPrep|InstrPrep) => "mną";
InstrC => "mną";
LocPrep => "mnie"
};
sp = table {
@@ -69,12 +70,13 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
};
n = Sg;
p = P1 ;
g = PNoGen
g = gender
};
-- for "you", "yours"
oper pronTy: Pron =
oper pronTy: Pron = pronTyFoo PNoGen;
oper pronTyFoo: PronGen -> Pron = \gender ->
{ sp = table {
AF (MascPersSg|MascAniSg|MascInaniSg) Nom => "twój";
AF (MascPersSg|MascAniSg|MascInaniSg) Gen => "twojego";
@@ -121,14 +123,53 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
DatPrep => "ci";
AccNoPrep => "cię";
AccPrep => "ciebie";
(InstrNoPrep|InstrPrep) => "tobą";
InstrC => "tobą";
LocPrep => "tobie"
};
n = Sg;
p = P2 ;
g = PNoGen
g = gender
};
-- for "you polite" (very idiomatic: pron you = 'sir') male version
oper pronPan: Pron =
{ nom = "pan" ;
voc = "panie" ;
dep = table {
GenNoPrep => "pana"; --"go"};
GenPrep => "pana";
DatNoPrep => "panu"; --"mu"};
DatPrep => "panu";
AccNoPrep => "pana"; --"go" };
AccPrep => "pana";
InstrC => "panem";
LocPrep => "panu"
};
sp = \\_ => "pana";
n = Sg;
p = P3 ;
g = PGen (Masc Personal)
};
-- for "you polite" (very idiomatic: pron you = 'madam') female version
oper pronPani: Pron =
{ nom = "pani" ;
voc = "pani" ;
dep = table {
GenNoPrep => "pani"; --"go"};
GenPrep => "pani";
DatNoPrep => "pani"; --"mu"};
DatPrep => "pani";
AccNoPrep => "panią"; --"go" };
AccPrep => "panią";
InstrC => "panią";
LocPrep => "pani"
};
sp = \\_ => "pani";
n = Sg;
p = P3 ;
g = PGen (Fem)
};
-- for "he", "his"
oper pronOn: Pron =
@@ -141,8 +182,7 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
DatPrep => "niemu";
AccNoPrep => "jego"; --"go" };
AccPrep => "niego";
InstrNoPrep => "nim";
InstrPrep => "nim";
InstrC => "nim";
LocPrep => "nim"
};
sp = \\_ => "jego";
@@ -160,11 +200,10 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
GenNoPrep => "jej";
GenPrep => "niej";
DatNoPrep => "jej";
DatPrep => "nią";
DatPrep => "niej";
AccNoPrep => "ją";
AccPrep => "nią";
InstrNoPrep => "nią";
InstrPrep => "nią";
InstrC => "nią";
LocPrep => "niej"
};
sp = \\_ => "jej";
@@ -185,8 +224,7 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
DatPrep => "niemu";
AccNoPrep => "je";
AccPrep => "nie";
InstrNoPrep => "nim";
InstrPrep => "nim";
InstrC => "nim";
LocPrep => "nim"
};
sp = \\_ => "jej";
@@ -204,7 +242,7 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
(GenNoPrep|GenPrep) => "nas";
(DatNoPrep|DatPrep) => "nam";
(AccNoPrep|AccPrep) => "nas";
(InstrNoPrep|InstrPrep) => "nami";
InstrC => "nami";
LocPrep => "nas"
};
sp = table {
@@ -258,7 +296,7 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
(GenNoPrep|GenPrep) => "was";
(DatNoPrep|DatPrep) => "wam";
(AccNoPrep|AccPrep) => "was";
(InstrNoPrep|InstrPrep) => "wami";
InstrC => "wami";
LocPrep => "was"
};
sp = table {
@@ -315,7 +353,7 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
DatPrep => "nim";
AccNoPrep => "ich";
AccPrep => "nich";
(InstrNoPrep|InstrPrep) => "nimi";
InstrC => "nimi";
LocPrep => "nich"
};
sp = \\_ => "ich";
@@ -336,7 +374,7 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
DatPrep => "nim";
AccNoPrep => "je";
AccPrep => "nie";
(InstrNoPrep|InstrPrep) => "nimi";
InstrC => "nimi";
LocPrep => "nich"
};
sp = \\_ => "ich";
@@ -355,7 +393,7 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
DatPrep => "nim";
AccNoPrep => "je";
AccPrep => "nie";
(InstrNoPrep|InstrPrep) => "nimi";
InstrC => "nimi";
LocPrep => "nich"
};
sp = \\_ => "ich";
@@ -372,7 +410,7 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
(GenNoPrep|GenPrep) NonPoss => "kogo";
(DatNoPrep|DatPrep) NonPoss => "komu";
(AccNoPrep|AccPrep) NonPoss => "kogo";
(InstrNoPrep|InstrPrep) NonPoss => "kim";
InstrC NonPoss => "kim";
LocPrep NonPoss => "kim";
PF VocP _ NonPoss => nonExist;
PF _ _ (Poss _ _) => nonExist -- exists in my opinion [asl] : czyje
@@ -391,7 +429,7 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
(GenNoPrep|GenPrep) NonPoss => "czego";
(DatNoPrep|DatPrep) NonPoss => "czemu";
(AccNoPrep|AccPrep) NonPoss => "co";
(InstrNoPrep|InstrPrep) NonPoss => "czym";
InstrC NonPoss => "czym";
LocPrep NonPoss => "czym";
PF VocP _ NonPoss => nonExist;
PF _ _ (Poss _ _) => nonExist
@@ -419,7 +457,7 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
(GenNoPrep|GenPrep) NonPoss => "kogokolwiek";
(DatNoPrep|DatPrep) NonPoss => "komukolwiek";
(AccNoPrep|AccPrep) NonPoss => "kogokolwiek";
(InstrNoPrep|InstrPrep) NonPoss => "kimkolwiek";
InstrC NonPoss => "kimkolwiek";
LocPrep NonPoss => "kimkolwiek";
PF VocP _ NonPoss => nonExist;
PF _ _ (Poss _ _) => nonExist
@@ -448,7 +486,7 @@ resource PronounMorphoPol = ResPol ** open Prelude, (Predef=Predef) in {
-- (GenNoPrep|GenPrep) NonPoss => "czegokolwiek";
-- (DatNoPrep|DatPrep) NonPoss => "czemukolwiek";
-- (AccNoPrep|AccPrep) NonPoss => "cokolwiek";
-- (InstrNoPrep|InstrPrep) NonPoss => "czymkolwiek";
-- InstrC NonPoss => "czymkolwiek";
-- LocPrep NonPoss => "czymkolwiek";
-- PF VocP _ NonPoss => nonExist;
-- PF _ _ (Poss _ _) => nonExist

View File

@@ -10,11 +10,12 @@ lin
-- QuestCl : Cl -> QCl ; -- does John walk
QuestCl cl = { s = \\p,a,t=> "czy" ++ cl.s !p !a !t };
-- QuestVP : IP -> VP -> QCl ; -- who walks
QuestVP ip vp = {
s = \\pol,anter,tense => ip.nom ++ vp.prefix !pol !ip.gn ++
s = \\pol,anter,tense => ip.nom ++ vp.prefix ++
((indicative_form vp.verb vp.imienne pol) !<tense, anter, ip.gn, ip.p>) ++
vp.sufix !pol !ip.gn ++ vp.postfix !pol !ip.gn;
vp.sufix !pol !ip.gn
};
-- QuestSlash : IP -> ClSlash -> QCl ; -- whom does John love
@@ -27,8 +28,8 @@ lin
-- QuestIComp : IComp -> NP -> QCl ; -- where is John
QuestIComp ic np = {
s = \\p,a,t =>
(imienne_form {si = \\_=>[]; sp = \\_=>[]; asp = Dual; refl = ""; ppart=\\_=>""} p !<t,a,np.gn,np.p>) ++ np.nom
s = \\p,a,t => ic.s ++
(imienne_form {si = \\_=>[]; sp = \\_=>[]; asp = Dual; refl = ""; pparti,ppartp=\\_=>""} p !<t,a,np.gn,np.p>) ++ np.nom
};
-- IdetCN : IDet -> CN -> IP ; -- which five songs
@@ -46,8 +47,8 @@ lin
voc = idet.s !VocP !(Masc Personal);
dep = \\cc => let c = extract_case! cc in
idet.s !c !(Masc Personal);
gn = cast_gennum! <Masc Personal, idet.n>;
p = P3
gn = (accom_gennum !<idet.a, Masc Personal, idet.n>);
p = P3
};
-- AdvIP : IP -> Adv -> IP ; -- who in Paris
@@ -61,20 +62,20 @@ lin
-- IdetQuant : IQuant -> Num -> IDet ; -- which (five)
IdetQuant iq n = {
s = \\c,g => iq.s! AF (cast_gennum! <g,n.n>) c;
s = \\c,g => iq.s! AF (cast_gennum!<g,n.n>) (accom_case!<n.a,c,g>) ++ n.s !c !g;
n = n.n;
a = NoA
a = n.a
};
-- PrepIP : Prep -> IP -> IAdv ; -- with whom
PrepIP prep ip = { s = prep.s ++ ip.dep !prep.c};
AdvIAdv i a = {s = i.s ++ a.s} ;
-- CompIAdv : IAdv -> IComp ; -- where (is it)
CompIAdv ia = ia;
-- CompIP : IP -> IComp ; -- who (is it)
CompIP ip = { s = ip.dep ! InstrNoPrep };
CompIP ip = { s = ip.dep ! InstrC };
AdvIAdv i a = ss (i.s ++ a.s) ;
}

View File

@@ -24,14 +24,14 @@ concrete RelativePol of Relative = CatPol ** open ResPol, VerbMorphoPol in {
s = \\gn => case rp.mgn of {
NoGenNum=>
\\pol, anter, tense =>
"," ++ rp.s !AF gn Nom ++ vp.prefix !pol !gn ++
"," ++ rp.s !AF gn Nom ++ vp.prefix ++
((indicative_form vp.verb vp.imienne pol) !<tense, anter, gn, P3>) ++
vp.sufix !pol !gn ++ vp.postfix !pol !gn;
vp.sufix !pol !gn;
JustGenNum x =>
\\pol, anter, tense =>
"," ++ rp.s !AF gn Nom ++ vp.prefix !pol !x ++
"," ++ rp.s !AF gn Nom ++ vp.prefix ++
((indicative_form vp.verb vp.imienne pol) !<tense, anter, x, P3>) ++
vp.sufix !pol !x ++ vp.postfix !pol !x
vp.sufix !pol !x
}
};
@@ -52,7 +52,7 @@ concrete RelativePol of Relative = CatPol ** open ResPol, VerbMorphoPol in {
AF gn Nom => p.s ++ rp.s!AF gn (extract_case!p.c) ++ n.nom;
AF gn VocP => p.s ++ rp.s!AF gn (extract_case!p.c) ++ n.voc;
AF gn c => p.s ++ rp.s!AF gn (extract_case!p.c) ++ n.dep!
(case c of { Gen => GenNoPrep; Dat => DatNoPrep; Instr => InstrNoPrep; Acc => AccNoPrep; _=>LocPrep })
(case c of { Gen => GenNoPrep; Dat => DatNoPrep; Instr => InstrC; Acc => AccNoPrep; _=>LocPrep })
};
mgn = JustGenNum n.gn
};

View File

@@ -30,7 +30,7 @@
----------------------- Parameter for nouns ----------------------------------
param
Gender = Masc Animacy | Fem | NeutGr | Neut ;
Gender = Masc Animacy | Fem | NeutGr | Neut | Plur ;
Animacy = Animate | Inanimate | Personal ;
Case = Nom | Gen | Dat | Acc | Instr | Loc | VocP ;
@@ -41,6 +41,7 @@
param SubstForm = SF Number Case ;
-- oper used in NounMorphoPol.gf
oper CommNoun = {s : SubstForm => Str; g : Gender};
@@ -84,37 +85,21 @@
sp : VFormM => Str;
refl : Str;
asp : Aspect;
ppart : AForm=>Str
ppartp : adj11table; --AForm=>Str;
pparti : adj11table --AForm=>Str
};
-- and on syntax level:
{- param
TenseP = Present | PastP | Future ;
PolarityP = PosP | DirNeg | InDirNeg; -- for the indirect object of negation
param VForm =
VInf Gender Number --byc zjedzonym / zjedzoną (?)
|VInd Gender Number Person TenseP Anteriority
|VImp Gender Number Person; --niech zostane zjedzony / zjedzona-}
oper VerbPhrase : Type = {
prefix, sufix, postfix : Polarity => GenNum => Str;
prefix : Str;
sufix : Polarity => GenNum => Str;
verb : Verb;
imienne : Bool;-- formed with 'to be' (she was nice, he is a man, etc.)
exp : Bool -- expanded
};
{- oper AccToGen : Complement -> Case = \c ->
case c.s of {
"" => case c.c of {Acc => Gen; _ => c.c };
_ => c.c
};-}
-- Anteriority is defined in ../common/ParamX.gf.
-- So it isn't needed to be defined here again.
oper VerbPhraseSlash : Type =
VerbPhrase ** { c : Complement; postfix : Polarity => GenNum => Str };
-- Anteriority = Simul | Anter ; -- predefined
--3 Adjectives
----------------------- Parameter for adjectives ----------------------------------
@@ -123,6 +108,19 @@
oper adj11forms : Type = { s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11 : Str };
oper empty11forms : adj11forms = { s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11 = "" };
-- this is because of the bug (undocumented feature) in GF. only two levels of nested records are possible, on the third level compiler throw a strange error about more than 6664 fields demanded. tables on second level are accepted, so adj11forms is translated into table and back.
param param11 = X1 | X2 | X3 | X4 | X5 | X6 | X7 | X8 | X9 | X10 | X11 ;
oper adj11table : Type = param11 => Str;
oper table2record : adj11table -> adj11forms = \a -> { s1 = a!X1;s2 = a!X2;s3 = a!X3;s4 = a!X4;s5 = a!X5;s6 = a!X6;s7 = a!X7;s8 = a!X8;s9 = a!X9;s10 = a!X10;s11 = a!X11 };
oper record2table : adj11forms -> adj11table = \a -> table { X1 => a.s1;X2 => a.s2;X3 => a.s3;X4 => a.s4;X5 => a.s5;X6 => a.s6;X7 => a.s7;X8 => a.s8;X9 => a.s9;X10 => a.s10;X11 => a.s11 };
oper Adj : Type = {
pos : adj11forms;
comp : adj11forms;
@@ -201,7 +199,7 @@
--6 Complement definition
param ComplCase = GenPrep | GenNoPrep | DatPrep | DatNoPrep |
AccPrep | AccNoPrep | InstrPrep | InstrNoPrep | LocPrep ;
AccPrep | AccNoPrep | InstrC | LocPrep ;
oper
Complement : Type = {s : Str; c : ComplCase} ;
@@ -210,14 +208,14 @@
mkCompl s c = {
s=s;
c = case s of {
"" => case c of { Gen => GenNoPrep; Dat => DatNoPrep; Instr => InstrNoPrep; _ => AccNoPrep };
_ => case c of { Gen => GenPrep; Dat => DatPrep; Acc => AccPrep; Instr => InstrPrep; _ => LocPrep }
"" => case c of { Gen => GenNoPrep; Dat => DatNoPrep; Instr => InstrC; _ => AccNoPrep };
_ => case c of { Gen => GenPrep; Dat => DatPrep; Acc => AccPrep; Instr => InstrC; _ => LocPrep }
}
};
extract_case = table {GenPrep => Gen; GenNoPrep => Gen; DatPrep => Dat;
DatNoPrep => Dat; AccPrep => Acc; AccNoPrep => Acc; InstrPrep => Instr;
InstrNoPrep => Instr; LocPrep => Loc};
DatNoPrep => Dat; AccPrep => Acc; AccNoPrep => Acc; InstrC => Instr;
LocPrep => Loc};
--7 Various types
-- possible problem: dzieci ,ktorych piecioro bawilo sie... / okna, ktorych piec stalo opartych o sciane...
@@ -237,6 +235,7 @@
<Fem, Sg> => FemSg;
<Neut, Sg> => NeutSg;
<NeutGr, Sg> => NeutSg;
<Plur, Sg> => OthersPl; --plurale tantum
<Masc Personal, Pl> => MascPersPl;
_ => OthersPl
};
@@ -260,21 +259,23 @@
Determiner : Type = { s,sp: Case => Gender => Str; n: Number; a: Accom};
oper
accom_case = table {
<DwaA, Nom, Masc Personal> => Gen;
<DwaA, _, NeutGr> => Gen;
<PiecA, Nom, Masc Personal> => Gen;
<PiecA, _, NeutGr> => Gen;
<PiecA, Nom|Acc, Masc (Animate|Inanimate)|Neut|Fem> => Gen;
<StoA, Nom, Masc Personal> => Gen;
<StoA, Nom|Acc, Masc (Animate|Inanimate)|Neut|Fem> => Gen;
<TysiacA, _, _> => Gen;
x => x.p2
accom_case : Accom * Case * Gender => Case =
table {
<DwaA, Nom|VocP, Masc Personal> => Gen;
<DwaA, _, NeutGr| Plur> => Gen;
<PiecA, Nom|VocP, Masc Personal> => Gen;
<PiecA, _, NeutGr| Plur> => Gen;
<PiecA, Nom|VocP|Acc, Masc (Animate|Inanimate)|Neut|Fem> => Gen;
<StoA, Nom|VocP, Masc Personal> => Gen;
<StoA, Acc, Masc Personal> => Acc;
<StoA, Nom|VocP|Acc, _> => Gen;
<TysiacA, _, _> => Gen;
x => x.p2
};
accom_gennum : Accom * Gender * Number => GenNum =
table {
<DwaA, Masc Personal | NeutGr, _> => NeutSg;
<DwaA, Masc Personal | NeutGr | Plur, _> => NeutSg;
<PiecA, _, _> => NeutSg;
<StoA, _, _> => NeutSg;
<TysiacA, _, _> => NeutSg;

View File

@@ -10,9 +10,9 @@ lin
-- PredVP : NP -> VP -> Cl ; -- John walks
PredVP np vp = {
s = \\pol,anter,tense =>
np.nom ++ vp.prefix !pol !np.gn ++
np.nom ++ vp.prefix ++
((indicative_form vp.verb vp.imienne pol) !<tense, anter, np.gn, np.p>) ++
vp.sufix !pol !np.gn ++ vp.postfix !pol !np.gn;
vp.sufix !pol !np.gn ;
};
-- UseCl : Temp -> Pol -> Cl -> S ;
@@ -40,11 +40,11 @@ lin
SlashVP np vps = {
s = \\pol,anter,tense => case vps.exp of {
True =>
np.nom ++ vps.prefix !pol !np.gn ++
np.nom ++ vps.prefix ++
((indicative_form vps.verb vps.imienne pol) !<tense, anter, np.gn, np.p>) ++
vps.sufix !pol !np.gn ++ vps.postfix !pol !np.gn;
False =>
vps.prefix !pol !np.gn ++
vps.prefix ++
((indicative_form vps.verb vps.imienne pol) !<tense, anter, np.gn, np.p>) ++
vps.sufix !pol !np.gn ++ vps.postfix !pol !np.gn ++ np.nom
};
@@ -67,9 +67,9 @@ lin
-- ImpVP : VP -> Imp ; -- love yourselves
ImpVP vp = {
s = \\pol,num => vp.prefix !pol !MascAniSg ++
s = \\pol,num => vp.prefix ++
(imperative_form vp.verb vp.imienne pol (cast_gennum!<Masc Personal, num>) P2) ++
vp.sufix !pol !MascAniSg ++ vp.postfix !pol !MascAniSg
vp.sufix !pol !MascAniSg
};
-- AdvS : Adv -> S -> S ; -- today, I will go home
@@ -79,16 +79,16 @@ lin
SlashPrep c p = { s=c.s; c=p };
-- EmbedS : S -> SC ; -- that she goes
EmbedS s = s;
EmbedS s = { s = [", że"] ++ s.s } ;
-- EmbedQS : QS -> SC ; -- who goes
EmbedQS s = s;
EmbedQS s = { s = "," ++ s.s } ;
-- EmbedVP : VP -> SC ; -- to go
EmbedVP vp = {
s = vp.prefix !Pos !MascPersSg ++
s = vp.prefix ++
(infinitive_form vp.verb vp.imienne Pos) ++
vp.sufix !Pos !MascPersSg ++ vp.postfix !Pos !MascPersSg
vp.sufix !Pos !MascPersSg
};
-- RelS : S -> RS -> S ; -- she sleeps, which is good
@@ -97,8 +97,8 @@ lin
-- PredSCVP : SC -> VP -> Cl ; -- that she goes is good
PredSCVP sc vp = {
s = \\pol,anter,tense =>
sc.s ++ vp.prefix !pol !NeutSg ++
sc.s ++ vp.prefix ++
((indicative_form vp.verb vp.imienne pol) !<tense, anter, NeutSg, P3>) ++
vp.sufix !pol !NeutSg ++ vp.postfix !pol !NeutSg;
vp.sufix !pol !NeutSg
};
}

View File

@@ -62,7 +62,7 @@ lin
many_Det = wieleDet;
more_CAdv = {s = "bardziej" ; pn,p = "niż"; sn="więcej"} ;
most_Predet = { s=wszystek; np={nom="większość"; voc="większości";
dep=table{AccPrep|AccNoPrep=>"większość"; InstrPrep|InstrNoPrep=>"większością"; _=>"większości"};
dep=table{AccPrep|AccNoPrep=>"większość"; InstrC=>"większością"; _=>"większości"};
p=P3; gn=FemSg}; adj=False };
much_Det = duzoDet;
must_VV = mkItVerb (mkMonoVerb "musieć" conj93 Imperfective);

View File

@@ -1,4 +1,4 @@
--# -path=.:../abstract:../common:../prelude
--# -path=.:../abstract:../common:../prelude
concrete SymbolPol of Symbol = CatPol ** open Prelude, ResPol, AdjectiveMorphoPol in {
@@ -34,7 +34,7 @@ lin
SymbS sy = sy ;
SymbNum sy = { s = \\_,_=>sy.s; a=NoA; n=Pl };
SymbNum sy = { s = \\_,_=>sy.s; a=StoA; n=Pl };
SymbOrd sy = { s = \\af => sy.s ++ (mkAtable (guess_model "-ty"))!af} ;
lincat

View File

@@ -18,7 +18,7 @@ resource VerbMorphoPol = ResPol ** open Prelude, CatPol, (Predef=Predef), (Adj=A
-- opers for the building of the whole paradigm of a verb
-- in all tenses
oper ConjCl : Type = Str -> { s:VFormM => Str; p:AForm=>Str };
oper ConjCl : Type = Str -> { s:VFormM => Str; p:adj11table };
oper conj1 : ConjCl =
\byc ->
@@ -247,14 +247,14 @@ resource VerbMorphoPol = ResPol ** open Prelude, CatPol, (Predef=Predef), (Adj=A
Str -> Str -> ConjCl;
oper mkRegItConjCl pytac pyta j jmy jcie m sz sg3 my cie ja l la lo li ly = {
s = mkVerbTable pytac pyta j jmy jcie m sz sg3 my cie ja l la lo li ly;
p = \\_=> "["++pytac ++ [": the participle form does not exist]"]
p = record2table { s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11 = "["++pytac ++ [": the participle form does not exist]"] };
};
oper mkRegConjCl : Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str ->
Str -> Str -> Str -> Str -> ConjCl;
oper mkRegConjCl pytac pyta j jmy jcie m sz sg3 my cie ja l la lo li ly n npl = {
s = mkVerbTable pytac pyta j jmy jcie m sz sg3 my cie ja l la lo li ly;
p = mkAtable (Adj.model4 (pyta+n+"y") (pyta+npl+"i"))
p = record2table (Adj.model4 (pyta+n+"y") (pyta+npl+"i"))
};
oper mkVerbTable : Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str ->
@@ -320,7 +320,8 @@ resource VerbMorphoPol = ResPol ** open Prelude, CatPol, (Predef=Predef), (Adj=A
sp = v.sp;
refl = "się";
asp = v.asp;
ppart = v.ppart
ppartp = v.ppartp;
pparti = v.pparti
};
-- intransitive verbs
@@ -331,7 +332,8 @@ resource VerbMorphoPol = ResPol ** open Prelude, CatPol, (Predef=Predef), (Adj=A
sp = v.sp;
refl = v.refl;
asp = v.asp;
ppart = \\_=> "["++v.si!VInfM ++ [": the participle form does not exist]"]
ppartp = record2table { s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11 = "["++v.si!VInfM ++ [": the participle form does not exist]"]};
pparti = record2table { s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11 = "["++v.si!VInfM ++ [": the participle form does not exist]"]}
};
-- monoaspective verbs
@@ -342,18 +344,20 @@ resource VerbMorphoPol = ResPol ** open Prelude, CatPol, (Predef=Predef), (Adj=A
sp = tmp.s;
refl = "";
asp = a;
ppart= tmp.p
ppartp = tmp.p;
pparti = tmp.p
};
-- normal verbs
oper mkVerb : Str -> ConjCl -> Str -> ConjCl -> Verb =
\s, c, s2, c2 -> let tmp = (c2 s2) in
{si = (c s).s;
sp = tmp.s;
\s, c, s2, c2 -> let tmpp = (c2 s2); tmpi = (c s) in
{si = tmpi.s;
sp = tmpp.s;
refl = "";
asp = Dual;
ppart = tmp.p
ppartp = tmpp.p;
pparti = tmpi.p
};
-- Comlicated verbs
@@ -366,7 +370,8 @@ resource VerbMorphoPol = ResPol ** open Prelude, CatPol, (Predef=Predef), (Adj=A
{si = \\form => v.si !form ++ s;
sp = \\form => v.sp !form ++ s;
refl = v.refl; asp = v.asp;
ppart = v.ppart
ppartp = record2table { s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11 = "["++v.si!VInfM ++s++ [": the participle form does not exist]"]};
pparti = record2table { s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11 = "["++v.si!VInfM ++s++ [": the participle form does not exist]"]}
};
@@ -385,18 +390,6 @@ resource VerbMorphoPol = ResPol ** open Prelude, CatPol, (Predef=Predef), (Adj=A
dirV3 : Verb -> V3; -- a typical case ie. "zabrać", "dać"
dirV3 v = mkV3 v "" "" Acc Dat;
-- conditional endings - not present
{- oper condEnd : Number -> Person -> Str = \n,p ->
case <n,p> of {
<Sg, P1> => "bym";
<Sg, P2> => "byś";
<Sg, P3> => "by";
<Pl, P1> => "byśmy";
<Pl, P2> => "byście";
<Pl, P3> => "by"
};-}
indicative_form : Verb -> Bool -> Polarity -> Tense * Anteriority * GenNum * Person => Str;
indicative_form verb imienne pol =
@@ -406,37 +399,35 @@ resource VerbMorphoPol = ResPol ** open Prelude, CatPol, (Predef=Predef), (Adj=A
let perf = verb.sp; in
let imperf = verb.si; in
table {
<Pres, Simul, gn, p> => nie ++ imperf ! (VFinM (extract_num!gn) p) ++ sie
; --# notpresent
<Pres, Anter, gn, p> => nie ++ perf ! (VPraetM gn p) ++ sie ; --# notpresent
<Past, _, gn, p> => nie ++ perf ! (VPraetM gn p) ++ sie ; --# notpresent
<Fut, Simul, gn, p> => nie ++ bedzie ! <(extract_num!gn), p> ++ sie ++ imperf ! (VPraetM gn P3); --# notpresent
<Fut, Anter, gn, p> => nie ++ perf ! (VFinM (extract_num!gn) p) ++ sie; --# notpresent
<Cond, Simul, gn, p> => nie ++ imperf ! (VCondM gn p) ++ sie; --# notpresent
<Cond, Anter, gn, p> => nie ++ perf ! (VCondM gn p) ++ sie --# notpresent
<Pres, Simul, gn, p> => nie ++ imperf ! (VFinM (extract_num!gn) p) ++ sie ;
<Pres, Anter, gn, p> => nie ++ perf ! (VPraetM gn p) ++ sie ;
<Past, _, gn, p> => nie ++ perf ! (VPraetM gn p) ++ sie ;
<Fut, Simul, gn, p> => nie ++ bedzie ! <(extract_num!gn), p> ++ sie ++ imperf ! (VPraetM gn P3);
<Fut, Anter, gn, p> => nie ++ perf ! (VFinM (extract_num!gn) p) ++ sie;
<Cond, Simul, gn, p> => nie ++ imperf ! (VCondM gn p) ++ sie;
<Cond, Anter, gn, p> => nie ++ perf ! (VCondM gn p) ++ sie
}
};
imienne_form : Verb -> Polarity -> Tense * Anteriority * GenNum * Person => Str;
imienne_form verb pol =
imienne_form verb pol =
let byc = (case verb.asp of { Perfective => conj3 "zostać"; _ => conj1 "być" }).s; in
let zostac = (case verb.asp of { Imperfective => conj1 "być"; _ => conj3 "zostać" }).s; in
let nie = case pol of { Pos => "" ; Neg => "nie" }; in
table {
<Pres, Simul, gn, p> => nie ++ byc ! (VFinM (extract_num!gn) p) ++ verb.ppart ! AF gn Nom
; --# notpresent
<Pres, Anter, gn, p> => nie ++ zostac ! (VPraetM gn p) ++ verb.ppart ! AF gn Nom; --# notpresent
<Past, Simul, gn, p> => nie ++ byc ! (VPraetM gn p) ++ verb.ppart ! AF gn Nom; --# notpresent
<Past, Anter, gn, p> => nie ++ zostac ! (VPraetM gn p) ++ verb.ppart ! AF gn Nom; --# notpresent
<Fut, Simul, gn, p> => nie ++ case verb.asp of { --# notpresent
Perfective => zostac ! (VFinM (extract_num!gn) p); --# notpresent
_ => bedzie ! <extract_num!gn, p> --# notpresent
} ++ verb.ppart ! AF gn Nom; --# notpresent
<Fut, Anter, gn, p> => nie ++ zostac ! (VFinM (extract_num!gn) p) ++ verb.ppart ! AF gn Nom; --# notpresent
<Cond, Simul, gn, p> => nie ++ byc ! (VCondM gn p) ++ verb.ppart ! AF gn Nom; --# notpresent
<Cond, Anter, gn, p> => nie ++ zostac ! (VCondM gn p) ++ verb.ppart ! AF gn Nom --# notpresent
table {
<Pres, Simul, gn, p> => nie ++ byc ! (VFinM (extract_num!gn) p) ++ (mkAtable (table2record verb.pparti)) ! AF gn Nom;
<Pres, Anter, gn, p> => nie ++ zostac ! (VPraetM gn p) ++ (mkAtable (table2record verb.ppartp)) ! AF gn Nom;
<Past, Simul, gn, p> => nie ++ byc ! (VPraetM gn p) ++ (mkAtable (table2record verb.pparti)) ! AF gn Nom;
<Past, Anter, gn, p> => nie ++ zostac ! (VPraetM gn p) ++ (mkAtable (table2record verb.ppartp)) ! AF gn Nom;
<Fut, Simul, gn, p> => nie ++ case verb.asp of {
Perfective => zostac ! (VFinM (extract_num!gn) p) ++ (mkAtable (table2record verb.ppartp)) ! AF gn Nom;
_ => bedzie ! <extract_num!gn, p> ++ (mkAtable (table2record verb.pparti)) ! AF gn Nom
};
<Fut, Anter, gn, p> => nie ++ zostac ! (VFinM (extract_num!gn) p) ++ (mkAtable (table2record verb.ppartp)) ! AF gn Nom;
<Cond, Simul, gn, p> => nie ++ byc ! (VCondM gn p) ++ (mkAtable (table2record verb.pparti)) ! AF gn Nom;
<Cond, Anter, gn, p> => nie ++ zostac ! (VCondM gn p) ++ (mkAtable (table2record verb.ppartp)) ! AF gn Nom
};
bedzie : Number * Person => Str = table {
<Sg, P1> => "będę";
<Sg, P2> => "będziesz";
@@ -453,8 +444,8 @@ resource VerbMorphoPol = ResPol ** open Prelude, CatPol, (Predef=Predef), (Adj=A
let badz = (case verb.asp of { Perfective => zostan_op; _ => badz_op })!<(extract_num!gn), p> in
let zostan = (case verb.asp of { Imperfective => badz_op; _ => zostan_op })!<(extract_num!gn), p> in
case pol of {
Pos => badz ++ verb.ppart! AF gn Nom;
Neg => "nie" ++ zostan ++ verb.ppart! AF gn Nom
Pos => badz ++ (mkAtable (table2record verb.pparti))! AF gn Nom;
Neg => "nie" ++ zostan ++ (mkAtable (table2record verb.ppartp))! AF gn Nom
};
False =>
let sie = verb.refl; in
@@ -484,8 +475,8 @@ resource VerbMorphoPol = ResPol ** open Prelude, CatPol, (Predef=Predef), (Adj=A
True =>
let byc = case verb.asp of { Perfective => "zostać"; _ => "być" }; in
case pol of {
Pos => byc ++ verb.ppart! AF MascPersSg Nom;
Neg => "nie" ++ byc ++ verb.ppart! AF MascPersSg Nom
Pos => byc ++ (mkAtable (table2record verb.pparti))! AF MascPersSg Nom;
Neg => "nie" ++ byc ++ (mkAtable (table2record verb.pparti))! AF MascPersSg Nom
};
False =>
let sie = verb.refl; in
@@ -514,4 +505,22 @@ resource VerbMorphoPol = ResPol ** open Prelude, CatPol, (Predef=Predef), (Adj=A
<Pl, P3> => ["niech zostaną"]
};
jest_op : GenNum * Person * Tense * Anteriority => Str =
let byc = (conj1 "być").s in table {
<gn, p, Pres, Simul> => byc ! (VFinM (extract_num!gn) p);
<gn, p, Pres, Anter> => byc ! (VPraetM gn p);
<gn, p, Past, _ > => byc ! (VPraetM gn p);
<gn, p, Fut , _ > => bedzie ! <(extract_num!gn), p>;
<gn, p, Cond, _ > => byc ! (VCondM gn p)
};
niema_op : Tense * Anteriority => Str =
let byc = conj1 "być" in table {
<Pres, Simul> => ["nie ma"];
<Pres, Anter> => ["nie było"];
<Past, _ > => ["nie było"];
<Fut , _ > => ["nie będzie"];
<Cond, _ > => ["nie byłoby"]
};
}

View File

@@ -11,48 +11,51 @@ lin
PassV2 v = setImienne (defVP (castv2 v)) True;
SlashV2a v = (defVP (castv2 v)) ** {c=v.c};
SlashV2a v = (defVP (castv2 v)) ** {c=v.c; postfix=\\_,_=>""};
Slash2V3 v3 np = (setSufix (defVP (castv3 v3))
Slash2V3 v3 np = setSlash (defVP (castv3 v3))
(\\p,gn =>
v3.c.s ++ np.dep ! (npcase !<p,v3.c.c>) ))
** {c=v3.c2};
v3.c.s ++ np.dep ! (npcase !<p,v3.c.c>) )
v3.c2;
Slash3V3 v3 np = (setSufix (defVP (castv3 v3))
Slash3V3 v3 np = (setSlash (defVP (castv3 v3))
(\\p,gn =>
v3.c2.s ++ np.dep ! (npcase !<p,v3.c2.c>) ))
** {c=v3.c};
v3.c;
-- ComplSlash : VPSlash -> NP -> VP ; -- love it
ComplSlash vps np = setSufix vps (\\p,gn =>
vps.sufix!p!gn ++ vps.c.s ++ np.dep !(npcase !<p,vps.c.c>));
ComplSlash vps np = setSufix2 vps (\\p,gn =>
vps.sufix!p!gn ++ vps.c.s ++ np.dep !(npcase !<p,vps.c.c>) ++ vps.postfix!p!gn);
-- AdvVP : VP -> Adv -> VP ; -- sleep here
AdvVP vp adv = setPrefix vp (\\p,gn => vp.prefix!p!gn ++ adv.s);
AdvVP vp adv = setPrefix vp (vp.prefix ++ adv.s);
-- AdVVP : AdV -> VP -> VP ; -- always sleep
AdVVP adV vp = setPrefix vp (\\p,gn => vp.prefix!p!gn ++ adV.s);
AdVVP adV vp = setPrefix vp (vp.prefix ++ adV.s);
-- ReflVP : VPSlash -> VP ; -- love himself
ReflVP vps = setSufix vps (\\p,gn => vps.sufix!p!gn ++ vps.c.s ++ siebie ! (extract_case! vps.c.c));
ReflVP vps = setSufix vps
(\\p,gn => vps.sufix!p!gn ++ vps.c.s ++ siebie ! (extract_case! vps.c.c) ++ vps.postfix!p!gn);
-- CompAP : AP -> Comp ; -- (be) small
CompAP ap = { s = \\gn => ap.s ! AF gn Nom };
-- CompNP : NP -> Comp ; -- (be) a man
CompNP np = { s = \\gn => np.dep !InstrNoPrep };
CompNP np = { s = \\gn => np.dep !InstrC };
-- CompAdv : Adv -> Comp ; -- (be) here
CompAdv adv = { s = \\_ => adv.s };
-- UseComp : Comp -> VP ; -- be warm
UseComp c = setImienne (setSufix (defVP {si = \\_=>[]; sp = \\_=>[]; asp = Imperfective; refl = ""; ppart=\\_=>""})
UseComp c = setImienne (setSufix (defVP {si = \\_=>[]; sp = \\_=>[];
asp = Imperfective; refl = ""; ppartp,pparti= record2table empty11forms
})
(\\_,gn => c.s!gn))
True;
-- ComplVV : VV -> VP -> VP ; -- want to run
ComplVV vv vp = setSufix (defVP vv)
(\\p,gn => vp.prefix !p!gn ++ vp.verb.si !VInfM ++ vp.sufix !p!gn);
(\\p,gn => vp.prefix ++ vp.verb.si !VInfM ++ vp.sufix !p!gn);
-- ComplVQ : VQ -> QS -> VP ; -- wonder who runs
ComplVQ vq qs = setSufix (defVP vq) (\\p,gn => "," ++ qs.s);
@@ -65,85 +68,104 @@ lin
case va.c.adv of { False => a.s!(AF gn va.c.c); True => a.adv } );
-- SlashV2V : V2V -> VP -> VPSlash ; -- beg (her) to go
SlashV2V v vp = (setPostfix (defVP (castv2 v))
(\\p,gn => vp.prefix !p!gn ++ vp.verb.si !VInfM ++ vp.sufix !p!gn))
** {c = v.c};
SlashV2V v vp = setPostfix (defVP (castv2 v))
(\\p,gn => vp.prefix ++ vp.verb.si !VInfM ++ vp.sufix !p!gn)
v.c;
-- SlashV2S : V2S -> S -> VPSlash ; -- answer (to him) that it is good
SlashV2S v s = (setPostfix (defVP (castv2 v))
(\\_,_ => [", że"] ++ s.s))
** {c = v.c};
SlashV2S v s = setPostfix (defVP (castv2 v))
(\\_,_ => [", że"] ++ s.s)
v.c;
-- SlashV2Q : V2Q -> QS -> VPSlash ; -- ask (him) who came
SlashV2Q v qs = (setPostfix (defVP (castv2 v))
(\\_,_ => "," ++ qs.s))
** {c = v.c};
SlashV2Q v qs = setPostfix (defVP (castv2 v))
(\\_,_ => "," ++ qs.s)
v.c;
-- SlashVV : VV -> VPSlash -> VPSlash ; -- want to buy
SlashVV v vps = (setPostfix (setSufix (defVP v)
(\\p,gn => vps.prefix !p!gn ++ vps.verb.si !VInfM ++ vps.sufix !p!gn)) --???? why !pg
vps.postfix)
** {c = vps.c};
SlashVV v vps = setPostfix (setSufix (defVP v)
(\\p,gn => vps.prefix ++ vps.verb.si !VInfM ++ vps.sufix !p!gn)) --???? why !pg
vps.postfix
vps.c;
-- SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash ; -- beg me to buy
SlashV2VNP v np vps = (setPostfix (setSufix (defVP (castv2 v))
SlashV2VNP v np vps = setPostfix (setSufix (defVP (castv2 v))
(\\p,gn =>
np.dep !(npcase !<p,v.c.c>) ++ vps.prefix !p!gn ++
np.dep !(npcase !<p,v.c.c>) ++ vps.prefix ++
vps.verb.si !VInfM ++ vps.sufix !p!gn))
vps.postfix)
** {c = vps.c};
vps.postfix
vps.c;
-- SlashV2A : V2A -> AP -> VPSlash ; -- paint (it) red
SlashV2A va a = (setPostfix (defVP (castv2a va))
(\\_,gn => va.c.s ++ case va.c.adv of { False => a.s!(AF gn va.c.c); True => a.adv }))
** {c = va.c2};
SlashV2A va a = setPostfix (defVP (castv2a va))
(\\_,gn => va.c.s ++ case va.c.adv of { False => a.s!(AF gn va.c.c); True => a.adv })
va.c2;
oper
castv2 : (Verb ** { c:Complement }) -> Verb = \v2 -> {si=v2.si;sp=v2.sp;asp=v2.asp;refl=v2.refl; ppart=v2.ppart};
castv2 : (Verb ** { c:Complement }) -> Verb = \v2 -> {si=v2.si;sp=v2.sp;asp=v2.asp;refl=v2.refl; ppartp=v2.ppartp; pparti=v2.pparti};
castv3 : (Verb ** { c,c2:Complement }) -> Verb = \v2 -> {si=v2.si;sp=v2.sp;asp=v2.asp;refl=v2.refl; ppart=v2.ppart};
castv3 : (Verb ** { c,c2:Complement }) -> Verb = \v2 -> {si=v2.si;sp=v2.sp;asp=v2.asp;refl=v2.refl; ppartp=v2.ppartp; pparti=v2.pparti};
castva : (Verb ** { c:{c:Case; s:Str}}) -> Verb = \v2 -> {si=v2.si;sp=v2.sp;asp=v2.asp;refl=v2.refl; ppart=v2.ppart};
castva : (Verb ** { c:{c:Case; s:Str}}) -> Verb = \v2 -> {si=v2.si;sp=v2.sp;asp=v2.asp;refl=v2.refl; ppartp=v2.ppartp; pparti=v2.pparti};
castv2a : (Verb ** { c:{c:Case; s:Str}; c2:Complement}) -> Verb = \v2 -> {si=v2.si;sp=v2.sp;asp=v2.asp;refl=v2.refl; ppart=v2.ppart};
castv2a : (Verb ** { c:{c:Case; s:Str}; c2:Complement}) -> Verb = \v2 -> {si=v2.si;sp=v2.sp;asp=v2.asp;refl=v2.refl; ppartp=v2.ppartp; pparti=v2.pparti};
defVP : Verb -> VerbPhrase = \v -> {
prefix = \\p,gn => "";
prefix = "";
sufix = \\p,gn => "";
postfix = \\p,gn => "";
verb = v;
imienne = False;
exp = False
};
setPrefix : VerbPhrase -> (Polarity => GenNum => Str) -> VerbPhrase
setPrefix : VerbPhrase -> Str -> VerbPhrase
= \vp,s -> {
prefix = s;
sufix = vp.sufix;
postfix = vp.postfix;
verb = vp.verb;
imienne = vp.imienne;
exp = True
exp = vp.exp -- adding adverb is not an expansion
};
setSufix : VerbPhrase -> (Polarity => GenNum => Str) -> VerbPhrase
= \vp,s -> {
prefix = vp.prefix;
sufix = s;
postfix = vp.postfix;
verb = vp.verb;
imienne = vp.imienne;
exp = True
};
setPostfix : VerbPhrase -> (Polarity => GenNum => Str) -> VerbPhrase
setSufix2 : VerbPhraseSlash -> (Polarity => GenNum => Str) -> VerbPhrase
= \vp,s -> {
prefix = vp.prefix;
sufix = s;
verb = vp.verb;
imienne = vp.imienne;
exp = True
};
setSlash : VerbPhrase -> (Polarity => GenNum => Str) -> Complement -> VerbPhraseSlash
= \vp,s,c -> {
prefix = vp.prefix;
sufix = s;
postfix = \\_,_=>"";
verb = vp.verb;
imienne = vp.imienne;
exp = True;
c = c
};
setPostfix : VerbPhrase -> (Polarity => GenNum => Str) -> Complement -> VerbPhraseSlash
= \vp,s,c -> {
prefix = vp.prefix;
sufix = vp.sufix;
postfix = s;
verb = vp.verb;
imienne = vp.imienne;
exp = True
exp = True;
c=c
};
setImienne : VerbPhrase -> Bool -> VerbPhrase