This commit is contained in:
Aarne Ranta
2018-12-13 14:16:09 +02:00
41 changed files with 753 additions and 512 deletions

View File

@@ -58,7 +58,7 @@ categories.png: categories.dot
categories-imagemap.html: categories.dot categories-imagemap.html: categories.dot
rm -f $@ rm -f $@
echo '<img src="categories.png" usemap="#categories">' > $@ echo '<img src="categories.png" usemap="#categoriesmap" alt="RGL categories">' > $@
dot -Tcmapx $^ >> $@ dot -Tcmapx $^ >> $@
api-examples.gfs: api-examples.txt MkExx.hs api-examples.gfs: api-examples.txt MkExx.hs

View File

@@ -1,5 +1,5 @@
digraph categories { digraph categoriesmap {
size = "11,11" ; size = "11,11" ;
node [href="#\N"]; node [href="#\N"];

View File

@@ -13,18 +13,16 @@ to the relevant source files, which give more information. Some of the files hav
not yet been prepared so that the machine generated documentation has the nicest not yet been prepared so that the machine generated documentation has the nicest
possible format. possible format.
% These hardcoded TOC links (chapter 4 onwards) need to be updated as new languages are added.
The main contents are: The main contents are:
- [Chapter 1 #toc2]: categories, with links to the functions for - [Chapter 1 #toc2]: categories, with links to the functions for constructing trees in them.
constructing trees in them. - [Chapter 2 #toc5]: syntactic construction functions, with cross-links and examples.
- [Chapter 2 #toc5]: syntactic construction functions, with cross-links and - [Chapter 3 #toc85]: morphological (lexical) paradigms.
examples. - [Chapter 4 #toc121]: additional libraries.
- [Chapter 3 #toc85]: morphological paradigms. - [Chapter 5 #toc127]: how to "browse" the library by loading the grammars into the ``gf`` command editor.
- [Chapter 4 #toc120]: additional libraries. - [Chapter 6 #toc128]: a brief example of how application grammars can use the resource modules.
- [Chapter 5 #toc126]: how to "browse" the library by - [Detailed table of contents #toc129].
loading the grammars into the ``gf`` command editor.
- [Chapter 6 #toc127]: a brief example of how application grammars can
use the resource modules.
- [Detailed table of contents #toc128].
The [RGL Browser http://www.grammaticalframework.org/~john/rgl-browser/] tool allows you to interactively browse through The [RGL Browser http://www.grammaticalframework.org/~john/rgl-browser/] tool allows you to interactively browse through

View File

@@ -43,7 +43,7 @@ $endfor$
$if(title)$ $if(title)$
<header id="title-block-header"> <header id="title-block-header">
<a href="$rel-root$" title="Home"> <a href="$rel-root$" title="Home">
<img src="$rel-root$/doc/Logos/gf1.svg" height="200px" class="float-md-right ml-3 mb-3 bg-white" alt="GF Logo"> <img src="$rel-root$/doc/Logos/gf1.svg" height="200" class="float-md-right ml-3 mb-3 bg-white" alt="GF Logo">
</a> </a>
<h1 class="title">$title$</h1> <h1 class="title">$title$</h1>
$if(subtitle)$ $if(subtitle)$
@@ -113,8 +113,7 @@ $endif$
</div> </div>
<div class="col-6 col-sm-3"> <div class="col-6 col-sm-3">
<h6 class="text-muted">Contribute</i> <h6 class="text-muted">Contribute</h6>
</h6>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li><a href="http://groups.google.com/group/gf-dev">Mailing List</a></li> <li><a href="http://groups.google.com/group/gf-dev">Mailing List</a></li>
<li><a href="https://github.com/GrammaticalFramework/gf-core/issues">Issue Tracker</a></li> <li><a href="https://github.com/GrammaticalFramework/gf-core/issues">Issue Tracker</a></li>
@@ -129,8 +128,8 @@ $endif$
<a href="https://github.com/GrammaticalFramework/gf-rgl">RGL</a> · <a href="https://github.com/GrammaticalFramework/gf-rgl">RGL</a> ·
<a href="https://github.com/GrammaticalFramework/gf-contrib">Contributions</a> <a href="https://github.com/GrammaticalFramework/gf-contrib">Contributions</a>
</div> </div>
<div> </div>
<div> </div>
</footer> </footer>
$for(include-after)$ $for(include-after)$
$include-after$ $include-after$

View File

@@ -6,8 +6,16 @@ oper
vow : pattern Str = #("َ" | "ِ" | "ُ" | "ً" | "ٍ" | "ٌ") ; vow : pattern Str = #("َ" | "ِ" | "ُ" | "ً" | "ٍ" | "ٌ") ;
vstar : pattern Str = #("َ"|"ِ"|"ُ"|"ً"|"ٍ"|"ٌ"|"ْ"|"ا"|"ي"|"و") ; -- long or short vowels
astar : pattern Str = #("َ"|"ً"|"ا") ; -- a: short, nunated or long
istar : pattern Str = #("ِ"|"ي"|"يْ") ; -- i: short, long or long with sukun
ustar : pattern Str = #("ُ"|"و"|"وْ") ; -- u: short, long or long with sukun
weak : pattern Str = #("و"|"ي") ; weak : pattern Str = #("و"|"ي") ;
hamzaseat : pattern Str = #("أ"|"ؤ"|"ئ") ;
-- "Sun letters": assimilate with def. article -- "Sun letters": assimilate with def. article
sun : pattern Str = #("ت"|"ث"|"د"|"ذ"|"ر"|"ز"|"س"|"ش"|"ص"|"ض"|"ط"|"ظ"|"ل"|"ن") ; sun : pattern Str = #("ت"|"ث"|"د"|"ذ"|"ر"|"ز"|"س"|"ش"|"ص"|"ض"|"ط"|"ظ"|"ل"|"ن") ;
@@ -30,19 +38,19 @@ oper
rectifyHmz : Str -> Str = \word -> rectifyHmz : Str -> Str = \word ->
case word of { case word of {
l@(""|"ال") + ("أ"|"أَ") + #hamza + "ْ" + tail => l + "آ" + tail; l@(""|"ل"|"ال") + ("أ"|"أَ") + #hamza + "ْ" + tail => l + "آ" + tail;
l@(""|"ال") + ("أ"|"أَ") + #hamza + tail => l + "آ" + tail; l@(""|"ل"|"ال") + ("أ"|"أَ") + #hamza + tail => l + "آ" + tail;
l@(""|"ال") + #hamza + v@("َ"|"ُ") + tail => l + "أ" + v + tail; l@(""|"ال") + #hamza + v@("َ"|"ُ") + tail => l + "أ" + v + tail;
l@(""|"ال") + #hamza + v@("ِ") + tail => l + "إ" + v + tail; l@(""|"ال") + #hamza + v@("ِ") + tail => l + "إ" + v + tail;
head + v1@(#vow|"ْ"|"ا"|"ي"|"و") head + v1@#vstar
+ #hamza + v2@(#vow|"ْ") + tail => + #hamza + v2@(#vow|"ْ") + tail =>
case v2 of { "ْ" => head + v1 + bHmz v1 v2 + tail ; -- unsure about this /IL case v2 of { "ْ" => head + v1 + bHmz v1 v2 + tail ; -- unsure about this /IL
_ => head + v1 + bHmz v1 v2 + v2 + tail } ; _ => head + v1 + bHmz v1 v2 + v2 + tail } ;
head + v1@(#vow|"ْ"|"ا"|"ي"|"و") -- the same but it ends in vowel head + v1@#vstar -- the same but it ends in vowel
+ #hamza + v2@(#vow|"ْ") => + #hamza + v2@(#vow|"ْ") =>
case v2 of { "ْ" => head + v1 + tHmz v1 ; case v2 of { "ْ" => head + v1 + tHmz v1 ;
_ => head + v1 + tHmz v1 + v2 } ; _ => head + v1 + tHmz v1 + v2 } ;
head + v1@(#vow|"ْ"|"ا"|"ي"|"و") -- the same but it ends without vowel head + v1@#vstar -- the same but it ends without vowel
+ #hamza => head + v1 + tHmz v1 ; + #hamza => head + v1 + tHmz v1 ;
head + #hamza + tail => head + (bHmz (dp 2 head) (take 2 tail)) + tail; --last head , take 1 tail head + #hamza + tail => head + (bHmz (dp 2 head) (take 2 tail)) + tail; --last head , take 1 tail
@@ -57,21 +65,22 @@ oper
}; };
--hamza in middle of word (body) --hamza in middle of word (body)
-- relaxing the pattern matching, so that we can call it from ResAra.sing /IL
bHmz : Str -> Str -> Str = \d1,d2 -> bHmz : Str -> Str -> Str = \d1,d2 ->
case <d1,d2> of { case <d1,d2> of {
<"ِ",_> | <_,"ِ"> => "ئ"; <_+#istar,_> | <_,#istar> => "ئ";
<"ُ",_> | <_,"ُ"> => "ؤ"; <_+#ustar,_> | <_,#ustar> => "ؤ";
<"َ",_> | <_,"َ"> => "أ"; <_+"َ" ,_> | <_,"َ"> => "أ"; -- #astar would allow double alif
_ => "ء" _ => "ء"
}; };
--hamza carrier sequence --hamza carrier sequence
tHmz : Str -> Str = \d -> tHmz : Str -> Str = \d ->
case d of { case d of {
"ِ" => "ئ"; "ِ" => "ئ";
"ُ" => "ؤ"; "ُ" => "ؤ";
"َ" => "أ"; "َ" => "أ";
"ْ"|"ا"|"و"|"ي" => "ء" _ => "ء" -- long vowels and sukun
}; };
} }

View File

@@ -530,12 +530,11 @@ resource ParadigmsAra = open
sdfN = sdfN =
\root,sg,gen,spec -> \root,sg,gen,spec ->
let { kalimaStr = mkWord sg root; let { kalimaStr = mkWord sg root;
kalimaRaw = sndf kalimaStr; kalimaRaw : NTable = case gen of {
kalima : NTable = \\n,d,c => case root of { Fem => sndf kalimaStr ;
_ + #hamza + _ Masc => sgMsndf kalimaStr } ;
=> rectifyHmz (kalimaRaw ! n ! d ! c); kalima : NTable = \\n,d,c =>
_ => kalimaRaw ! n ! d ! c rectifyHmz (kalimaRaw ! n ! d ! c)
};
} in mkFullN kalima gen spec; } in mkFullN kalima gen spec;
sdmN = sdmN =

View File

@@ -75,9 +75,9 @@ resource ResAra = PatternsAra ** open Prelude, Predef, OrthoAra, ParamX in {
-- a word, deducing which root consonant is weak -- a word, deducing which root consonant is weak
mkWeak : Pattern -> Root3 -> Str = \pat,fcl -> mkWeak : Pattern -> Root3 -> Str = \pat,fcl ->
case <fcl.f,fcl.c,fcl.l> of { case <fcl.f,fcl.c,fcl.l> of {
<_,_,("و"|"ي"|"ّ")> => mkDefective pat fcl; <_,_,#weak|"ّ"> => mkDefective pat fcl;
<_,("و"|"ي"),_> => mkHollow pat fcl; <_,#weak,_> => mkHollow pat fcl;
<("و"|"ي"),_,_> => mkAssimilated pat fcl <#weak,_,_> => mkAssimilated pat fcl
}; };
mkBilit : Pattern -> Root2 -> Str = \p,fcl -> mkBilit : Pattern -> Root2 -> Str = \p,fcl ->
@@ -990,12 +990,12 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
APosit Masc n d c => case n of { APosit Masc n d c => case n of {
Sg => indeclN aHmar ! d ! c ; Sg => indeclN aHmar ! d ! c ;
Dl => dual aHmar ! d ! c ; Dl => dual aHmar ! d ! c ;
Pl => sing Humr ! d ! c Pl => brkPl Humr ! d ! c
}; };
APosit Fem n d c => case n of { APosit Fem n d c => case n of {
Sg => indeclN HamrA' ! d ! c; Sg => indeclN HamrA' ! d ! c;
Dl => dual ((tk 2 HamrA') + "و") ! d ! c; Dl => dual ((tk 2 HamrA') + "و") ! d ! c;
Pl => sing Humr ! d ! c Pl => brkPl Humr ! d ! c
}; };
AComp d c => indeclN aHmar ! d ! c AComp d c => indeclN aHmar ! d ! c
}; };
@@ -1011,7 +1011,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
table { table {
Sg => sing kitAb ; Sg => sing kitAb ;
Dl => dual kitAb ; Dl => dual kitAb ;
Pl => sing kutub Pl => brkPl kutub
}; };
--takes the sound noun in singular and gives the --takes the sound noun in singular and gives the
@@ -1024,6 +1024,16 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
Pl => plurF lawHa Pl => plurF lawHa
}; };
--takes the sound noun in singular and gives the
--complete noun inflection table of sound feminine plural
sgMsndf : Str -> NTable =
\lawHa ->
table {
Sg => sing lawHa ;
Dl => dual lawHa ;
Pl => singMplurF lawHa
};
--takes the sound noun in singular and gives the --takes the sound noun in singular and gives the
--complete inflection table of sound masculine plural nominals --complete inflection table of sound masculine plural nominals
sndm : Str -> NTable = sndm : Str -> NTable =
@@ -1034,21 +1044,39 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
Pl => plurM muzAric Pl => plurM muzAric
}; };
-- takes a singular or broken plural word and tests the ending to -- takes a singular or broken plural word and tests the ending to
-- determine the declension and gives the corresponding inf table -- determine the declension and gives the corresponding inf table
sing : Str -> State => Case => Str = \word -> brkPl : Str -> State => Case => Str = \word ->
\\s,c => defArt s c (case word of { \\s,c => defArt s c (case word of {
lemma + "ِيّ" => fixShd word (decNisba ! s ! c) ; lemma + "ِيّ" => fixShd word (decNisba ! s ! c) ;
lemma + "ِي" => fixShd lemma (dec2sg ! s ! c) ; lemma + "ِي" => fixShd lemma (dec2sg ! s ! c) ;
_ + ("ا"|"ى") => fixShd word (dec3sg ! s ! c) ; _ + ("ا"|"ى") => fixShd word (dec3sg ! s ! c) ;
lemma + ("ء"|"أ"|"ئ"|"ؤ") => word + dec1sgNoDoubleAlif ! s ! c ; lemma + (#hamza|#hamzaseat)
=> word + dec1sgNoDoubleAlif ! s ! c ;
lemma + "ة" => case s of { lemma + "ة" => case s of {
Poss => lemma + "ت" + dec1sg ! s ! c ; Poss => lemma + "ت" + dec1sg ! s ! c ;
_ => word + dec1sgNoDoubleAlif ! s ! c _ => word + dec1sgNoDoubleAlif ! s ! c
} ; } ;
_ => fixShd word (dec1sg ! s ! c) _ => fixShd word (dec1sg ! s ! c)
}) ; }) ;
sing : Str -> State => Case => Str = \word ->
\\s,c => case word of {
-- This only applies for singular indefinite
x + y@? + #hamza => defArt s c (
case <s,c> of { -- if hamza was last, it's now in the body
<Indef,Acc> =>
case y of {
#vstar => word + dec1sgNoDoubleAlif ! Indef ! Acc ;
_ => let an : Str = dec1sg ! Indef ! Acc ;
hmz : Str = bHmz x an ;
in x + y + hmz + an } ;
_ => word + dec1sg ! s ! c }) ;
-- The rest is identical with singulars and broken plurals
_ => brkPl word ! s ! c
} ;
-- takes a singular word and tests the ending to -- takes a singular word and tests the ending to
-- determine the declension and gives the corresponding dual inf table -- determine the declension and gives the corresponding dual inf table
@@ -1065,6 +1093,12 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
\kalima -> \kalima ->
\\s,c => defArt s c (mkAt kalima) + f_pl ! s ! c ; \\s,c => defArt s c (mkAt kalima) + f_pl ! s ! c ;
-- takes a singular masculine word and gives the corresponding
-- sound plural feminine table
singMplurF : Str -> State => Case => Str =
\ijra' ->
\\s,c => defArt s c (mkAtMasc ijra') + f_pl ! s ! c ;
-- takes a singular word and gives the corresponding sound -- takes a singular word and gives the corresponding sound
--plural masculine table. FIXME: consider declension 3 --plural masculine table. FIXME: consider declension 3
plurM : Str -> State => Case => Str = plurM : Str -> State => Case => Str =
@@ -1196,6 +1230,12 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
} }
}; };
mkAtMasc : Str -> Str = \x ->
case x of {
y + "ة" => y + "ات";
y + "ى" => y + "يَات"; -- TODO check does this happen?
_ => x + "ات"
};
mkAt : Str -> Str = \bayDo -> mkAt : Str -> Str = \bayDo ->
case bayDo of { case bayDo of {

View File

@@ -12,44 +12,50 @@ instance DiffCat of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits] = open CommonRo
-------------------------------- --------------------------------
param param
Prepos = P_de | P_a ; Prepos = P_de | P_a | P_per ;
VType = VHabere | VRefl ; VType = VHabere | VRefl ;
oper oper
dative : Case = CPrep P_a ; dative : Case = CPrep P_a ;
genitive : Case = CPrep P_de ; genitive : Case = CPrep P_de ;
ablative : Case = CPrep P_per ;
prepCase = \c -> case c of { prepCase = \c -> case c of {
Nom => [] ; Nom => [] ;
Acc => [] ; Acc => [] ;
CPrep P_de => elisDe ; CPrep P_de => elisDe ;
CPrep P_per => "per" ;
CPrep P_a => "a" CPrep P_a => "a"
} ; } ;
artDef : Bool -> Gender -> Number -> Case -> Str = \isNP,g,n,c -> artDef : Bool -> Gender -> Number -> Case -> Str = \isNP,g,n,c ->
case <g,n,c> of { ---- TODO: check the NP forms case <g,n,c> of { ---- TODO: check the NP forms
<Masc,Sg, CPrep P_de> => pre {"del" ; ("de l'" ++ Predef.BIND) / vocalForta} ; <Masc,Sg, CPrep P_de> => pre {"del" ; ("de l'" ++ Predef.BIND) / vocalForta} ;
<Masc,Sg, CPrep P_a> => pre {"al" ; ("a l'" ++ Predef.BIND) / vocalForta} ; <Masc,Sg, CPrep P_a> => pre {"al" ; ("a l'" ++ Predef.BIND) / vocalForta} ;
<Masc,Sg, _> => elisEl ;
<Fem, Sg, _> => prepCase c ++ elisLa ;
<Masc,Pl, CPrep P_de> => "dels" ; <Masc,Pl, CPrep P_de> => "dels" ;
<Fem, Pl, CPrep P_de> => ["de les"] ; <Fem, Pl, CPrep P_de> => ["de les"] ;
<Masc,Sg, CPrep P_per> => "pel" ;
<Fem, Sg, CPrep P_per> => ["per la"] ;
<Masc,Pl, CPrep P_per> => "pels" ;
<Fem, Pl, CPrep P_per> => ["per les"] ;
<Masc,Pl, CPrep P_a> => "als" ; <Masc,Pl, CPrep P_a> => "als" ;
<Fem, Pl, CPrep P_a> => ["a les"] ; <Fem, Pl, CPrep P_a> => ["a les"] ;
<Masc,Sg, _> => elisEl ;
<Fem, Sg, _> => prepCase c ++ elisLa ;
<Masc, Pl, _ > => "els" ; <Masc, Pl, _ > => "els" ;
<Fem, Pl, _ > => "les" <Fem, Pl, _ > => "les"
} ; } ;
artIndef = \isNP,g,n,c -> case isNP of { artIndef = \isNP,g,n,c -> case isNP of {
True => case <n,c> of { True => case <n,c> of {
<Sg,CPrep P_de> => genForms ("d' ++ Predef.BIND ++ un") ("d' ++ Predef.BIND ++ una") ! g ; <Sg,CPrep P_de> => genForms ("d' ++ Predef.BIND ++ un") ("d' ++ Predef.BIND ++ una") ! g ;
<Sg,_> => prepCase c ++ genForms "un" "una" ! g ; <Sg,_> => prepCase c ++ genForms "un" "una" ! g ;
<Pl,CPrep P_de> => genForms ("d' ++ Predef.BIND ++ uns") ("d' ++ Predef.BIND ++ unes") ! g ; -- AR 3/12/2014 <Pl,CPrep P_de> => genForms ("d' ++ Predef.BIND ++ uns") ("d' ++ Predef.BIND ++ unes") ! g ; -- AR 3/12/2014
<Pl,_> => prepCase c ++ genForms "uns" "unes" ! g <Pl,_> => prepCase c ++ genForms "uns" "unes" ! g
} ; } ;
_ => case <n,c> of { _ => case <n,c> of {
<Sg,CPrep P_de> => genForms ("d' ++ Predef.BIND ++ un") ("d' ++ Predef.BIND ++ una") ! g ; <Sg,CPrep P_de> => genForms ("d' ++ Predef.BIND ++ un") ("d' ++ Predef.BIND ++ una") ! g ;
@@ -58,7 +64,7 @@ oper
} }
} ; } ;
possCase = \_,_,c -> prepCase c ; possCase = \_,_,c -> prepCase c ;
@@ -69,7 +75,7 @@ oper
conjunctCase : Case -> Case = \c -> case c of { conjunctCase : Case -> Case = \c -> case c of {
Nom => Nom ; Nom => Nom ;
_ => Acc _ => Acc
} ; } ;
auxVerb : VType -> (VF => Str) = \_ -> haver_V.s ; auxVerb : VType -> (VF => Str) = \_ -> haver_V.s ;
@@ -78,7 +84,7 @@ oper
vpAgrNone ; vpAgrNone ;
pronArg = \n,p,acc,dat -> pronArg = \n,p,acc,dat ->
let let
paccp = case acc of { paccp = case acc of {
CRefl => <reflPron n p Acc, p,True> ; CRefl => <reflPron n p Acc, p,True> ;
CPron ag an ap => <argPron ag an ap Acc, ap,True> ; CPron ag an ap => <argPron ag an ap Acc, ap,True> ;
@@ -89,27 +95,27 @@ oper
_ => <[],P2,False> _ => <[],P2,False>
} }
in case <paccp.p2, pdatp.p2> of { in case <paccp.p2, pdatp.p2> of {
---- AR 8/6/2008 efficiency problem in pgf generation: ---- AR 8/6/2008 efficiency problem in pgf generation:
---- replace the case expr with ---- replace the case expr with
---- a constant produces an error in V3 predication with two pronouns ---- a constant produces an error in V3 predication with two pronouns
---- <P3,P3> => <"se" ++ paccp.p1, [],True> ; ---- <P3,P3> => <"se" ++ paccp.p1, [],True> ;
_ => <pdatp.p1 ++ paccp.p1, [],orB paccp.p3 pdatp.p3> _ => <pdatp.p1 ++ paccp.p1, [],orB paccp.p3 pdatp.p3>
} ; } ;
--case <p,acc,dat> of { --case <p,acc,dat> of {
-- <Sg,P2,CRefl,CPron {n = Sg ; p = P1}> => <"te" ++ "me", []> ; -- <Sg,P2,CRefl,CPron {n = Sg ; p = P1}> => <"te" ++ "me", []> ;
-- <_,_,CPron {n = Sg ; p = P2},CPron {n = Sg ; p = P1}> => <"te" ++ "me", []> ; -- <_,_,CPron {n = Sg ; p = P2},CPron {n = Sg ; p = P1}> => <"te" ++ "me", []> ;
infForm _ _ _ _ = True ; infForm _ _ _ _ = True ;
mkImperative b p vp = mkImperative b p vp =
\\pol,g,n => \\pol,g,n =>
let let
pe = case b of {True => P3 ; _ => p} ; pe = case b of {True => P3 ; _ => p} ;
agr = {g = g ; n = n ; p = pe} ; agr = {g = g ; n = n ; p = pe} ;
refl = case vp.s.vtyp of { refl = case vp.s.vtyp of {
VRefl => <reflPron n pe Acc,True> ; VRefl => <reflPron n pe Acc,True> ;
_ => <[],False> _ => <[],False>
} ; } ;
clpr = <vp.clit1 ++ vp.clit2, [],vp.clit3.hasClit> ; ---- TODO: True if clit clpr = <vp.clit1 ++ vp.clit2, [],vp.clit3.hasClit> ; ---- TODO: True if clit
@@ -139,10 +145,10 @@ oper
subjIf = "si" ; subjIf = "si" ;
clitInf b cli inf = inf ++ bindIf b ++ cli ; --- JS copied from DiffSpa clitInf b cli inf = inf ++ bindIf b ++ cli ; --- JS copied from DiffSpa
relPron : Bool => AAgr => Case => Str = \\b,a,c => relPron : Bool => AAgr => Case => Str = \\b,a,c =>
case c of { case c of {
Nom | Acc => "que" ; Nom | Acc => "que" ;
CPrep P_a => "cuyo" ; CPrep P_a => "cuyo" ;
@@ -155,19 +161,19 @@ oper
partQIndir = [] ; ---- ? partQIndir = [] ; ---- ?
reflPron : Number -> Person -> Case -> Str = \n,p,c -> reflPron : Number -> Person -> Case -> Str = \n,p,c ->
let pro = argPron Fem n p c let pro = argPron Fem n p c
in in
case p of { case p of {
P3 => case c of { P3 => case c of {
Acc | CPrep P_a => "es" ; Acc | CPrep P_a => "es" ;
_ => "si" _ => "si"
} ; } ;
_ => pro _ => pro
} ; } ;
argPron : Gender -> Number -> Person -> Case -> Str = argPron : Gender -> Number -> Person -> Case -> Str =
let let
cases : (x,y : Str) -> Case -> Str = \me,moi,c -> case c of { cases : (x,y : Str) -> Case -> Str = \me,moi,c -> case c of {
Acc | CPrep P_a => me ; Acc | CPrep P_a => me ;
_ => moi _ => moi
@@ -177,8 +183,8 @@ oper
CPrep P_a => leur ; CPrep P_a => leur ;
_ => eux _ => eux
} ; } ;
in in
\g,n,p -> case <g,n,p> of { \g,n,p -> case <g,n,p> of {
<_,Sg,P1> => cases "em" "mí" ; <_,Sg,P1> => cases "em" "mí" ;
<_,Sg,P2> => cases "et" "tú" ; <_,Sg,P2> => cases "et" "tú" ;
<_,Pl,P1> => cases "ens" "nosaltres" ; --- nosotros <_,Pl,P1> => cases "ens" "nosaltres" ; --- nosotros

View File

@@ -1,6 +1,6 @@
--# -path=.:../abstract:../common --# -path=.:../abstract:../common
incomplete concrete DocumentationCatFunctor of Documentation = CatCat ** open incomplete concrete DocumentationCatFunctor of Documentation = CatCat ** open
Terminology, -- the interface to be instantiated Terminology, -- the interface to be instantiated
ResCat, ResCat,
CommonRomance, CommonRomance,
@@ -19,22 +19,22 @@ lincat
Definition = {s : Str} ; Definition = {s : Str} ;
Document = {s : Str} ; Document = {s : Str} ;
Tag = {s : Str} ; Tag = {s : Str} ;
{- {-
-} --# notpresent -} --# notpresent
oper oper
heading : N -> Str = \n -> (nounHeading n).s ; heading : N -> Str = \n -> (nounHeading n).s ;
lin lin
InflectionN, InflectionN3, InflectionN3 = \noun -> { InflectionN, InflectionN3, InflectionN3 = \noun -> {
t = "n" ; t = "n" ;
s1 = heading1 (heading noun_Category ++ s1 = heading1 (heading noun_Category ++
case noun.g of { case noun.g of {
Masc => "("+heading masculine_Parameter+")" ; Masc => "("+heading masculine_Parameter+")" ;
Fem => "("+heading feminine_Parameter+")" Fem => "("+heading feminine_Parameter+")"
}) ; }) ;
s2 = frameTable ( s2 = frameTable (
tr (th (heading singular_Parameter) ++ th (heading plural_Parameter)) ++ tr (th (heading singular_Parameter) ++ th (heading plural_Parameter)) ++
tr (td (noun.s ! Sg) ++ td (noun.s ! Pl)) tr (td (noun.s ! Sg) ++ td (noun.s ! Pl))
) )
@@ -45,8 +45,8 @@ lin
s1 = heading1 (nounHeading adjective_Category).s ; s1 = heading1 (nounHeading adjective_Category).s ;
s2 = frameTable ( s2 = frameTable (
tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter)) ++ tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter)) ++
tr (th (heading masculine_Parameter) ++ td (adj.s ! Posit ! (AF Masc Sg)) ++ td (adj.s ! Posit ! (AF Masc Pl))) ++ tr (th (heading masculine_Parameter) ++ td (adj.s ! Posit ! (genNum2Aform Masc Sg)) ++ td (adj.s ! Posit ! (genNum2Aform Masc Pl))) ++
tr (th (heading feminine_Parameter) ++ td (adj.s ! Posit ! (AF Fem Sg)) ++ td (adj.s ! Posit ! (AF Fem Pl))) tr (th (heading feminine_Parameter) ++ td (adj.s ! Posit ! (genNum2Aform Fem Sg)) ++ td (adj.s ! Posit ! (genNum2Aform Fem Pl)))
) )
} ; } ;
@@ -141,23 +141,23 @@ lin
MkDocument d i e = ss (i.s1 ++ d.s ++ i.s2 ++ paragraph e.s) ; -- explanation appended in a new paragraph MkDocument d i e = ss (i.s1 ++ d.s ++ i.s2 ++ paragraph e.s) ; -- explanation appended in a new paragraph
MkTag i = ss i.t ; MkTag i = ss i.t ;
oper oper
verbExample : CatCat.Cl -> Str = \cl -> verbExample : CatCat.Cl -> Str = \cl ->
(S.mkUtt cl).s (S.mkUtt cl).s
++ ";" ++ (S.mkUtt (S.mkS S.anteriorAnt cl)).s --# notpresent ++ ";" ++ (S.mkUtt (S.mkS S.anteriorAnt cl)).s --# notpresent
; ;
inflVerb : Verb -> Str = \verb -> inflVerb : Verb -> Str = \verb ->
let let
vfin : CommonRomance.VF -> Str = \f -> vfin : CommonRomance.VF -> Str = \f ->
verb.s ! f ; verb.s ! f ;
ttable : TMood -> Str = \tense -> ttable : TMood -> Str = \tense ->
frameTable ( frameTable (
tr (th "" ++ tr (th "" ++
th (heading singular_Parameter) ++ th (heading singular_Parameter) ++
th (heading plural_Parameter)) ++ th (heading plural_Parameter)) ++
tr (th "1.p" ++ tr (th "1.p" ++
td (vfin (VFin tense Sg P1)) ++ td (vfin (VFin tense Sg P1)) ++
td (vfin (VFin tense Pl P1))) ++ td (vfin (VFin tense Pl P1))) ++
tr (th "2.p" ++ tr (th "2.p" ++
@@ -170,11 +170,11 @@ oper
ttable2 : (Mood -> TMood) -> Str = \f -> ttable2 : (Mood -> TMood) -> Str = \f ->
frameTable ( frameTable (
tr (intagAttr "th" "colspan=2" "" ++ tr (intagAttr "th" "colspan=2" "" ++
th (heading indicative_Parameter) ++ th (heading indicative_Parameter) ++
th (heading conjunctive_Parameter)) ++ th (heading conjunctive_Parameter)) ++
tr (intagAttr "th" "rowspan=3" (heading singular_Parameter) ++ tr (intagAttr "th" "rowspan=3" (heading singular_Parameter) ++
th "1.p" ++ th "1.p" ++
td (vfin (VFin (f Indic) Sg P1)) ++ td (vfin (VFin (f Indic) Sg P1)) ++
td (vfin (VFin (f Conjunct) Sg P1))) ++ td (vfin (VFin (f Conjunct) Sg P1))) ++
tr (th "2.p" ++ tr (th "2.p" ++
@@ -182,7 +182,7 @@ oper
td (vfin (VFin (f Conjunct) Sg P2))) ++ td (vfin (VFin (f Conjunct) Sg P2))) ++
tr (th "3.p" ++ tr (th "3.p" ++
td (vfin (VFin (f Indic) Sg P3)) ++ td (vfin (VFin (f Indic) Sg P3)) ++
td (vfin (VFin (f Conjunct) Sg P3))) ++ td (vfin (VFin (f Conjunct) Sg P3))) ++
tr (intagAttr "th" "rowspan=3" (heading plural_Parameter) ++ tr (intagAttr "th" "rowspan=3" (heading plural_Parameter) ++
th "1.p" ++ th "1.p" ++
td (vfin (VFin (f Indic) Pl P1)) ++ td (vfin (VFin (f Indic) Pl P1)) ++
@@ -190,7 +190,7 @@ oper
tr (th "2.p" ++ tr (th "2.p" ++
td (vfin (VFin (f Indic) Pl P2)) ++ td (vfin (VFin (f Indic) Pl P2)) ++
td (vfin (VFin (f Conjunct) Pl P2))) ++ td (vfin (VFin (f Conjunct) Pl P2))) ++
tr (th "3.p" ++ tr (th "3.p" ++
td (vfin (VFin (f Indic) Pl P3)) ++ td (vfin (VFin (f Indic) Pl P3)) ++
td (vfin (VFin (f Conjunct) Pl P3))) td (vfin (VFin (f Conjunct) Pl P3)))
) ; ) ;
@@ -209,17 +209,17 @@ oper
paragraph (vfin (VInfin False)) ++ paragraph (vfin (VInfin False)) ++
heading2 (heading imperative_Parameter) ++ heading2 (heading imperative_Parameter) ++
frameTable ( frameTable (
tr (th "sg.2.p" ++ td (vfin (VImper SgP2))) ++ tr (th "sg.2.p" ++ td (vfin (VImper SgP2))) ++
tr (th "pl.1.p" ++ td (vfin (VImper PlP1))) ++ tr (th "pl.1.p" ++ td (vfin (VImper PlP1))) ++
tr (th "pl.2.p" ++ td (vfin (VImper PlP2))) tr (th "pl.2.p" ++ td (vfin (VImper PlP2)))
) ++ ) ++
heading2 (heading participle_Parameter) ++ heading2 (heading participle_Parameter) ++
frameTable ( frameTable (
tr (th (heading past_Parameter) ++ td (vfin (VPart Masc Sg))) ++ tr (th (heading past_Parameter) ++ td (vfin (VPart Masc Sg))) ++
tr (th (heading present_Parameter) ++ td (vfin VGer)) tr (th (heading present_Parameter) ++ td (vfin VGer))
) ; ) ;
{- --# notpresent {- --# notpresent
-} -}
} }

View File

@@ -1,25 +1,25 @@
--# -path=.:../romance:../common:../abstract:../../prelude --# -path=.:../romance:../common:../abstract:../../prelude
concrete LexiconCat of Lexicon = CatCat ** open concrete LexiconCat of Lexicon = CatCat ** open
(M=MorphoCat), ParadigmsCat, BeschCat in { (M=MorphoCat), ParadigmsCat, BeschCat, (D = DiffCat) in {
flags flags
coding=utf8 ; coding=utf8 ;
optimize=values ; optimize=values ;
oper oper
regFN : Str -> N = \s -> femN (regN s) ; regFN : Str -> N = \s -> femN (regN s) ;
regMN : Str -> N = \s -> regN s ; regMN : Str -> N = \s -> regN s ;
irregMN : Str -> Str -> N = \pa,pans -> M.mkNounIrreg pa pans masculine ** {lock_N=<>} ; irregMN : Str -> Str -> N = \pa,pans -> M.mkNounIrreg pa pans masculine ** {lock_N=<>} ;
saberV : V = verbV (saber_99 "saber") ; saberV : V = verbV (saber_99 "saber") ;
lin lin
airplane_N = regMN "avió" ; airplane_N = regMN "avió" ;
answer_V2S = mkV2S (verbV (compondre_26 "respondre")) dative ; answer_V2S = mkV2S (verbV (compondre_26 "respondre")) dative ;
apartment_N = regMN "pis" ; apartment_N = regMN "pis" ;
apple_N = regFN "poma" ; apple_N = regFN "poma" ;
art_N = regMN "art" ; art_N = regMN "art" ;
ask_V2Q = mkV2Q (mkV "preguntar") dative ; ask_V2Q = mkV2Q (mkV "preguntar") dative ;
baby_N = regMN "nadó" ; baby_N = regMN "nadó" ;
bad_A = mkADeg (regA "dolent") (regA "pitjor") ; bad_A = mkADeg (regA "dolent") (regA "pitjor") ;
@@ -28,10 +28,10 @@ lin
become_VA = reflV (mkV "tornar") ; -- esdevenir become_VA = reflV (mkV "tornar") ; -- esdevenir
beer_N = regFN "cervesa" ; beer_N = regFN "cervesa" ;
beg_V2V = mkV2V (mkV "demanar") accusative dative ; beg_V2V = mkV2V (mkV "demanar") accusative dative ;
big_A = regADeg "gros" ; big_A = mkA "gros" "grossa" ;
bike_N = regFN "bicicleta" ; bike_N = regFN "bicicleta" ;
bird_N = regMN "ocell" ; bird_N = regMN "ocell" ;
black_A = compADeg (mkA "negre" "negra" "negres" "negres" "negrament") ; black_A = compADeg (mkA "negre" "negra" "negres" "negres" "negrament") ;
blue_A = compADeg (mkA "blau" "blava" "blaus" "blaves" "blavament") ; blue_A = compADeg (mkA "blau" "blava" "blaus" "blaves" "blavament") ;
boat_N = regFN "barca" ; boat_N = regFN "barca" ;
book_N = regMN "llibre" ; book_N = regMN "llibre" ;
@@ -55,15 +55,15 @@ lin
cheese_N = regMN "formatge" ; cheese_N = regMN "formatge" ;
child_N = regMN "nen" ; -- nena child_N = regMN "nen" ; -- nena
church_N = regFN "església" ; church_N = regFN "església" ;
city_N = regFN "ciutat" ; city_N = regFN "ciutat" ;
clean_A = regADeg "net" ; clean_A = regADeg "net" ;
clever_A = regADeg "inteligent" ; clever_A = regADeg "inteligent" ;
close_V2 = dirV2 (verbV (trencar_112 "tancar")) ; close_V2 = dirV2 (verbV (trencar_112 "tancar")) ;
coat_N = regMN "abric" ; coat_N = regMN "abric" ;
cold_A = regADeg "fred" ; cold_A = regADeg "fred" ;
come_V = verbV (venir_117 "venir") ; come_V = verbV (venir_117 "venir") ;
computer_N = regMN "ordinador" ; computer_N = regMN "ordinador" ;
country_N = mkN "país" "països" masculine ; country_N = mkN "país" "països" masculine ;
cousin_N = regMN "cosí" ; cousin_N = regMN "cosí" ;
cow_N = mkN "vaca" ; cow_N = mkN "vaca" ;
die_V = verbV (morir_71 "morir") ; die_V = verbV (morir_71 "morir") ;
@@ -92,7 +92,7 @@ lin
girl_N = regFN "noia" ; girl_N = regFN "noia" ;
glove_N = regMN "guant" ; glove_N = regMN "guant" ;
gold_N = regMN "or" ; gold_N = regMN "or" ;
good_A = prefA (mkADeg (mkA "bo" "bona") (mkA "millor")) ; good_A = mkA (prefA "bo" "bon") (mkA "millor") ;
go_V = (verbV (anar_4 "anar")) ; go_V = (verbV (anar_4 "anar")) ;
green_A = regADeg "verd" ; green_A = regADeg "verd" ;
harbour_N = regMN "port" ; harbour_N = regMN "port" ;
@@ -107,7 +107,7 @@ lin
important_A = regADeg "important" ; important_A = regADeg "important" ;
industry_N = regFN "indústria" ; industry_N = regFN "indústria" ;
iron_N = regMN "ferro" ; iron_N = regMN "ferro" ;
king_N = regMN "rei" ; king_N = regMN "rei" ;
know_V2 = dirV2 saberV ; know_V2 = dirV2 saberV ;
know_VQ = mkVQ saberV; know_VQ = mkVQ saberV;
know_VS = mkVS saberV; know_VS = mkVS saberV;
@@ -133,7 +133,7 @@ lin
music_N = regFN "música" ; music_N = regFN "música" ;
narrow_A = regADeg "estret" ; narrow_A = regADeg "estret" ;
new_A = prefixA (compADeg (mkA "nou" "nova" "nous" "noves" "novament")) ; new_A = prefixA (compADeg (mkA "nou" "nova" "nous" "noves" "novament")) ;
newspaper_N = regMN "diari" ; -- periòdic newspaper_N = regMN "diari" ; -- periòdic
oil_N = regMN "oli" ; oil_N = regMN "oli" ;
old_A = regADeg "vell" ; old_A = regADeg "vell" ;
open_V2 = dirV2 (verbV (obrir_77 "obrir")) ; open_V2 = dirV2 (verbV (obrir_77 "obrir")) ;
@@ -147,14 +147,14 @@ lin
play_V2 = dirV2 (verbV (pregar_86 "jugar")) ; play_V2 = dirV2 (verbV (pregar_86 "jugar")) ;
policeman_N = regMN "policia" ; -- fem refers to the institution policeman_N = regMN "policia" ; -- fem refers to the institution
priest_N = regMN "capellà" ; -- masc priest_N = regMN "capellà" ; -- masc
probable_AS = mkAS (regA "probable") ; probable_AS = mkAS (regA "probable") ;
queen_N = regN "reina" ; queen_N = regN "reina" ;
radio_N = regFN "ràdio" ; radio_N = regFN "ràdio" ;
rain_V0 = mkV0 (verbV (moure_72 "ploure")) ; rain_V0 = mkV0 (verbV (moure_72 "ploure")) ;
read_V2 = dirV2 (verbV (servir_101 "llegir")) ; read_V2 = dirV2 (verbV (servir_101 "llegir")) ;
red_A = regADeg "vermell" ; red_A = regADeg "vermell" ;
religion_N = mkN "religió" "religions" feminine ; religion_N = mkN "religió" "religions" feminine ;
restaurant_N = regMN "restaurant" ; restaurant_N = regMN "restaurant" ;
river_N = regMN "riu" ; river_N = regMN "riu" ;
rock_N = regFN "roca" ; rock_N = regFN "roca" ;
roof_N = regFN "teulada" ; roof_N = regFN "teulada" ;
@@ -163,7 +163,7 @@ lin
say_VS = mkVS (verbV (dir_41 "dir")) ; say_VS = mkVS (verbV (dir_41 "dir")) ;
school_N = regFN "escola" ; school_N = regFN "escola" ;
science_N = regFN "ciència" ; science_N = regFN "ciència" ;
sea_N = regMN "mar" ; -- masc & fem sea_N = regMN "mar" ; -- masc & fem
seek_V2 = dirV2 (verbV (trencar_112 "buscar")) ; seek_V2 = dirV2 (verbV (trencar_112 "buscar")) ;
see_V2 = dirV2 (verbV (veure_118 "veure")) ; see_V2 = dirV2 (verbV (veure_118 "veure")) ;
sell_V3 = dirV3 (verbV (vendre_116 "vendre")) dative ; sell_V3 = dirV3 (verbV (vendre_116 "vendre")) dative ;
@@ -184,13 +184,13 @@ lin
star_N = regFN "estrella" ; star_N = regFN "estrella" ;
steel_N = regMN "acer" ; steel_N = regMN "acer" ;
stone_N = regFN "pedra" ; stone_N = regFN "pedra" ;
stove_N = regMN "forn" ; stove_N = regMN "forn" ;
student_N = regN "estudiant" ; -- used both for fem & masc student_N = regN "estudiant" ; -- used both for fem & masc
stupid_A = regADeg "estúpid" ; stupid_A = regADeg "estúpid" ;
sun_N = regMN "sol" ; sun_N = regMN "sol" ;
switch8off_V2 = dirV2 (verbV (pregar_86 "apagar")) ; switch8off_V2 = dirV2 (verbV (pregar_86 "apagar")) ;
switch8on_V2 = dirV2 (verbV (atendre_8 "encendre")) ; switch8on_V2 = dirV2 (verbV (atendre_8 "encendre")) ;
table_N = regFN "taula" ; table_N = regFN "taula" ;
talk_V3 = mkV3 (mkV "parlar") dative genitive ; talk_V3 = mkV3 (mkV "parlar") dative genitive ;
teacher_N = regMN "mestre" ; -- mestra teacher_N = regMN "mestre" ; -- mestra
teach_V2 = dirV2 (mkV "ensenyar") ; teach_V2 = dirV2 (mkV "ensenyar") ;
@@ -228,7 +228,7 @@ lin
add_V3 = dirV3 (mkV "afegir") dative ; -- also: (mkV "sumar") add_V3 = dirV3 (mkV "afegir") dative ; -- also: (mkV "sumar")
number_N = regMN "número" ; number_N = regMN "número" ;
put_V2 = dirV2 (mkV "posar") ; put_V2 = dirV2 (mkV "posar") ;
stop_V = mkV "aturar" ; stop_V = mkV "aturar" ;
jump_V = mkV "saltar" ; jump_V = mkV "saltar" ;
left_Ord = M.mkOrd (regA "esquerra") ; left_Ord = M.mkOrd (regA "esquerra") ;
right_Ord = M.mkOrd (regA "dreta") ; right_Ord = M.mkOrd (regA "dreta") ;
@@ -269,7 +269,7 @@ lin
fog_N = regFN "boira" ; fog_N = regFN "boira" ;
foot_N = regMN "peu" ; foot_N = regMN "peu" ;
forest_N = regMN "bosc" ; forest_N = regMN "bosc" ;
grass_N = regFN "herba" ; grass_N = regFN "herba" ;
guts_N = regMN "budell" ; guts_N = regMN "budell" ;
hair_N = regMN "cabell" ; hair_N = regMN "cabell" ;
hand_N = regFN "mà" ; hand_N = regFN "mà" ;
@@ -290,7 +290,7 @@ lin
nose_N = regMN "nas" ; nose_N = regMN "nas" ;
person_N = regFN "persona" ; person_N = regFN "persona" ;
rain_N = regFN "pluja" ; -- pluges rain_N = regFN "pluja" ; -- pluges
road_N = regMN "carrer" ; road_N = regMN "carrer" ;
root_N = regFN "arrel" ; root_N = regFN "arrel" ;
rope_N = regN "corda" ; rope_N = regN "corda" ;
salt_N = regFN "sal" ; salt_N = regFN "sal" ;
@@ -300,14 +300,14 @@ lin
sky_N = regMN "cel" ; sky_N = regMN "cel" ;
smoke_N = regMN "fum" ; smoke_N = regMN "fum" ;
snow_N = regFN "neu" ; -- fem snow_N = regFN "neu" ; -- fem
stick_N = regMN "bastó" ; stick_N = regMN "bastó" ;
tail_N = regFN "cua" ; tail_N = regFN "cua" ;
tongue_N = mkN "llengua" ; -- llengües tongue_N = mkN "llengua" ; -- llengües
tooth_N = regFN "dent" ; tooth_N = regFN "dent" ;
wife_N = regFN "esposa" ; wife_N = regFN "esposa" ;
wind_N = regMN "vent" ; wind_N = regMN "vent" ;
wing_N = regFN "ala" ; wing_N = regFN "ala" ;
worm_N = regMN "cuc" ; worm_N = regMN "cuc" ;
year_N = regMN "any" ; year_N = regMN "any" ;
bite_V2 = dirV2 (verbV (pregar_86 "mossegar")) ; bite_V2 = dirV2 (verbV (pregar_86 "mossegar")) ;
blow_V = mkV "bufar" ; blow_V = mkV "bufar" ;
@@ -327,7 +327,7 @@ lin
hold_V2 = dirV2 (verbV (obtenir_78 "sostenir")) ; hold_V2 = dirV2 (verbV (obtenir_78 "sostenir")) ;
hunt_V2 = dirV2 (verbV (començar_22 "caçar")) ; hunt_V2 = dirV2 (verbV (començar_22 "caçar")) ;
kill_V2 = dirV2 (mkV "matar") ; kill_V2 = dirV2 (mkV "matar") ;
laugh_V = verbV (riure_96 "riure") ; laugh_V = verbV (riure_96 "riure") ;
lie_V = reflV (verbV (jeure_62 "jeure")) ; lie_V = reflV (verbV (jeure_62 "jeure")) ;
play_V = verbV (pregar_86 "jugar") ; play_V = verbV (pregar_86 "jugar") ;
pull_V2 = dirV2 (mkV "tibar") ; pull_V2 = dirV2 (mkV "tibar") ;
@@ -361,7 +361,7 @@ lin
language_N = mkN "llengua" ; -- llengües language_N = mkN "llengua" ; -- llengües
rule_N = regFN "regla" ; rule_N = regFN "regla" ;
question_N = regFN "pregunta" ; question_N = regFN "pregunta" ;
ready_A = regA "preparat" ; ready_A = adjCopula (regA "preparat") D.estarCopula ;
reason_N = regFN "raó" ; reason_N = regFN "raó" ;
uncertain_A = regA "incert" ; uncertain_A = regA "incert" ;

View File

@@ -94,14 +94,19 @@ oper
-- Here are some patterns. First one that describes the worst case. -- Here are some patterns. First one that describes the worst case.
-- gcc M2.1 -- gcc M2.1
mkAdj : (_,_,_,_,_ : Str) -> Adj = \prim,prima,prims,primes,primament -> mkAdjFull : (x1,_,_,_,_,x6 : Str) -> Adj = \bon,bo,prima,prims,primes,primament ->
{s = table { {s = table {
AF Masc n => numForms prim prims ! n ; ASg Masc AAttr => bon ;
AF Fem n => numForms prima primes ! n ; ASg Masc APred => bo ;
AA => primament ASg Fem _ => prima ;
APl Masc => prims ;
APl Fem => primes ;
AA => primament
} }
} ; } ;
mkAdj : (x1,_,_,_,x5 : Str) -> Adj = \a,b,c,d,e -> mkAdjFull a a b c d e ;
--- Then the regular and invariant patterns. --- Then the regular and invariant patterns.
adjPrim : Str -> Adj = \prim -> adjPrim : Str -> Adj = \prim ->
@@ -116,16 +121,15 @@ oper
let fond = Predef.tk 1 fondo let fond = Predef.tk 1 fondo
in adjBlau fondo (fond + "a") ; in adjBlau fondo (fond + "a") ;
adjBo : Str -> Adj = \bo -> adjBo : (bo,bon : Str) -> Adj = \bo,bon ->
mkAdj bo (bo + "na") (bo + "ns") (bo + "nes") (bo + "nament") ; mkAdjFull bon bo (bon + "a") (bon + "s") (bon + "es") (bon + "ament") ;
adjFidel : Str -> Adj = \fidel -> adjFidel : Str -> Adj = \fidel ->
let fidels : Str = case (last fidel) of { let fidels : Str = case (last fidel) of {
_ + ("s"|"ç"|"x") => fidel + "os" ; --feliç; capaç _ + ("s"|"ç"|"x") => fidel + "os" ; --feliç; capaç
_ => fidel + "s" _ => fidel + "s"
} ; } ;
in mkAdj fidel fidel fidels fidels in mkAdj fidel fidel fidels fidels (fidel + "ment") ;
(fidel + "ment") ;
--boig, boja, bojos, boges --boig, boja, bojos, boges
--lleig, lletja, lletjos, lletges --lleig, lletja, lletjos, lletges
@@ -300,6 +304,6 @@ oper unaccent : Str -> Str = \vocal ->
-- Determiners, traditionally called indefinite pronouns, are inflected -- Determiners, traditionally called indefinite pronouns, are inflected
-- in gender and number, like adjectives. -- in gender and number, like adjectives.
pronForms : Adj -> Gender -> Number -> Str = \tal,g,n -> tal.s ! AF g n ; pronForms : Adj -> Gender -> Number -> Str = \tal,g,n -> tal.s ! genNum2Aform g n ;
} }

View File

@@ -5,12 +5,12 @@
-- Aarne Ranta 2004 - 2006 -- Aarne Ranta 2004 - 2006
-- Jordi Saludes 2008: Modified from ParadigmsSpa -- Jordi Saludes 2008: Modified from ParadigmsSpa
-- --
-- This is an API for the user of the resource grammar -- This is an API for the user of the resource grammar
-- for adding lexical items. It gives functions for forming -- for adding lexical items. It gives functions for forming
-- expressions of open categories: nouns, adjectives, verbs. -- expressions of open categories: nouns, adjectives, verbs.
-- --
-- Closed categories (determiners, pronouns, conjunctions) are -- Closed categories (determiners, pronouns, conjunctions) are
-- accessed through the resource syntax API, $Structural.gf$. -- accessed through the resource syntax API, $Structural.gf$.
-- --
-- The main difference with $MorphoCat.gf$ is that the types -- The main difference with $MorphoCat.gf$ is that the types
-- referred to are compiled resource grammar types. We have moreover -- referred to are compiled resource grammar types. We have moreover
@@ -24,11 +24,11 @@
-- verbs, there is a fairly complete list of irregular verbs in -- verbs, there is a fairly complete list of irregular verbs in
-- [``IrregCat`` ../../catalan/IrregCat.gf]. -- [``IrregCat`` ../../catalan/IrregCat.gf].
resource ParadigmsCat = resource ParadigmsCat =
open open
(Predef=Predef), (Predef=Predef),
Prelude, Prelude,
MorphoCat, MorphoCat,
BeschCat, BeschCat,
CatCat in { CatCat in {
@@ -36,19 +36,19 @@ flags
optimize=all ; optimize=all ;
coding = utf8 ; coding = utf8 ;
--2 Parameters --2 Parameters
-- --
-- To abstract over gender names, we define the following identifiers. -- To abstract over gender names, we define the following identifiers.
oper oper
Gender : Type ; Gender : Type ;
masculine : Gender ; masculine : Gender ;
feminine : Gender ; feminine : Gender ;
-- To abstract over number names, we define the following. -- To abstract over number names, we define the following.
Number : Type ; Number : Type ;
singular : Number ; singular : Number ;
plural : Number ; plural : Number ;
@@ -70,7 +70,7 @@ oper
mkN : overload { mkN : overload {
-- The regular function takes the singular form and the gender, -- The regular function takes the singular form and the gender,
-- and computes the plural and the gender by a heuristic. -- and computes the plural and the gender by a heuristic.
-- The heuristic says that the gender is feminine for nouns -- The heuristic says that the gender is feminine for nouns
-- ending with "a" or "z", and masculine for all other words. -- ending with "a" or "z", and masculine for all other words.
-- Nouns ending with "a", "o", "e" have the plural with "s", -- Nouns ending with "a", "o", "e" have the plural with "s",
@@ -89,23 +89,23 @@ oper
} ; } ;
--3 Compound nouns --3 Compound nouns
-- --
-- Some nouns are ones where the first part is inflected as a noun but -- Some nouns are ones where the first part is inflected as a noun but
-- the second part is not inflected. e.g. "número de telèfon". -- the second part is not inflected. e.g. "número de telèfon".
-- They could be formed in syntax, but we give a shortcut here since -- They could be formed in syntax, but we give a shortcut here since
-- they are frequent in lexica. -- they are frequent in lexica.
compN : N -> Str -> N ; -- compound, e.g. "número" + "de telèfon" compN : N -> Str -> N ; -- compound, e.g. "número" + "de telèfon"
--3 Relational nouns --3 Relational nouns
-- --
-- Relational nouns ("filla de x") need a case and a preposition. -- Relational nouns ("filla de x") need a case and a preposition.
mkN2 : N -> Prep -> N2 ; -- e.g. filla + genitive mkN2 : N -> Prep -> N2 ; -- e.g. filla + genitive
-- The most common cases are the genitive "de" and the dative "a", -- The most common cases are the genitive "de" and the dative "a",
-- with the empty preposition. -- with the empty preposition.
deN2 : N -> N2 ; -- relation with genitive deN2 : N -> N2 ; -- relation with genitive
@@ -123,11 +123,11 @@ oper
-- $N3$ are purely lexical categories. But you can use the $AdvCN$ -- $N3$ are purely lexical categories. But you can use the $AdvCN$
-- and $PrepNP$ constructions to build phrases like this. -- and $PrepNP$ constructions to build phrases like this.
-- --
--3 Proper names and noun phrases --3 Proper names and noun phrases
-- --
-- Proper names need a string and a gender. -- Proper names need a string and a gender.
-- The default gender is feminine for names ending with "a", otherwise masculine. TODO -- The default gender is feminine for names ending with "a", otherwise masculine. TODO
mkPN : overload { mkPN : overload {
mkPN : (Anna : Str) -> PN ; -- feminine for "-a", otherwise masculine mkPN : (Anna : Str) -> PN ; -- feminine for "-a", otherwise masculine
@@ -151,10 +151,13 @@ oper
mkA : (fort,forta,forts,fortes,fortament : Str) -> A ; -- worst case mkA : (fort,forta,forts,fortes,fortament : Str) -> A ; -- worst case
-- In the worst case, two separate adjectives are given: -- In the worst case, two separate adjectives are given:
-- the positive ("bo"), and the comparative ("millor"). -- the positive ("bo"), and the comparative ("millor").
mkA : (bo : A) -> (millor : A) -> A -- special comparison (default with "mas") mkA : (bo : A) -> (millor : A) -> A ; -- special comparison (default with "mas")
mkA : A -> CopulaType -> A -- force copula type
} ; } ;
-- The functions above create postfix adjectives. To switch -- The functions above create postfix adjectives. To switch
@@ -164,6 +167,7 @@ oper
-- JS: What about vi bo -> bon vi ? -- JS: What about vi bo -> bon vi ?
prefixA : A -> A ; -- adjective before noun (default: after) prefixA : A -> A ; -- adjective before noun (default: after)
adjCopula : A -> CopulaType -> A ; -- force copula type
--3 Two-place adjectives --3 Two-place adjectives
@@ -177,7 +181,7 @@ oper
--2 Adverbs --2 Adverbs
-- Adverbs are not inflected. Most lexical ones have position -- Adverbs are not inflected. Most lexical ones have position
-- after the verb. -- after the verb.
mkAdv : Str -> Adv ; mkAdv : Str -> Adv ;
@@ -200,11 +204,11 @@ oper
mkV : (cantar : Str) -> V ; -- regular in models I, IIa, IIb mkV : (cantar : Str) -> V ; -- regular in models I, IIa, IIb
-- Verbs with predictable alternation: -- Verbs with predictable alternation:
-- a) inchoative verbs, servir serveixo -- a) inchoative verbs, servir serveixo
-- b) re verbs with c/g in root, vendre venc ; subj. vengui -- b) re verbs with c/g in root, vendre venc ; subj. vengui
mkV : (servir,serveixo : Str) -> V ; --inchoative verbs and "re" verbs whose 1st person ends in c mkV : (servir,serveixo : Str) -> V ; --inchoative verbs and "re" verbs whose 1st person ends in c
-- Most irregular verbs are found in $IrregCat$. If this is not enough, -- Most irregular verbs are found in $IrregCat$. If this is not enough,
-- the module $BeschCat$ gives all the patterns of the "Bescherelle" -- the module $BeschCat$ gives all the patterns of the "Bescherelle"
@@ -229,7 +233,7 @@ oper
--3 Two-place verbs --3 Two-place verbs
-- --
-- Two-place verbs need a preposition, except the special case with direct object. -- Two-place verbs need a preposition, except the special case with direct object.
-- (transitive verbs). -- (transitive verbs).
mkV2 : overload { mkV2 : overload {
mkV2 : Str -> V2 ; -- regular verb, direct object mkV2 : Str -> V2 ; -- regular verb, direct object
@@ -274,9 +278,9 @@ oper
mkAV : A -> Prep -> AV ; --% mkAV : A -> Prep -> AV ; --%
mkA2V : A -> Prep -> Prep -> A2V ; --% mkA2V : A -> Prep -> Prep -> A2V ; --%
-- Notice: categories $AS, A2S, AV, A2V$ are just $A$, -- Notice: categories $AS, A2S, AV, A2V$ are just $A$,
-- and the second argument is given -- and the second argument is given
-- as an adverb. Likewise -- as an adverb. Likewise
-- $V0$ is just $V$. -- $V0$ is just $V$.
V0 : Type ; --% V0 : Type ; --%
@@ -289,7 +293,7 @@ oper
-- The definitions should not bother the user of the API. So they are -- The definitions should not bother the user of the API. So they are
-- hidden from the document. -- hidden from the document.
Gender = MorphoCat.Gender ; Gender = MorphoCat.Gender ;
Number = MorphoCat.Number ; Number = MorphoCat.Number ;
masculine = Masc ; masculine = Masc ;
feminine = Fem ; feminine = Fem ;
@@ -323,20 +327,24 @@ oper
makeNP x g n = {s = (pn2np (mk2PN x g)).s; a = agrP3 g n ; hasClit = False ; isPol = False ; isNeg = False} ** {lock_NP = <>} ; makeNP x g n = {s = (pn2np (mk2PN x g)).s; a = agrP3 g n ; hasClit = False ; isPol = False ; isNeg = False} ** {lock_NP = <>} ;
mk5A a b c d e = mk5A a b c d e =
compADeg {s = \\_ => (mkAdj a b c d e).s ; isPre = False ; lock_A = <>} ; compADeg {s = \\_ => (mkAdj a b c d e).s ; isPre = False ; copTyp = serCopula ; lock_A = <>} ;
mk2A a b = compADeg {s = \\_ => (mkAdj2Reg a b).s ; isPre = False ; lock_A = <>} ; mk2A a b = compADeg {s = \\_ => (mkAdj2Reg a b).s ; isPre = False ; copTyp = serCopula ; lock_A = <>} ;
regA a = compADeg {s = \\_ => (mkAdjReg a).s ; isPre = False ; lock_A = <>} ; regA a = compADeg {s = \\_ => (mkAdjReg a).s ; isPre = False ; copTyp = serCopula ; lock_A = <>} ;
prefA a = {s = a.s ; isPre = True ; lock_A = <>} ; prefA = overload {
prefA : A -> A = \a -> a ** {isPre = True} ;
prefA : Str -> Str -> A = \bo,bon ->
compADeg (lin A {s = \\_ => (adjBo bo bon).s ; isPre = True ; copTyp = serCopula}) ;
} ;
mkA2 a p = a ** {c2 = p ; lock_A2 = <>} ; mkA2 a p = a ** {c2 = p ; lock_A2 = <>} ;
mkADeg a b = mkADeg a b =
{s = table {Posit => a.s ! Posit ; _ => b.s ! Posit} ; {s = table {Posit => a.s ! Posit ; _ => b.s ! Posit} ;
isPre = a.isPre ; lock_A = <>} ; isPre = a.isPre ; copTyp = serCopula ; lock_A = <>} ;
compADeg a = compADeg a =
{s = table {Posit => a.s ! Posit ; _ => \\f => "més" ++ a.s ! Posit ! f} ; {s = table {Posit => a.s ! Posit ; _ => \\f => "més" ++ a.s ! Posit ! f} ;
isPre = a.isPre ; isPre = a.isPre ; copTyp = a.copTyp ;
lock_A = <>} ; lock_A = <>} ;
regADeg a = compADeg (regA a) ; regADeg a = compADeg (regA a) ;
@@ -356,7 +364,7 @@ oper
_ + "re" => perdre_83 x ; _ + "re" => perdre_83 x ;
_ + "er" => verbEr x ; --handles accents in infinitives and c/ç, g/j _ + "er" => verbEr x ; --handles accents in infinitives and c/ç, g/j
_ + "ir" => dormir_44 x ; --inchoative verbs with regAltV _ + "ir" => dormir_44 x ; --inchoative verbs with regAltV
_ + "ur" => dur_45 x ; _ + "ur" => dur_45 x ;
_ => cantar_15 x } ; _ => cantar_15 x } ;
@@ -384,10 +392,10 @@ oper
mk3V x y z = mk3V x y z =
let ure = Predef.dp 3 x ; let ure = Predef.dp 3 x ;
venc = Predef.dp 4 y ; venc = Predef.dp 4 y ;
gut = Predef.dp 3 z gut = Predef.dp 3 z
in case <ure,venc,gut> of { in case <ure,venc,gut> of {
<_+"re",_,"gut"> => regAltV x y ; --default participle of type dolgut <_+"re",_,"gut"> => regAltV x y ; --default participle of type dolgut
--if these are overfitting, just comment out. --if these are overfitting, just comment out.
--still doesn't catch creure, seure; mk4V with creiem as 4th arg? --still doesn't catch creure, seure; mk4V with creiem as 4th arg?
<"ure",_, "uit"> => coure_32 x ; --coure coem cuit <"ure",_, "uit"> => coure_32 x ; --coure coem cuit
@@ -425,7 +433,7 @@ oper
special_ppV ve pa = { special_ppV ve pa = {
s = table { s = table {
VPart g n => (regA pa).s ! Posit ! AF g n ; VPart g n => (regA pa).s ! Posit ! genNum2Aform g n ;
p => ve.s ! p p => ve.s ! p
} ; } ;
lock_V = <> ; lock_V = <> ;
@@ -489,13 +497,14 @@ oper
-- To form a noun phrase that can also be plural, -- To form a noun phrase that can also be plural,
-- you can use the worst-case function. -- you can use the worst-case function.
makeNP : Str -> Gender -> Number -> NP ; makeNP : Str -> Gender -> Number -> NP ;
mkA = overload { mkA = overload {
mkA : (util : Str) -> A = regA ; mkA : (util : Str) -> A = regA ;
mkA : (lleig,lletja : Str) -> A = mk2A ; mkA : (lleig,lletja : Str) -> A = mk2A ;
mkA : (fort,forta,forts,fortes,fortament : Str) -> A = mk5A ; mkA : (fort,forta,forts,fortes,fortament : Str) -> A = mk5A ;
mkA : (bo : A) -> (millor : A) -> A = mkADeg ; mkA : (bo : A) -> (millor : A) -> A = mkADeg ;
mkA : A -> CopulaType -> A = adjCopula ;
} ; } ;
mk5A : (fort,forta,forts,fortes,fortament : Str) -> A ; mk5A : (fort,forta,forts,fortes,fortament : Str) -> A ;
@@ -504,8 +513,12 @@ oper
mkADeg : A -> A -> A ; mkADeg : A -> A -> A ;
compADeg : A -> A ; compADeg : A -> A ;
regADeg : Str -> A ; regADeg : Str -> A ;
prefA : A -> A ; prefA : overload {
prefA : A -> A ; -- gran
prefA : (bo,bon : Str) -> A -- predicative masc, attributive masc
} ;
prefixA = prefA ; prefixA = prefA ;
adjCopula a cop = a ** {copTyp = cop} ;
mkV = overload { mkV = overload {
mkV : (cantar : Str) -> V = \x -> verbV (regV x) ; mkV : (cantar : Str) -> V = \x -> verbV (regV x) ;
@@ -521,7 +534,7 @@ oper
mkV2 = overload { mkV2 = overload {
mkV2 : Str -> V2 = \s -> dirV2 (mkV s) ; mkV2 : Str -> V2 = \s -> dirV2 (mkV s) ;
mkV2 : V -> V2 = dirV2 ; mkV2 : V -> V2 = dirV2 ;
mkV2 : V -> Prep -> V2 = mk2V2 mkV2 : V -> Prep -> V2 = mk2V2
} ; } ;
mk2V2 : V -> Prep -> V2 ; mk2V2 : V -> Prep -> V2 ;

View File

@@ -455,6 +455,9 @@ mkInterj : Str -> Interj
mkOrd : Str -> Ord = \x -> lin Ord { s = regGenitiveS x}; mkOrd : Str -> Ord = \x -> lin Ord { s = regGenitiveS x};
invarA : Str -> A ;
invarA a = mkAdjective a a a a ;
mk2A a b = mkAdjective a a a b ; mk2A a b = mkAdjective a a a b ;
regA a = case a of { regA a = case a of {
_ + ("a" | "e" | "i" | "o" | "u" | "y") + ? + _ + _ + ("a" | "e" | "i" | "o" | "u" | "y") + ? + _ +

View File

@@ -45,8 +45,8 @@ lin
s1 = heading1 (nounHeading adjective_Category).s ; s1 = heading1 (nounHeading adjective_Category).s ;
s2 = frameTable ( s2 = frameTable (
tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter)) ++ tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter)) ++
tr (th (heading masculine_Parameter) ++ td (adj.s ! Posit ! (AF Masc Sg)) ++ td (adj.s ! Posit ! (AF Masc Pl))) ++ tr (th (heading masculine_Parameter) ++ td (adj.s ! Posit ! (genNum2Aform Masc Sg)) ++ td (adj.s ! Posit ! (genNum2Aform Masc Pl))) ++
tr (th (heading feminine_Parameter) ++ td (adj.s ! Posit ! (AF Fem Sg)) ++ td (adj.s ! Posit ! (AF Fem Pl))) tr (th (heading feminine_Parameter) ++ td (adj.s ! Posit ! (genNum2Aform Fem Sg)) ++ td (adj.s ! Posit ! (genNum2Aform Fem Pl)))
) )
} ; } ;

View File

@@ -18,7 +18,7 @@ lin
bad_A = prefA (mkADeg (regA "mauvais") (regA "pire")) ; bad_A = prefA (mkADeg (regA "mauvais") (regA "pire")) ;
bank_N = regGenN "banque" feminine ; bank_N = regGenN "banque" feminine ;
beautiful_A = beautiful_A =
prefA (compADeg (mkA (pre {voyelle => "bel" ; _ => "beau" }) "belle" "beaux" "bellement")) ; prefA (compADeg (mkA "beau" "bel" "beaux" "belle" "bellement")) ;
become_VA = mkVA devenir_V ; become_VA = mkVA devenir_V ;
beer_N = regGenN "bière" feminine ; beer_N = regGenN "bière" feminine ;
beg_V2V = mkV2V (regV "demander") accusative dative ; beg_V2V = mkV2V (regV "demander") accusative dative ;
@@ -129,11 +129,11 @@ lin
music_N = regGenN "musique" feminine ; music_N = regGenN "musique" feminine ;
narrow_A = regA "étroit" ; narrow_A = regA "étroit" ;
new_A = new_A =
prefA (compADeg (mkA (pre {voyelle => "nouvel" ; _ => "nouveau" }) "nouvelle" "nouveaux" "nouvellement")) ; prefA (compADeg (mkA "nouveau" "nouvel" "nouveaux" "nouvelle" "nouvellement")) ;
newspaper_N = regGenN "journal" masculine ; newspaper_N = regGenN "journal" masculine ;
oil_N = regGenN "huile" feminine ; oil_N = regGenN "huile" feminine ;
old_A = old_A =
prefA (compADeg (mkA (pre {voyelle => "vieil" ; _ => "vieux" }) "vieille" "vieux" "vieillement")) ; prefA (compADeg (mkA "vieux" "vieil" "vieux" "vieille" "vieillement")) ;
open_V2 = ouvrir_V2 ; open_V2 = ouvrir_V2 ;
paint_V2A = mkV2A (v2V peindre_V2) accusative (mkPrep "en") ; paint_V2A = mkV2A (v2V peindre_V2) accusative (mkPrep "en") ;
paper_N = regGenN "papier" masculine ; paper_N = regGenN "papier" masculine ;

View File

@@ -72,14 +72,19 @@ oper
-- Adjectives are conveniently seen as gender-dependent nouns. -- Adjectives are conveniently seen as gender-dependent nouns.
-- Here are some patterns. First one that describes the worst case. -- Here are some patterns. First one that describes the worst case.
mkAdj : (_,_,_,_ : Str) -> Adj = \vieux,vieuxs,vieille,vieillement -> mkAdj' : (_,_,_,_,_ : Str) -> Adj ;
{s = table { mkAdj' vieux vieil vieuxs vieille vieillement = {
AF Masc n => numForms vieux vieuxs ! n ; s = table {
AF Fem n => nomReg vieille ! n ; ASg Masc _ => pre {#voyelle => vieil ; "h" => vieil ; _ => vieux} ;
AA => vieillement ASg Fem _ => vieille ;
} APl g => genForms vieuxs (vieille + "s") ! g ;
AA => vieillement
}
} ; } ;
mkAdj : (_,_,_,_ : Str) -> Adj ;
mkAdj bleu bleus bleue bleuement = mkAdj' bleu bleu bleus bleue bleuement ;
-- Then the regular and invariant patterns. -- Then the regular and invariant patterns.
adjReg : Str -> Gender => Number => Str = \bu -> table { adjReg : Str -> Gender => Number => Str = \bu -> table {

View File

@@ -160,15 +160,21 @@ oper
mkA : (banal,banale,banaux : Str) -> A ; mkA : (banal,banale,banaux : Str) -> A ;
-- This is the worst-case paradigm for the positive forms. -- This is the worst-case paradigm for the positive forms, except for "vieux/vieil".
mkA : (banal,banale,banaux,banalement : Str) -> A ; -- worst-case adjective mkA : (banal,banale,banaux,banalement : Str) -> A ; -- almost worst-case adjective
-- This is the worst-case paradigm for the positive forms, used for "vieux/vieil".
mkA : (vieux,vieil,vieille,vieuxs,vieuxment : Str) -> A ; -- worst-case adjetive
-- If comparison forms are irregular (i.e. not formed by "plus", e.g. -- If comparison forms are irregular (i.e. not formed by "plus", e.g.
-- "bon-meilleur"), the positive and comparative can be given as separate -- "bon-meilleur"), the positive and comparative can be given as separate
-- adjectives. -- adjectives.
mkA : A -> A -> A -- irregular comparison, e.g. bon-meilleur mkA : A -> A -> A ; -- irregular comparison, e.g. bon-meilleur
mkA : A -> CopulaType -> A -- force copula type
} ; } ;
-- The functions create by default postfix adjectives. To switch -- The functions create by default postfix adjectives. To switch
@@ -387,9 +393,11 @@ oper
mkPN : N -> PN = \x -> lin PN {s = x.s ! Sg ; g = x.g} ; mkPN : N -> PN = \x -> lin PN {s = x.s ! Sg ; g = x.g} ;
} ; } ;
mk4A a b c d = compADeg {s = \\_ => (mkAdj a c b d).s ; isPre = False ; lock_A = <>} ; mk4A a b c d = mk5A a a b c d ;
regA a = compADeg {s = \\_ => (mkAdjReg a).s ; isPre = False ; lock_A = <>} ; mk5A a b c d e = compADeg {s = \\_ => (mkAdj' a b c d e).s ; isPre = False ; copTyp = serCopula ; lock_A = <>} ;
prefA a = {s = a.s ; isPre = True ; lock_A = <>} ; regA a = compADeg {s = \\_ => (mkAdjReg a).s ; isPre = False ; copTyp = serCopula ; lock_A = <>} ;
prefA a = {s = a.s ; isPre = True ; copTyp = a.copTyp ; lock_A = <>} ;
adjCopula a cop = a ** {copTyp = cop} ;
mkA2 a p = a ** {c2 = p ; lock_A2 = <>} ; mkA2 a p = a ** {c2 = p ; lock_A2 = <>} ;
@@ -398,10 +406,12 @@ oper
mkA : (sec,seche : Str) -> A = \sec,seche -> mk4A sec seche (sec + "s") (seche + "ment") ; mkA : (sec,seche : Str) -> A = \sec,seche -> mk4A sec seche (sec + "s") (seche + "ment") ;
mkA : (banal,banale,banaux : Str) -> A = \sec,seche,secs -> mk4A sec seche secs (seche + "ment") ; mkA : (banal,banale,banaux : Str) -> A = \sec,seche,secs -> mk4A sec seche secs (seche + "ment") ;
mkA : (banal,banale,banaux,banalement : Str) -> A = mk4A ; mkA : (banal,banale,banaux,banalement : Str) -> A = mk4A ;
mkA : A -> A -> A = mkADeg mkA : (vieux,vieil,vieille,vieuxs,vieuxment : Str) -> A = mk5A ;
mkA : A -> A -> A = mkADeg ;
mkA : A -> CopulaType -> A = adjCopula ;
}; };
prefixA a = {s = a.s ; isPre = True ; lock_A = <>} ; prefixA a = {s = a.s ; isPre = True ; copTyp = a.copTyp ; lock_A = <>} ;
mkAdv x = ss x ** {lock_Adv = <>} ; mkAdv x = ss x ** {lock_Adv = <>} ;
mkAdV x = ss x ** {lock_AdV = <>} ; mkAdV x = ss x ** {lock_AdV = <>} ;
@@ -471,16 +481,18 @@ oper
regA : Str -> A ; regA : Str -> A ;
mk4A : (banal,banale,banaux,banalement : Str) -> A ; mk4A : (banal,banale,banaux,banalement : Str) -> A ;
mk5A : (vieux,vieil,vieille,vieuxs,vieuxment : Str) -> A ; -- worst-case adjetive
prefA : A -> A ; prefA : A -> A ;
adjCopula : A -> CopulaType -> A ;
mkADeg a b = mkADeg a b =
{s = table {Posit => a.s ! Posit ; _ => b.s ! Posit} ; isPre = a.isPre ; lock_A = <>} ; {s = table {Posit => a.s ! Posit ; _ => b.s ! Posit} ; isPre = a.isPre ; copTyp = a.copTyp ; lock_A = <>} ;
compADeg a = compADeg a =
{s = table {Posit => a.s ! Posit ; _ => \\f => "plus" ++ a.s ! Posit ! f} ; {s = table {Posit => a.s ! Posit ; _ => \\f => "plus" ++ a.s ! Posit ! f} ;
isPre = a.isPre ; isPre = a.isPre ;
copTyp = a.copTyp ;
lock_A = <>} ; lock_A = <>} ;
prefA a = {s = a.s ; isPre = True ; lock_A = <>} ;
mkV = overload { mkV = overload {
mkV : Str -> V = regV ; mkV : Str -> V = regV ;

View File

@@ -13,9 +13,9 @@ in {
lin backen_V = irregV "backen" "bäckt" "backt" "backt" "gebacken" ; lin backen_V = irregV "backen" "bäckt" "backt" "backt" "gebacken" ;
lin backen_u_V = irregV "backen" "bäckt" "buk" "buke" "gebacken" ; lin backen_u_V = irregV "backen" "bäckt" "buk" "buke" "gebacken" ;
lin befehlen_V = irregV "befehlen" "befiehlt" "befahl" "beföhle" "befähle)" ; lin befehlen_V = irregV "befehlen" "befiehlt" "befahl" "beföhle" "befähle" ;
lin beginnen_V = irregV "beginnen" "beginnt" "begann" "begönne" "begänne)" ; lin beginnen_V = irregV "beginnen" "beginnt" "begann" "begönne" "begänne" ;
lin beißen_V = irregV "beißen" "beißt" "biß" "bisse" "gebissen" ; lin beißen_V = irregV "beißen" "beißt" "biss" "bisse" "gebissen" ;
lin bergen_V = irregV "bergen" "birgt" "barg" "bärge" "geborgen" ; lin bergen_V = irregV "bergen" "birgt" "barg" "bärge" "geborgen" ;
lin bersten_V = irregV "bersten" "birst" "barst" "bärste" "geborsten" ; lin bersten_V = irregV "bersten" "birst" "barst" "bärste" "geborsten" ;
lin bewegen_V = irregV "bewegen" "bewegt" "bewog" "bewöge" "bewogen" ; lin bewegen_V = irregV "bewegen" "bewegt" "bewog" "bewöge" "bewogen" ;
@@ -23,7 +23,7 @@ in {
lin bieten_V = irregV "bieten" "bietet" "bot" "böte" "geboten" ; lin bieten_V = irregV "bieten" "bietet" "bot" "böte" "geboten" ;
lin binden_V = irregV "binden" "bindet" "band" "bände" "gebunden" ; lin binden_V = irregV "binden" "bindet" "band" "bände" "gebunden" ;
lin bitten_V = irregV "bitten" "bittet" "bat" "bäte" "gebeten" ; lin bitten_V = irregV "bitten" "bittet" "bat" "bäte" "gebeten" ;
lin blasen_V = irregV "blasen" "bläst" "blies" "bliese" "geblasen" ; lin blasen_V = irregV "blasen" "bläst" "blies" "bliese" "geblasen" ;
lin bleiben_V = irregV "bleiben" "bleibt" "blieb" "bliebe" "geblieben" ; lin bleiben_V = irregV "bleiben" "bleibt" "blieb" "bliebe" "geblieben" ;
lin braten_V = irregV "braten" "brät" "briet" "briete" "gebraten" ; lin braten_V = irregV "braten" "brät" "briet" "briete" "gebraten" ;
lin brechen_V = irregV "brechen" "bricht" "brach" "bräche" "gebrochen" ; lin brechen_V = irregV "brechen" "bricht" "brach" "bräche" "gebrochen" ;
@@ -52,8 +52,8 @@ in {
lin flechten_V = irregV "flechten" "flicht" "flocht" "flöchte" "geflochten" ; lin flechten_V = irregV "flechten" "flicht" "flocht" "flöchte" "geflochten" ;
lin fliegen_V = irregV "fliegen" "fliegt" "flog" "flöge" "geflogen" ; lin fliegen_V = irregV "fliegen" "fliegt" "flog" "flöge" "geflogen" ;
lin fliehen_V = irregV "fliehen" "flieht" "floh" "flöhe" "geflohen" ; lin fliehen_V = irregV "fliehen" "flieht" "floh" "flöhe" "geflohen" ;
lin fließen_V = irregV "fließen" "fließt" "floß" "flösse" "geflossen" ; lin fließen_V = irregV "fließen" "fließt" "floss" "flösse" "geflossen" ;
lin fressen_V = irregV "fressen" "frißt" "fraß" "fräße" "gefressen" ; lin fressen_V = irregV "fressen" "frisst" "fraß" "fräße" "gefressen" ;
lin frieren_V = irregV "frieren" "friert" "fror" "fröre" "gefroren" ; lin frieren_V = irregV "frieren" "friert" "fror" "fröre" "gefroren" ;
lin gären_V = irregV "gären" "gärt" "gärte" "göre" "gegoren" ; lin gären_V = irregV "gären" "gärt" "gärte" "göre" "gegoren" ;
lin gären_o_V = irregV "gären" "gärt" "gor" "göre" "gegoren" ; lin gären_o_V = irregV "gären" "gärt" "gor" "göre" "gegoren" ;
@@ -65,11 +65,11 @@ in {
lin gelten_V = irregV "gelten" "gilt" "galt" "galte" "gegolten" ; lin gelten_V = irregV "gelten" "gilt" "galt" "galte" "gegolten" ;
lin gelten_o_V = irregV "gelten" "gilt" "galt" "golte" "gegolten" ; lin gelten_o_V = irregV "gelten" "gilt" "galt" "golte" "gegolten" ;
lin genesen_V = irregV "genesen" "genest" "genas" "genäse" "genesen" ; lin genesen_V = irregV "genesen" "genest" "genas" "genäse" "genesen" ;
lin genießen_V = irregV "genießen" "genießt" "genoß" "genösse" "genossen" ; lin genießen_V = irregV "genießen" "genießt" "genoss" "genösse" "genossen" ;
lin geschehen_V = irregV "geschehen" "geschieht" "geschah" "geschehen" "geschähe" ; lin geschehen_V = irregV "geschehen" "geschieht" "geschah" "geschehen" "geschähe" ;
lin gewinnen_V = irregV "gewinnen" "gewinnt" "gewann" "gewänne" "gewonnen" ; lin gewinnen_V = irregV "gewinnen" "gewinnt" "gewann" "gewänne" "gewonnen" ;
lin gewinnen_o_V = irregV "gewinnen" "gewinnt" "gewann" "gewönne" "gewonnen" ; lin gewinnen_o_V = irregV "gewinnen" "gewinnt" "gewann" "gewönne" "gewonnen" ;
lin gießen_V = irregV "gießen" "gießt" "goß" "gösse" "gegossen" ; lin gießen_V = irregV "gießen" "gießt" "goss" "gösse" "gegossen" ;
lin gleichen_V = irregV "gleichen" "gleicht" "glich" "gliche" "geglichen" ; lin gleichen_V = irregV "gleichen" "gleicht" "glich" "gliche" "geglichen" ;
lin gleiten_V = irregV "gleiten" "gleitet" "glitt" "glitte" "geglitten" ; lin gleiten_V = irregV "gleiten" "gleitet" "glitt" "glitte" "geglitten" ;
lin glimmen_V = irregV "glimmen" "glimmt" "glomm" "glimmte" "glömme" ; lin glimmen_V = irregV "glimmen" "glimmt" "glomm" "glimmte" "glömme" ;
@@ -94,7 +94,7 @@ in {
lin kriechen_V = irregV "kriechen" "kriecht" "kroch" "kröche" "gekrochen" ; lin kriechen_V = irregV "kriechen" "kriecht" "kroch" "kröche" "gekrochen" ;
lin küren_V = irregV "küren" "kürt" "kürte" "kor" "gekürt" ; lin küren_V = irregV "küren" "kürt" "kürte" "kor" "gekürt" ;
lin laden_V = irregV "laden" "lädt" "lud" "lüde" "geladen" ; lin laden_V = irregV "laden" "lädt" "lud" "lüde" "geladen" ;
lin lassen_V = irregV "lassen" "läßt" "ließ" "ließe" "gelassen" ; lin lassen_V = irregV "lassen" "lässt" "ließ" "ließe" "gelassen" ;
lin laufen_V = irregV "laufen" "läuft" "lief" "liefe" "gelaufen" ; lin laufen_V = irregV "laufen" "läuft" "lief" "liefe" "gelaufen" ;
lin leiden_V = irregV "leiden" "leidt" "litt" "litte" "gelitten" ; lin leiden_V = irregV "leiden" "leidt" "litt" "litte" "gelitten" ;
lin leihen_V = irregV "leihen" "leiht" "lieh" "liehe" "geliehen" ; lin leihen_V = irregV "leihen" "leiht" "lieh" "liehe" "geliehen" ;
@@ -104,14 +104,15 @@ in {
lin mahlen_V = irregV "mahlen" "mahlt" "mahlte" "mahlte" "gemahlen" ; lin mahlen_V = irregV "mahlen" "mahlt" "mahlte" "mahlte" "gemahlen" ;
lin meiden_V = irregV "meiden" "meidt" "mied" "miede" "gemieden" ; lin meiden_V = irregV "meiden" "meidt" "mied" "miede" "gemieden" ;
lin melken_V = irregV "melken" "milkt" "molk" "mölke" "gemolken" ; lin melken_V = irregV "melken" "milkt" "molk" "mölke" "gemolken" ;
lin messen_V = irregV "messen" "mißt" "maß" "mäße" "gemessen" ; lin messen_V = irregV "messen" "misst" "maß" "mäße" "gemessen" ;
lin mißlingen_V = irregV "mißlingen" "mißlingt" "mißlang" "mißlungen" "mißlänge" ; lin mißlingen_V = irregV "misslingen" "misslingt" "misslang" "misslungen" "misslänge" ; -- old spelling
lin misslingen_V = irregV "misslingen" "misslingt" "misslang" "misslungen" "misslänge" ;
lin mögen_V = lin V (M.mkV "mögen" "mag" "magst" "mag" "mögt" "mög" lin mögen_V = lin V (M.mkV "mögen" "mag" "magst" "mag" "mögt" "mög"
"mochte" "mochtest" "mochten" "mochtet" "mochte" "mochtest" "mochten" "mochtet"
"möchte" "gemocht" [] M.VHaben) ; "möchte" "gemocht" [] M.VHaben) ;
lin müssen_V = lin V (M.mkV "müssen" "muß" "mußt" "muß" "müßt" "müß" lin müssen_V = lin V (M.mkV "müssen" "muss" "musst" "muss" "müsst" "müss"
"mußte" "mußtest" "mußten" "mußtet" "musste" "musstest" "mussten" "musstet"
"müßte" "gemußt" [] M.VHaben) ; "müsste" "gemusst" [] M.VHaben) ;
lin nehmen_V = mk6V "nehmen" "nimmt" "nimm" "nahm" "nähme" "genommen" ; lin nehmen_V = mk6V "nehmen" "nimmt" "nimm" "nahm" "nähme" "genommen" ;
lin nennen_V = irregV "nennen" "nennt" "nannte" "nennte" "genannt" ; lin nennen_V = irregV "nennen" "nennt" "nannte" "nennte" "genannt" ;
lin pfeifen_V = irregV "pfeifen" "pfeift" "pfiff" "pfiffe" "gepfiffen" ; lin pfeifen_V = irregV "pfeifen" "pfeift" "pfiff" "pfiffe" "gepfiffen" ;
@@ -119,7 +120,7 @@ in {
lin quellen_V = irregV "quellen" "quillt" "quoll" "quölle" "gequollen" ; lin quellen_V = irregV "quellen" "quillt" "quoll" "quölle" "gequollen" ;
lin raten_V = irregV "raten" "rät" "riet" "riete" "geraten" ; lin raten_V = irregV "raten" "rät" "riet" "riete" "geraten" ;
lin reiben_V = irregV "reiben" "reibt" "rieb" "riebe" "gerieben" ; lin reiben_V = irregV "reiben" "reibt" "rieb" "riebe" "gerieben" ;
lin reißen_V = irregV "reißen" "reißt" "riß" "riße" "gerissen" ; lin reißen_V = irregV "reißen" "reißt" "riss" "risse" "gerissen" ;
lin reiten_V = irregV "reiten" "reitet" "ritt" "ritte" "geritten" ; lin reiten_V = irregV "reiten" "reitet" "ritt" "ritte" "geritten" ;
lin rennen_V = irregV "rennen" "rennt" "rannte" "rennte" "gerannt" ; lin rennen_V = irregV "rennen" "rennt" "rannte" "rennte" "gerannt" ;
lin riechen_V = irregV "riechen" "riecht" "roch" "röche" "gerochen" ; lin riechen_V = irregV "riechen" "riecht" "roch" "röche" "gerochen" ;
@@ -132,20 +133,20 @@ in {
lin schaffen_V = irregV "schaffen" "schafft" "schuf" "schüfe" "geschaffen" ; lin schaffen_V = irregV "schaffen" "schafft" "schuf" "schüfe" "geschaffen" ;
lin scheiden_V = irregV "scheiden" "scheidt" "schied" "schiede" "geschieden" ; lin scheiden_V = irregV "scheiden" "scheidt" "schied" "schiede" "geschieden" ;
lin scheinen_V = irregV "scheinen" "scheint" "schien" "schiene" "geschienen" ; lin scheinen_V = irregV "scheinen" "scheint" "schien" "schiene" "geschienen" ;
lin scheißen_V = irregV "scheißen" "scheißt" "schiß" "schiße" "geschissen" ; lin scheißen_V = irregV "scheißen" "scheißt" "schiss" "schisse" "geschissen" ;
lin schelten_V = irregV "schelten" "schilt" "schalt" "schölte" "gescholten" ; lin schelten_V = irregV "schelten" "schilt" "schalt" "schölte" "gescholten" ;
lin scheren_V = irregV "scheren" "schert" "schor" "schöre" "geschoren" ; lin scheren_V = irregV "scheren" "schert" "schor" "schöre" "geschoren" ;
lin schieben_V = irregV "schieben" "schiebt" "schob" "schöbe" "geschoben" ; lin schieben_V = irregV "schieben" "schiebt" "schob" "schöbe" "geschoben" ;
lin schießen_V = irregV "schießen" "schießt" "schoß" "schösse" "geschossen" ; lin schießen_V = irregV "schießen" "schießt" "schoss" "schösse" "geschossen" ;
lin schinden_V = irregV "schinden" "schindt" "schund" "schunde" "geschunden" ; lin schinden_V = irregV "schinden" "schindt" "schund" "schunde" "geschunden" ;
lin schlafen_V = irregV "schlafen" "schläft" "schlief" "schliefe" "geschlafen" ; lin schlafen_V = irregV "schlafen" "schläft" "schlief" "schliefe" "geschlafen" ;
lin schlagen_V = irregV "schlagen" "schlägt" "schlug" "schlüge" "geschlagen" ; lin schlagen_V = irregV "schlagen" "schlägt" "schlug" "schlüge" "geschlagen" ;
lin schleichen_V = irregV "schleichen" "schleicht" "schlich" "schliche" "geschlichen" ; lin schleichen_V = irregV "schleichen" "schleicht" "schlich" "schliche" "geschlichen" ;
lin schleifen_V = irregV "schleifen" "schleift" "schliff" "schliffe" "geschliffen" ; lin schleifen_V = irregV "schleifen" "schleift" "schliff" "schliffe" "geschliffen" ;
lin schleißen_V = irregV "schleißen" "schleißt" "schliß" "schliß" "geschlissen" ; lin schleißen_V = irregV "schleißen" "schleißt" "schliss" "schliss" "geschlissen" ;
lin schließen_V = irregV "schließen" "schließt" "schloß" "schlösse" "geschlossen" ; lin schließen_V = irregV "schließen" "schließt" "schloss" "schlösse" "geschlossen" ;
lin schlingen_V = irregV "schlingen" "schlingt" "schlang" "schlünge" "geschlungen" ; lin schlingen_V = irregV "schlingen" "schlingt" "schlang" "schlünge" "geschlungen" ;
lin schmeißen_V = irregV "schmeißen" "schmeißt" "schmiß" "schmiße" "geschmissen" ; lin schmeißen_V = irregV "schmeißen" "schmeißt" "schmiss" "schmisse" "geschmissen" ;
lin schmelzen_V = irregV "schmelzen" "schmilzt" "schmolz" "schmölze" "geschmolzen" ; lin schmelzen_V = irregV "schmelzen" "schmilzt" "schmolz" "schmölze" "geschmolzen" ;
lin schneiden_V = irregV "schneiden" "schneidet" "schnitt" "schnitte" "geschnitten" ; lin schneiden_V = irregV "schneiden" "schneidet" "schnitt" "schnitte" "geschnitten" ;
lin schreiben_V = irregV "schreiben" "schreibt" "schrieb" "schriebe" "geschrieben" ; lin schreiben_V = irregV "schreiben" "schreibt" "schrieb" "schriebe" "geschrieben" ;
@@ -173,9 +174,9 @@ in {
lin speien_V = irregV "speien" "speit" "spie" "spie" "gespien" ; lin speien_V = irregV "speien" "speit" "spie" "spie" "gespien" ;
lin spinnen_V = irregV "spinnen" "spinnt" "spann" "spänne" "gesponnen" ; lin spinnen_V = irregV "spinnen" "spinnt" "spann" "spänne" "gesponnen" ;
lin spinnen_o_V = irregV "spinnen" "spinnt" "spann" "spönne" "gesponnen" ; lin spinnen_o_V = irregV "spinnen" "spinnt" "spann" "spönne" "gesponnen" ;
lin spleißen_V = irregV "spleißen" "spleißt" "spliß" "spliße" "gesplissen" ; lin spleißen_V = irregV "spleißen" "spleißt" "spliss" "splisse" "gesplissen" ;
lin sprechen_V = irregV "sprechen" "spricht" "sprach" "spräche" "gesprochen" ; lin sprechen_V = irregV "sprechen" "spricht" "sprach" "spräche" "gesprochen" ;
lin sprießen_V = irregV "sprießen" "sprießt" "sproß" "sprösse" "gesprossen" ; lin sprießen_V = irregV "sprießen" "sprießt" "spross" "sprösse" "gesprossen" ;
lin springen_V = irregV "springen" "springt" "sprang" "spränge" "gesprungen" ; lin springen_V = irregV "springen" "springt" "sprang" "spränge" "gesprungen" ;
lin stechen_V = irregV "stechen" "sticht" "stach" "stäche" "gestochen" ; lin stechen_V = irregV "stechen" "sticht" "stach" "stäche" "gestochen" ;
lin stehen_V = irregV "stehen" "steht" "stand" "stände" "gestanden" ; lin stehen_V = irregV "stehen" "steht" "stand" "stände" "gestanden" ;
@@ -200,7 +201,7 @@ in {
"tat" "tatest" "taten" "tatet" "tat" "tatest" "taten" "tatet"
"täte" "getan" [] M.VHaben) ; "täte" "getan" [] M.VHaben) ;
lin verderben_V = irregV "verderben" "verdirbt" "verdarb" "verdarbe" "verdorben" ; lin verderben_V = irregV "verderben" "verdirbt" "verdarb" "verdarbe" "verdorben" ;
lin vergessen_V = irregV "vergessen" "vergißt" "vergaß" "vergäße" "vergessen" ; lin vergessen_V = irregV "vergessen" "vergisst" "vergaß" "vergäße" "vergessen" ;
lin verlieren_V = irregV "verlieren" "verliert" "verlor" "verlöre" "verloren" ; lin verlieren_V = irregV "verlieren" "verliert" "verlor" "verlöre" "verloren" ;
lin wachsen_V = irregV "wachsen" "wächst" "wuchs" "wüchse" "gewachsen" ; lin wachsen_V = irregV "wachsen" "wächst" "wuchs" "wüchse" "gewachsen" ;
lin wägen_V = irregV "wägen" "wägt" "wog" "woge" "gewogen" ; lin wägen_V = irregV "wägen" "wägt" "wog" "woge" "gewogen" ;
@@ -229,4 +230,28 @@ in {
lin ziehen_V = irregV "ziehen" "zieht" "zog" "zöge" "gezogen" ; lin ziehen_V = irregV "ziehen" "zieht" "zog" "zöge" "gezogen" ;
lin zwingen_V = irregV "zwingen" "zwingt" "zwang" "zwänge" "gezwungen" ; lin zwingen_V = irregV "zwingen" "zwingt" "zwang" "zwänge" "gezwungen" ;
-- old spellings, before the German orthography reform
-- see https://en.wikipedia.org/wiki/German_orthography_reform_of_1996
lin beißen_old_V = irregV "beißen" "beißt" "biß" "bisse" "gebissen" ;
lin fließen_old_V = irregV "fließen" "fließt" "floß" "flösse" "geflossen" ;
lin fressen_old_V = irregV "fressen" "frißt" "fraß" "fräße" "gefressen" ;
lin genießen_old_V = irregV "genießen" "genießt" "genoß" "genösse" "genossen" ;
lin gießen_old_V = irregV "gießen" "gießt" "goß" "gösse" "gegossen" ;
lin lassen_old_V = irregV "lassen" "läßt" "ließ" "ließe" "gelassen" ;
lin messen_old_V = irregV "messen" "mißt" "maß" "mäße" "gemessen" ;
lin mißlingen_old_V = irregV "mißlingen" "mißlingt" "mißlang" "mißlungen" "mißlänge" ;
lin müssen_old_V = lin V (M.mkV "müssen" "muß" "mußt" "muß" "müßt" "müß"
"mußte" "mußtest" "mußten" "mußtet"
"müßte" "gemußt" [] M.VHaben) ;
lin reißen_old_V = irregV "reißen" "reißt" "riß" "riße" "gerissen" ;
lin scheißen_old_V = irregV "scheißen" "scheißt" "schiß" "schiße" "geschissen" ;
lin schießen_old_V = irregV "schießen" "schießt" "schoß" "schösse" "geschossen" ;
lin schleißen_old_V = irregV "schleißen" "schleißt" "schliß" "schliß" "geschlissen" ;
lin schließen_old_V = irregV "schließen" "schließt" "schloß" "schlösse" "geschlossen" ;
lin schmeißen_old_V = irregV "schmeißen" "schmeißt" "schmiß" "schmiße" "geschmissen" ;
lin spleißen_old_V = irregV "spleißen" "spleißt" "spliß" "spliße" "gesplissen" ;
lin sprießen_old_V = irregV "sprießen" "sprießt" "sproß" "sprösse" "gesprossen" ;
lin vergessen_old_V = irregV "vergessen" "vergißt" "vergaß" "vergäße" "vergessen" ;
} }

View File

@@ -89,7 +89,8 @@ abstract IrregGerAbs = Cat ** {
fun meiden_V : V ; fun meiden_V : V ;
fun melken_V : V ; fun melken_V : V ;
fun messen_V : V ; fun messen_V : V ;
fun mißlingen_V : V ; fun mißlingen_V : V ; -- old spelling
fun misslingen_V : V ;
fun mögen_V : V ; fun mögen_V : V ;
fun müssen_V : V ; fun müssen_V : V ;
fun nehmen_V : V ; fun nehmen_V : V ;
@@ -193,4 +194,27 @@ abstract IrregGerAbs = Cat ** {
fun zeihen_V : V ; fun zeihen_V : V ;
fun ziehen_V : V ; fun ziehen_V : V ;
fun zwingen_V : V ; fun zwingen_V : V ;
-- old spellings, before the German orthography reform
-- see https://en.wikipedia.org/wiki/German_orthography_reform_of_1996
fun beißen_old_V : V ;
fun fließen_old_V : V ;
fun fressen_old_V : V ;
fun genießen_old_V : V ;
fun gießen_old_V : V ;
fun lassen_old_V : V ;
fun messen_old_V : V ;
fun mißlingen_old_V : V ;
fun müssen_old_V : V ;
fun reißen_old_V : V ;
fun scheißen_old_V : V ;
fun schießen_old_V : V ;
fun schleißen_old_V : V ;
fun schließen_old_V : V ;
fun schmeißen_old_V : V ;
fun spleißen_old_V : V ;
fun sprießen_old_V : V ;
fun vergessen_old_V : V ;
} }

View File

@@ -1,6 +1,6 @@
--# -path=.:../abstract:../common --# -path=.:../abstract:../common
incomplete concrete DocumentationItaFunctor of Documentation = CatIta ** open incomplete concrete DocumentationItaFunctor of Documentation = CatIta ** open
Terminology, -- the interface to be instantiated Terminology, -- the interface to be instantiated
ResIta, ResIta,
CommonRomance, CommonRomance,
@@ -19,22 +19,22 @@ lincat
Definition = {s : Str} ; Definition = {s : Str} ;
Document = {s : Str} ; Document = {s : Str} ;
Tag = {s : Str} ; Tag = {s : Str} ;
{- {-
-} --# notpresent -} --# notpresent
oper oper
heading : N -> Str = \n -> (nounHeading n).s ; heading : N -> Str = \n -> (nounHeading n).s ;
lin lin
InflectionN, InflectionN3, InflectionN3 = \noun -> { InflectionN, InflectionN3, InflectionN3 = \noun -> {
t = "n" ; t = "n" ;
s1 = heading1 (heading noun_Category ++ s1 = heading1 (heading noun_Category ++
case noun.g of { case noun.g of {
Masc => "("+heading masculine_Parameter+")" ; Masc => "("+heading masculine_Parameter+")" ;
Fem => "("+heading feminine_Parameter+")" Fem => "("+heading feminine_Parameter+")"
}) ; }) ;
s2 = frameTable ( s2 = frameTable (
tr (th (heading singular_Parameter) ++ th (heading plural_Parameter)) ++ tr (th (heading singular_Parameter) ++ th (heading plural_Parameter)) ++
tr (td (noun.s ! Sg) ++ td (noun.s ! Pl)) tr (td (noun.s ! Sg) ++ td (noun.s ! Pl))
) )
@@ -45,8 +45,8 @@ lin
s1 = heading1 (nounHeading adjective_Category).s ; s1 = heading1 (nounHeading adjective_Category).s ;
s2 = frameTable ( s2 = frameTable (
tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter)) ++ tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter)) ++
tr (th (heading masculine_Parameter) ++ td (adj.s ! Posit ! (AF Masc Sg)) ++ td (adj.s ! Posit ! (AF Masc Pl))) ++ tr (th (heading masculine_Parameter) ++ td (adj.s ! Posit ! (genNum2Aform Masc Sg)) ++ td (adj.s ! Posit ! (genNum2Aform Masc Pl))) ++
tr (th (heading feminine_Parameter) ++ td (adj.s ! Posit ! (AF Fem Sg)) ++ td (adj.s ! Posit ! (AF Fem Pl))) tr (th (heading feminine_Parameter) ++ td (adj.s ! Posit ! (genNum2Aform Fem Sg)) ++ td (adj.s ! Posit ! (genNum2Aform Fem Pl)))
) )
} ; } ;
@@ -142,23 +142,23 @@ lin
MkDocument d i e = ss (i.s1 ++ d.s ++ i.s2 ++ paragraph e.s) ; -- explanation appended in a new paragraph MkDocument d i e = ss (i.s1 ++ d.s ++ i.s2 ++ paragraph e.s) ; -- explanation appended in a new paragraph
MkTag i = ss i.t ; MkTag i = ss i.t ;
oper oper
verbExample : CatIta.Cl -> Str = \cl -> verbExample : CatIta.Cl -> Str = \cl ->
(S.mkUtt cl).s (S.mkUtt cl).s
++ ";" ++ (S.mkUtt (S.mkS S.anteriorAnt cl)).s --# notpresent ++ ";" ++ (S.mkUtt (S.mkS S.anteriorAnt cl)).s --# notpresent
; ;
inflVerb : Verb -> Str = \verb -> inflVerb : Verb -> Str = \verb ->
let let
vfin : CommonRomance.VF -> Str = \f -> vfin : CommonRomance.VF -> Str = \f ->
verb.s ! f ; verb.s ! f ;
ttable : TMood -> Str = \tense -> ttable : TMood -> Str = \tense ->
frameTable ( frameTable (
tr (th "" ++ tr (th "" ++
th (heading singular_Parameter) ++ th (heading singular_Parameter) ++
th (heading plural_Parameter)) ++ th (heading plural_Parameter)) ++
tr (th "1.p" ++ tr (th "1.p" ++
td (vfin (VFin tense Sg P1)) ++ td (vfin (VFin tense Sg P1)) ++
td (vfin (VFin tense Pl P1))) ++ td (vfin (VFin tense Pl P1))) ++
tr (th "2.p" ++ tr (th "2.p" ++
@@ -171,11 +171,11 @@ oper
ttable2 : (Mood -> TMood) -> Str = \f -> ttable2 : (Mood -> TMood) -> Str = \f ->
frameTable ( frameTable (
tr (intagAttr "th" "colspan=2" "" ++ tr (intagAttr "th" "colspan=2" "" ++
th (heading indicative_Parameter) ++ th (heading indicative_Parameter) ++
th (heading conjunctive_Parameter)) ++ th (heading conjunctive_Parameter)) ++
tr (intagAttr "th" "rowspan=3" (heading singular_Parameter) ++ tr (intagAttr "th" "rowspan=3" (heading singular_Parameter) ++
th "1.p" ++ th "1.p" ++
td (vfin (VFin (f Indic) Sg P1)) ++ td (vfin (VFin (f Indic) Sg P1)) ++
td (vfin (VFin (f Conjunct) Sg P1))) ++ td (vfin (VFin (f Conjunct) Sg P1))) ++
tr (th "2.p" ++ tr (th "2.p" ++
@@ -183,7 +183,7 @@ oper
td (vfin (VFin (f Conjunct) Sg P2))) ++ td (vfin (VFin (f Conjunct) Sg P2))) ++
tr (th "3.p" ++ tr (th "3.p" ++
td (vfin (VFin (f Indic) Sg P3)) ++ td (vfin (VFin (f Indic) Sg P3)) ++
td (vfin (VFin (f Conjunct) Sg P3))) ++ td (vfin (VFin (f Conjunct) Sg P3))) ++
tr (intagAttr "th" "rowspan=3" (heading plural_Parameter) ++ tr (intagAttr "th" "rowspan=3" (heading plural_Parameter) ++
th "1.p" ++ th "1.p" ++
td (vfin (VFin (f Indic) Pl P1)) ++ td (vfin (VFin (f Indic) Pl P1)) ++
@@ -191,7 +191,7 @@ oper
tr (th "2.p" ++ tr (th "2.p" ++
td (vfin (VFin (f Indic) Pl P2)) ++ td (vfin (VFin (f Indic) Pl P2)) ++
td (vfin (VFin (f Conjunct) Pl P2))) ++ td (vfin (VFin (f Conjunct) Pl P2))) ++
tr (th "3.p" ++ tr (th "3.p" ++
td (vfin (VFin (f Indic) Pl P3)) ++ td (vfin (VFin (f Indic) Pl P3)) ++
td (vfin (VFin (f Conjunct) Pl P3))) td (vfin (VFin (f Conjunct) Pl P3)))
) ; ) ;
@@ -210,17 +210,17 @@ oper
paragraph (vfin (VInfin False)) ++ paragraph (vfin (VInfin False)) ++
heading2 (heading imperative_Parameter) ++ heading2 (heading imperative_Parameter) ++
frameTable ( frameTable (
tr (th "sg.2.p" ++ td (vfin (VImper SgP2))) ++ tr (th "sg.2.p" ++ td (vfin (VImper SgP2))) ++
tr (th "pl.1.p" ++ td (vfin (VImper PlP1))) ++ tr (th "pl.1.p" ++ td (vfin (VImper PlP1))) ++
tr (th "pl.2.p" ++ td (vfin (VImper PlP2))) tr (th "pl.2.p" ++ td (vfin (VImper PlP2)))
) ++ ) ++
heading2 (heading participle_Parameter) ++ heading2 (heading participle_Parameter) ++
frameTable ( frameTable (
tr (th (heading past_Parameter) ++ td (vfin (VPart Masc Sg))) ++ tr (th (heading past_Parameter) ++ td (vfin (VPart Masc Sg))) ++
tr (th (heading present_Parameter) ++ td (vfin VGer)) tr (th (heading present_Parameter) ++ td (vfin VGer))
) ; ) ;
{- --# notpresent {- --# notpresent
-} -}
} }

View File

@@ -15,7 +15,7 @@ oper
mkPredet = overload { mkPredet = overload {
mkPredet : A -> Predet = \adj -> lin Predet { mkPredet : A -> Predet = \adj -> lin Predet {
s = \\a,c => prepCase c ++ adj.s ! Posit ! AF a.g a.n ; s = \\a,c => prepCase c ++ adj.s ! Posit ! genNum2Aform a.g a.n ;
c = Nom ; c = Nom ;
a = PNoAg a = PNoAg
} ; } ;

View File

@@ -78,10 +78,12 @@ oper
mkAdj : (_,_,_,_,_ : Str) -> Adj = \solo,sola,soli,sole,solamente -> mkAdj : (_,_,_,_,_ : Str) -> Adj = \solo,sola,soli,sole,solamente ->
{s = table { {s = table {
AF Masc n => numForms solo soli ! n ; ASg Masc _ => solo ;
AF Fem n => numForms sola sole ! n ; ASg Fem _ => sola ;
AA => solamente APl Masc => soli ;
} APl Fem => sole ;
AA => solamente
}
} ; } ;
-- Then the regular and invariant patterns. -- Then the regular and invariant patterns.
@@ -189,6 +191,6 @@ oper
-- Determiners, traditionally called indefinite pronouns, are inflected -- Determiners, traditionally called indefinite pronouns, are inflected
-- in gender and number, like adjectives. -- in gender and number, like adjectives.
pronForms : Adj -> Gender -> Number -> Str = \tale,g,n -> tale.s ! AF g n ; pronForms : Adj -> Gender -> Number -> Str = \tale,g,n -> tale.s ! genNum2Aform g n ;
} }

View File

@@ -165,7 +165,9 @@ oper
-- With irregular comparison, there are as it were two adjectives: -- With irregular comparison, there are as it were two adjectives:
-- the positive ("buono") and the comparative ("migliore"). -- the positive ("buono") and the comparative ("migliore").
mkA : A -> A -> A -- special comparison, e.g. buono - migliore mkA : A -> A -> A ; -- special comparison, e.g. buono - migliore
mkA : A -> CopulaType -> A -- force copula type
} ; } ;
-- All the functions above create postfix adjectives. To switch -- All the functions above create postfix adjectives. To switch
@@ -367,18 +369,19 @@ oper
makeNP x g n = {s = (pn2np (mk2PN x g)).s; a = agrP3 g n ; hasClit = False ; isPol = False ; isNeg = False} ** {lock_NP = <>} ; makeNP x g n = {s = (pn2np (mk2PN x g)).s; a = agrP3 g n ; hasClit = False ; isPol = False ; isNeg = False} ** {lock_NP = <>} ;
mk5A a b c d e = mk5A a b c d e =
compADeg {s = \\_ => (mkAdj a b c d e).s ; isPre = False ; lock_A = <>} ; compADeg {s = \\_ => (mkAdj a b c d e).s ; isPre = False ; copTyp = serCopula ; lock_A = <>} ;
regA a = compADeg {s = \\_ => (mkAdjReg a).s ; isPre = False ; lock_A = <>} ; regA a = compADeg {s = \\_ => (mkAdjReg a).s ; isPre = False ; copTyp = serCopula ; lock_A = <>} ;
prefA a = {s = a.s ; isPre = True ; lock_A = <>} ; prefA a = {s = a.s ; isPre = True ; copTyp = a.copTyp ; lock_A = <>} ;
adjCopula a cop = a ** {copTyp = cop} ;
mkA2 a p = a ** {c2 = p ; lock_A2 = <>} ; mkA2 a p = a ** {c2 = p ; lock_A2 = <>} ;
mkADeg a b = mkADeg a b =
{s = table {Posit => a.s ! Posit ; _ => b.s ! Posit} ; {s = table {Posit => a.s ! Posit ; _ => b.s ! Posit} ;
isPre = a.isPre ; lock_A = <>} ; isPre = a.isPre ; copTyp = serCopula ; lock_A = <>} ;
compADeg a = compADeg a =
{s = table {Posit => a.s ! Posit ; _ => \\f => "più" ++ a.s ! Posit ! f} ; {s = table {Posit => a.s ! Posit ; _ => \\f => "più" ++ a.s ! Posit ! f} ;
isPre = a.isPre ; isPre = a.isPre ; copTyp = a.copTyp ;
lock_A = <>} ; lock_A = <>} ;
regADeg a = compADeg (regA a) ; regADeg a = compADeg (regA a) ;
@@ -510,11 +513,13 @@ oper
mkA = overload { mkA = overload {
mkA : (bianco : Str) -> A = regA ; mkA : (bianco : Str) -> A = regA ;
mkA : (solo,sola,soli,sole, solamente : Str) -> A = mk5A ; mkA : (solo,sola,soli,sole, solamente : Str) -> A = mk5A ;
mkA : A -> A -> A = mkADeg mkA : A -> A -> A = mkADeg ;
mkA : A -> CopulaType -> A = adjCopula ;
} ; } ;
mk5A : (solo,sola,soli,sole, solamente : Str) -> A ; mk5A : (solo,sola,soli,sole, solamente : Str) -> A ;
regA : Str -> A ; regA : Str -> A ;
prefA : A -> A ; prefA : A -> A ;
adjCopula : A -> CopulaType -> A ;
mkADeg : A -> A -> A ; mkADeg : A -> A -> A ;
compADeg : A -> A ; compADeg : A -> A ;
regADeg : Str -> A ; regADeg : Str -> A ;

View File

@@ -45,8 +45,8 @@ lin
s1 = heading1 (nounHeading adjective_Category).s ; s1 = heading1 (nounHeading adjective_Category).s ;
s2 = frameTable ( s2 = frameTable (
tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter)) ++ tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter)) ++
tr (th (heading masculine_Parameter) ++ td (adj.s ! Posit ! (AF Masc Sg)) ++ td (adj.s ! Posit ! (AF Masc Pl))) ++ tr (th (heading masculine_Parameter) ++ td (adj.s ! Posit ! (genNum2Aform Masc Sg)) ++ td (adj.s ! Posit ! (genNum2Aform Masc Pl))) ++
tr (th (heading feminine_Parameter) ++ td (adj.s ! Posit ! (AF Fem Sg)) ++ td (adj.s ! Posit ! (AF Fem Pl))) tr (th (heading feminine_Parameter) ++ td (adj.s ! Posit ! (genNum2Aform Fem Sg)) ++ td (adj.s ! Posit ! (genNum2Aform Fem Pl)))
) )
} ; } ;

View File

@@ -127,7 +127,7 @@ concrete ExtendPor of Extend =
} ; } ;
ICompAP ap = { ICompAP ap = {
s =\\a => "o quão" ++ ap.s ! AF a.g a.n ; s =\\a => "o quão" ++ ap.s ! (genNum2Aform a.g a.n) ;
cop = serCopula cop = serCopula
} ; } ;
@@ -142,7 +142,8 @@ concrete ExtendPor of Extend =
lin lin
PresPartAP vp = { PresPartAP vp = {
s = \\af => gerVP vp (aform2aagr af ** {p = P3}) ; s = \\af => gerVP vp (aform2aagr af ** {p = P3}) ;
isPre = False isPre = False ;
copTyp = serCopula
} ; } ;
PastPartAP vps = pastPartAP vps [] ; PastPartAP vps = pastPartAP vps [] ;
@@ -165,12 +166,12 @@ concrete ExtendPor of Extend =
ComplBareVS = ComplVS ; ComplBareVS = ComplVS ;
AdjAsCN ap = { AdjAsCN ap = {
s =\\n => ap.s ! AF Masc n ; s =\\n => ap.s ! (genNum2Aform Masc n) ;
g = Masc g = Masc
} ; } ;
AdjAsNP ap = heavyNP { AdjAsNP ap = heavyNP {
s = \\_c => ap.s ! AF Masc Sg ; s = \\_c => ap.s ! ASg Masc APred ;
a = Ag Masc Sg P3 a = Ag Masc Sg P3
} ; } ;
@@ -178,7 +179,8 @@ concrete ExtendPor of Extend =
pastPartAP : VPSlash -> Str -> AP ; pastPartAP : VPSlash -> Str -> AP ;
pastPartAP vps agent = lin AP { pastPartAP vps agent = lin AP {
s = \\af => vps.comp ! (aform2aagr af ** {p = P3}) ++ vps.s.s ! VPart (aform2gender af) (aform2number af) ++ agent ; s = \\af => vps.comp ! (aform2aagr af ** {p = P3}) ++ vps.s.s ! VPart (aform2gender af) (aform2number af) ++ agent ;
isPre = False isPre = False ;
copTyp = serCopula
} ; } ;
passVPSlash : VPSlash -> Str -> VP ; passVPSlash : VPSlash -> Str -> VP ;
@@ -200,12 +202,11 @@ concrete ExtendPor of Extend =
} ; } ;
CompoundAP noun adj = { CompoundAP noun adj = {
s = \\af => case af of { s = \\af => case (aform2aagr af) of {
AF g n => adj.s ! Posit ! AF noun.g n ++ "de" ++ noun.s ! n ; {n = n} => adj.s ! Posit ! (genNum2Aform noun.g n) ++ "de" ++ noun.s ! n
-- do I need do(s)/da(s)?
_ => adj.s ! Posit ! AF noun.g Sg ++ "de" ++ noun.s ! Sg
} ; } ;
isPre = adj.isPre isPre = adj.isPre ;
copTyp = adj.copTyp
} ; } ;
GerundCN vp = { GerundCN vp = {

View File

@@ -21,7 +21,7 @@ concrete IdiomPor of Idiom = CatPor **
ExistNP np = ExistNP np =
mkClause [] True False (agrP3 Masc Sg) mkClause [] True False (agrP3 Masc Sg)
(insertComplement (\\_ => (np.s ! Acc).ton) (predV B.haver_V)) ; (insertComplement (\\_ => (np.s ! Acc).ton) (predV B.haver_V)) ;
ExistIP ip = { ExistIP ip = {
s = \\t,a,p,_ => s = \\t,a,p,_ =>
ip.s ! Nom ++ ip.s ! Nom ++
@@ -52,4 +52,12 @@ concrete IdiomPor of Idiom = CatPor **
mkImperative False P1 vp ! RPos ! Masc ! Pl ; --- fem mkImperative False P1 vp ! RPos ! Masc ! Pl ; --- fem
} ; } ;
} ImpP3 np vp = {
s = "deixe" ++ (np.s ! Nom).ton ++ infVP vp np.a ;
} ;
SelfAdvVP vp = vp ;
SelfAdVVP vp = vp ;
SelfNP np = np ;
} ;

View File

@@ -1,7 +1,7 @@
--# -path=.:../romance:../common:../abstract:../../prelude --# -path=.:../romance:../common:../abstract:../../prelude
concrete LexiconPor of Lexicon = CatPor ** open concrete LexiconPor of Lexicon = CatPor ** open
(M=MorphoPor), ParadigmsPor, BeschPor, Prelude in { (M=MorphoPor), ParadigmsPor, BeschPor, Prelude, (D = DiffPor) in {
flags flags
optimize=values ; optimize=values ;
@@ -39,7 +39,7 @@ lin
near_A = mkA "perto" ; near_A = mkA "perto" ;
new_A = prefA (mkA "novo") ; new_A = prefA (mkA "novo") ;
old_A = prefA (mkA "velho") ; old_A = prefA (mkA "velho") ;
ready_A = mkA "pronto" ; ready_A = adjCopula (mkA "pronto") D.estarCopula ;
red_A = mkA "vermelho" ; red_A = mkA "vermelho" ;
rotten_A = mkA "podre" ; rotten_A = mkA "podre" ;
round_A = mkA "redondo" ; round_A = mkA "redondo" ;
@@ -82,7 +82,7 @@ lin
belly_N = mkN "barriga" ; belly_N = mkN "barriga" ;
bike_N = mkN "bicicleta" ; bike_N = mkN "bicicleta" ;
bird_N = mkN "pássaro" ; bird_N = mkN "pássaro" ;
blood_N = mkN "sangue" nonExist ; blood_N = mkN "sangue" "sangues" ;
boat_N = mkN "bote" ; boat_N = mkN "bote" ;
bone_N = mkN "osso" ; bone_N = mkN "osso" ;
book_N = mkN "livro" ; book_N = mkN "livro" ;
@@ -113,7 +113,7 @@ lin
doctor_N = mkN "médico" ; -- médica doctor_N = mkN "médico" ; -- médica
dog_N = mkN "cachorro" ; -- cadela dog_N = mkN "cachorro" ; -- cadela
door_N = mkN "porta" ; door_N = mkN "porta" ;
dust_N = mkN "poeira" nonExist ; dust_N = mkN "poeira" "poeiras" ;
ear_N = mkN "orelha" ; ear_N = mkN "orelha" ;
earth_N = mkN "terra" ; earth_N = mkN "terra" ;
egg_N = mkN "ovo" ; egg_N = mkN "ovo" ;
@@ -125,7 +125,7 @@ lin
fingernail_N = mkN "unha" ; fingernail_N = mkN "unha" ;
fire_N = mkN "fogo" ; fire_N = mkN "fogo" ;
fish_N = mkN "peixe" ; fish_N = mkN "peixe" ;
floor_N = mkN "chão" nonExist ; -- piso floor_N = mkN "piso" "pisos" ; -- piso
flower_N = mkN "flor" feminine ; flower_N = mkN "flor" feminine ;
fog_N = mkN "névoa" ; fog_N = mkN "névoa" ;
foot_N = mkN "pé" ; foot_N = mkN "pé" ;
@@ -136,11 +136,11 @@ lin
garden_N = mkN "jardim" ; garden_N = mkN "jardim" ;
girl_N = mkN "menina" ; girl_N = mkN "menina" ;
glove_N = mkN "luva" ; glove_N = mkN "luva" ;
gold_N = mkN "ouro" nonExist ; gold_N = mkN "ouro" "ouros" ;
grammar_N = mkN "gramática" ; grammar_N = mkN "gramática" ;
grass_N = mkN "grama" nonExist ; grass_N = mkN "grama" "gramas" ;
guts_N = mkN "tripa" ; guts_N = mkN "tripa" ;
hair_N = mkN "cabelo" nonExist ; hair_N = mkN "cabelo" "cabelos" ;
hand_N = mkN "mão" "mãos" feminine ; hand_N = mkN "mão" "mãos" feminine ;
harbour_N = mkN "porto" ; harbour_N = mkN "porto" ;
hat_N = mkN "chapéu" ; hat_N = mkN "chapéu" ;
@@ -160,7 +160,7 @@ lin
lamp_N = mkN "lâmpada" ; lamp_N = mkN "lâmpada" ;
language_N = mkN "linguagem" ; language_N = mkN "linguagem" ;
leaf_N = mkN "folha" ; leaf_N = mkN "folha" ;
leather_N = mkN "couro" nonExist ; leather_N = mkN "couro" "couros" ;
leg_N = mkN "perna" ; leg_N = mkN "perna" ;
liver_N = mkN "fígado" ; liver_N = mkN "fígado" ;
louse_N = mkN "piolho" ; louse_N = mkN "piolho" ;
@@ -203,7 +203,7 @@ lin
rubber_N = mkN "borracha" ; rubber_N = mkN "borracha" ;
rule_N = mkN "regra" ; rule_N = mkN "regra" ;
salt_N = mkN "sal" ; salt_N = mkN "sal" ;
sand_N = mkN "areia" nonExist ; sand_N = mkN "areia" "areias" ;
school_N = mkN "escola" ; school_N = mkN "escola" ;
science_N = mkN "ciência" ; science_N = mkN "ciência" ;
sea_N = mkN "mar" ; sea_N = mkN "mar" ;
@@ -213,17 +213,17 @@ lin
shirt_N = mkN "camisa" ; shirt_N = mkN "camisa" ;
shoe_N = mkN "sapato" ; shoe_N = mkN "sapato" ;
shop_N = mkN "loja" ; shop_N = mkN "loja" ;
silver_N = mkN "prata" nonExist ; silver_N = mkN "prata" "pratas" ;
sister_N = mkN "irmã" ; sister_N = mkN "irmã" ;
skin_N = mkN "pele" feminine ; skin_N = mkN "pele" feminine ;
sky_N = mkN "céu" ; sky_N = mkN "céu" ;
smoke_N = mkN "fumaça" nonExist ; smoke_N = mkN "fumaça" "fumaças" ;
snake_N = mkN "cobra" ; snake_N = mkN "cobra" ;
snow_N = mkN "neve" nonExist feminine ; snow_N = mkN "neve" "neves" feminine ;
sock_N = mkN "meia" ; sock_N = mkN "meia" ;
song_N = mkN "canção" "canções" feminine ; song_N = mkN "canção" "canções" feminine ;
star_N = mkN "estrela" ; star_N = mkN "estrela" ;
steel_N = mkN "aço" nonExist ; steel_N = mkN "aço" "aços" ;
stick_N = mkN "bastão" "bastões" ; stick_N = mkN "bastão" "bastões" ;
stone_N = mkN "pedra" ; stone_N = mkN "pedra" ;
stove_N = mkN "forno" ; stove_N = mkN "forno" ;

View File

@@ -118,9 +118,9 @@ oper
mkAdj : (_,_,_,_,_ : Str) -> Adj = mkAdj : (_,_,_,_,_ : Str) -> Adj =
\burro,burra,burros,burras,burramente -> \burro,burra,burros,burras,burramente ->
{s = table { {s = table {
AF Masc n => numForms burro burros ! n ; ASg g _ => genForms burro burra ! g ;
AF Fem n => numForms burra burras ! n ; APl g => genForms burros burras ! g ;
AA => burramente AA => burramente
} }
} ; } ;
@@ -129,7 +129,8 @@ oper
adj = mkAdjReg aj adj = mkAdjReg aj
in { in {
s = table { s = table {
AF g n => adj.s ! AF g n ; ASg g _ => adj.s ! ASg g APred ;
APl g => adj.s ! APl g ;
AA => av AA => av
} }
} ; } ;
@@ -245,11 +246,11 @@ oper
-- inflected in gender and number, like adjectives. -- inflected in gender and number, like adjectives.
pronForms : Adj -> Gender -> Number -> Str = pronForms : Adj -> Gender -> Number -> Str =
\tale,g,n -> tale.s ! AF g n ; \tale,g,n -> tale.s ! (genNum2Aform g n) ;
mkOrdinal : A -> Ord = \adj -> mkOrdinal : A -> Ord = \adj ->
lin Ord { lin Ord {
s = \\ag => adj.s ! Posit ! AF ag.g ag.n ; s = \\ag => adj.s ! Posit ! (genNum2Aform ag.g ag.n) ;
} ; } ;
mkQuantifier : (esse,essa,esses,essas : Str) -> Quant = \esse,essa,esses,essas-> mkQuantifier : (esse,essa,esses,essas : Str) -> Quant = \esse,essa,esses,essas->

View File

@@ -184,10 +184,14 @@ oper
--2 Adjectives --2 Adjectives
compADeg : A -> A ; compADeg : A -> A ;
compADeg a = {s = table {Posit => a.s ! Posit ; compADeg a = lin A {
_ => \\f => "mais" ++ s = table {
a.s ! Posit ! f} ; Posit => a.s ! Posit ;
isPre = a.isPre ; lock_A = <>} ; _ => \\f => "mais" ++ a.s ! Posit ! f
} ;
isPre = a.isPre ;
copTyp = a.copTyp
} ;
{- superlADeg : A -> A ; {- superlADeg : A -> A ;
superlADeg a = {s = table {Posit => a.s ! Posit ; superlADeg a = {s = table {Posit => a.s ! Posit ;
@@ -200,24 +204,32 @@ oper
-- regADeg a = compADeg (regA a) ; -- regADeg a = compADeg (regA a) ;
regA : Str -> A ; regA : Str -> A ;
regA a = compADeg {s = \\_ => (mkAdjReg a).s ; isPre = False ; regA a = compADeg (lin A {s = \\_ => (mkAdjReg a).s ; isPre = False ; copTyp = serCopula}) ;
lock_A = <>} ;
mk2A : (único,unicamente : Str) -> A ; mk2A : (único,unicamente : Str) -> A ;
mk2A adj adv = compADeg {s = \\_ => (mkAdj2 adj adv).s ; isPre = False ; mk2A adj adv = compADeg {s = \\_ => (mkAdj2 adj adv).s ; isPre = False ;
copTyp = serCopula ;
lock_A = <>} ; lock_A = <>} ;
mk5A : (preto,preta,pretos,pretas,pretamente : Str) -> A ; mk5A : (preto,preta,pretos,pretas,pretamente : Str) -> A ;
mk5A a b c d e = compADeg {s = \\_ => (mkAdj a b c d e).s ; mk5A a b c d e = compADeg {s = \\_ => (mkAdj a b c d e).s ;
isPre = False ; lock_A = <>} ; isPre = False ; copTyp = serCopula ;
lock_A = <>} ;
adjCopula : A -> CopulaType -> A ;
adjCopula a cop = a ** {copTyp = cop} ;
mkADeg : A -> A -> A ; mkADeg : A -> A -> A ;
mkADeg a b = {s = table {Posit => a.s ! Posit ; mkADeg a b = lin A {
_ => b.s ! Posit s = table {
-- Compar => b.s ! Posit ; Posit => a.s ! Posit ;
-- Superl => "o" ++ b.s ! Posit ; _ => b.s ! Posit
} ; -- Compar => b.s ! Posit ;
isPre = a.isPre ; lock_A = <>} ; -- Superl => "o" ++ b.s ! Posit ;
} ;
isPre = a.isPre ;
copTyp = a.copTyp
} ;
mkNonInflectA : A -> Str -> A ; mkNonInflectA : A -> Str -> A ;
mkNonInflectA = \blanco,hueso -> blanco ** {s = \\x,y => blanco.s ! x ! y ++ hueso } ; mkNonInflectA = \blanco,hueso -> blanco ** {s = \\x,y => blanco.s ! x ! y ++ hueso } ;
@@ -245,7 +257,10 @@ oper
= mkADeg ; = mkADeg ;
mkA : (blanco : A) -> (hueso : Str) -> A -- noninflecting component after the adjective mkA : (blanco : A) -> (hueso : Str) -> A -- noninflecting component after the adjective
= mkNonInflectA ; = mkNonInflectA ;
mkA : A -> CopulaType -> A -- force copula type
= adjCopula ;
} ; } ;
-- The functions above create postfix adjectives. To switch them to -- The functions above create postfix adjectives. To switch them to
@@ -256,7 +271,7 @@ oper
prefixA = prefA ; prefixA = prefA ;
prefA : A -> A ; prefA : A -> A ;
prefA a = {s = a.s ; isPre = True ; lock_A = <>} ; prefA a = lin A {s = a.s ; isPre = True ; copTyp = a.copTyp} ;
--3 Two-place adjectives --3 Two-place adjectives
-- --
@@ -320,7 +335,7 @@ oper
"or" | "ôr" => pôr_Besch ; "or" | "ôr" => pôr_Besch ;
_ => comprar_Besch -- hole _ => comprar_Besch -- hole
} }
in verboV (paradigm v) ; in lin V (verboV (paradigm v)) ;
mkV = overload { mkV = overload {
--- [ ] update --- [ ] update
@@ -345,8 +360,8 @@ oper
-- "Bescherelle" book. To use them in the category $V$, wrap them with -- "Bescherelle" book. To use them in the category $V$, wrap them with
-- the function -- the function
mkV : Verbum -> V = -- import verb constructed with BeschPor mkV : Verbum -> V = \v -> -- import verb constructed with BeschPor
verboV ; lin V (verboV v) ;
-- particle verb -- particle verb
mkV : V -> Str -> V = mkV : V -> Str -> V =
@@ -366,7 +381,7 @@ oper
-- deviant past participle, e.g. abrir - aberto -- deviant past participle, e.g. abrir - aberto
special_ppV ve pa = { special_ppV ve pa = {
s = table { s = table {
VPart g n => (adjPreto pa).s ! AF g n ; VPart g n => (adjPreto pa).s ! (genNum2Aform g n) ;
p => ve.s ! p p => ve.s ! p
} ; } ;
lock_V = <> ; lock_V = <> ;
@@ -516,6 +531,6 @@ oper
isPol = False ; isPol = False ;
isNeg = False} ** {lock_NP = <>} ; isNeg = False} ** {lock_NP = <>} ;
reflVerboV : Verbum -> V = \ve -> reflV (verboV ve) ; reflVerboV : Verbum -> V = \ve -> reflV (lin V (verboV ve)) ;
} ; } ;

View File

@@ -1,64 +1,72 @@
incomplete concrete AdjectiveRomance of Adjective = incomplete concrete AdjectiveRomance of Adjective =
CatRomance ** open CommonRomance, ResRomance, Prelude in { CatRomance ** open CommonRomance, ResRomance, Prelude in {
flags coding=utf8; flags coding=utf8;
lin lin
PositA a = { PositA a = {
s = a.s ! Posit ; s = a.s ! Posit ;
isPre = a.isPre isPre = a.isPre ;
copTyp = a.copTyp
} ; } ;
ComparA a np = { ComparA a np = {
s = \\af => a.s ! Compar ! af ++ conjThan ++ (np.s ! Nom).ton ; s = \\af => a.s ! Compar ! af ++ conjThan ++ (np.s ! Nom).ton ;
isPre = False isPre = False ;
copTyp = a.copTyp
} ; } ;
CAdvAP ad ap np = { CAdvAP ad ap np = {
s = \\af => ad.s ++ ap.s ! af ++ ad.p ++ (np.s ! Nom).ton ; s = \\af => ad.s ++ ap.s ! af ++ ad.p ++ (np.s ! Nom).ton ;
isPre = False isPre = False ;
copTyp = ap.copTyp
} ; } ;
UseComparA a = { UseComparA a = {
s = \\af => a.s ! Compar ! af ; s = \\af => a.s ! Compar ! af ;
isPre = a.isPre isPre = a.isPre ;
copTyp = a.copTyp
} ; } ;
AdjOrd ord = { AdjOrd ord = {
s = \\af => ord.s ! (case af of { s = \\af => ord.s ! aform2aagr af ; ----
AF g n => aagr g n ; isPre = False ; ----
_ => aagr Masc Sg ---- copTyp = serCopula
}) ;
isPre = False ----
} ; } ;
-- $SuperlA$ belongs to determiner syntax in $Noun$. -- $SuperlA$ belongs to determiner syntax in $Noun$.
ComplA2 adj np = { ComplA2 adj np = {
s = \\af => adj.s ! Posit ! af ++ appCompl adj.c2 np ; s = \\af => adj.s ! Posit ! af ++ appCompl adj.c2 np ;
isPre = False isPre = False ;
copTyp = serCopula
} ; } ;
ReflA2 adj = { ReflA2 adj = {
s = \\af => s = \\af =>
adj.s ! Posit ! af ++ adj.s ! Posit ! af ++
adj.c2.s ++ prepCase adj.c2.c ++ reflPron Sg P3 Nom ; --- agr adj.c2.s ++ prepCase adj.c2.c ++ reflPron Sg P3 Nom ; --- agr
isPre = False isPre = False ;
copTyp = serCopula
} ; } ;
SentAP ap sc = { SentAP ap sc = {
s = \\a => ap.s ! a ++ sc.s ! dative ; -- prête à dormir --- mood s = \\a => ap.s ! a ++ sc.s ! dative ; -- prête à dormir --- mood
isPre = False isPre = False ;
copTyp = ap.copTyp
} ; } ;
AdAP ada ap = { AdAP ada ap = {
s = \\a => ada.s ++ ap.s ! a ; s = \\a => ada.s ++ ap.s ! a ;
isPre = ap.isPre isPre = ap.isPre ;
copTyp = ap.copTyp
} ; } ;
UseA2 a = { UseA2 a = {
s = a.s ! Posit ; s = a.s ! Posit ;
isPre = False ---- A2 has no isPre isPre = False ; ---- A2 has no isPre
copTyp = serCopula ---- A2 has no copTyp (yet)
} ; } ;
AdvAP ap adv = { AdvAP ap adv = {
s = \\a => ap.s ! a ++ adv.s ; s = \\a => ap.s ! a ++ adv.s ;
isPre = False isPre = False ;
copTyp = ap.copTyp
} ; } ;

View File

@@ -55,7 +55,7 @@ incomplete concrete CatRomance of Cat = CommonX - [SC,Pol]
-- Adjective -- Adjective
AP = {s : AForm => Str ; isPre : Bool} ; AP = {s : AForm => Str ; isPre : Bool ; copTyp : CopulaType} ;
-- Noun -- Noun
@@ -105,7 +105,7 @@ incomplete concrete CatRomance of Cat = CommonX - [SC,Pol]
V3, V2A, V2V = Verb ** {c2,c3 : Compl} ; V3, V2A, V2V = Verb ** {c2,c3 : Compl} ;
VS = Verb ** {m : RPolarity => Mood} ; VS = Verb ** {m : RPolarity => Mood} ;
A = {s : Degree => AForm => Str ; isPre : Bool} ; A = {s : Degree => AForm => Str ; isPre : Bool ; copTyp : CopulaType} ;
A2 = {s : Degree => AForm => Str ; c2 : Compl} ; A2 = {s : Degree => AForm => Str ; c2 : Compl} ;
N = Noun ; N = Noun ;
@@ -134,8 +134,8 @@ incomplete concrete CatRomance of Cat = CommonX - [SC,Pol]
NP = \np -> (np.s ! Nom).comp ; NP = \np -> (np.s ! Nom).comp ;
Conj = \c -> c.s2 ; Conj = \c -> c.s2 ;
A = \a -> a.s ! Posit ! AF Masc Sg ; A = \a -> a.s ! Posit ! ASg Masc APred ;
A2 = \a -> a.s ! Posit ! AF Masc Sg ++ a.c2.s ; A2 = \a -> a.s ! Posit ! ASg Masc APred ++ a.c2.s ;
N = \n -> n.s ! Sg ; N = \n -> n.s ! Sg ;
N2 = \n -> n.s ! Sg ++ n.c2.s ; N2 = \n -> n.s ! Sg ++ n.c2.s ;

View File

@@ -30,7 +30,9 @@ param
-- Comparative adjectives are moreover inflected in degree -- Comparative adjectives are moreover inflected in degree
-- (which in Romance is usually syntactic, though). -- (which in Romance is usually syntactic, though).
AForm = AF Gender Number | AA ; AForm = ASg Gender APosition | APl Gender | AA ;
APosition = AAttr | APred ;
-- Gender is not morphologically determined for first and second person pronouns. -- Gender is not morphologically determined for first and second person pronouns.
@@ -49,18 +51,44 @@ oper
} ; } ;
-- genderpos2gender : GenderPosition -> {p1:Gender,p2:Number} = \gp -> case gp of {
-- MascSg _ => <Masc,Sg> ;
-- MascPl => <Masc,Pl> ;
-- FemSg => <Fem,Sg> ;
-- FemPl => <Fem,Pl>
-- } ;
aform2gender : AForm -> Gender = \a -> case a of { aform2gender : AForm -> Gender = \a -> case a of {
AF g _ => g ; ASg g _ => g ;
_ => Masc -- "le plus lentement" APl g => g ;
_ => Masc -- "le plus lentement"
} ; } ;
aform2number : AForm -> Number = \a -> case a of { aform2number : AForm -> Number = \a -> case a of {
AF _ n => n ; APl _ => Pl ;
_ => Sg -- "le plus lentement" _ => Sg -- "le plus lentement"
} ; } ;
aform2aagr : AForm -> AAgr = \a -> case a of { aform2aagr : AForm -> AAgr = \a -> case a of {
AF g n => aagr g n ; ASg g _ => aagr g Sg ;
_ => aagr Masc Sg -- "le plus lentement" APl g => aagr g Pl ;
_ => aagr Masc Sg -- "le plus lentement"
} ; } ;
aagr2aform : AAgr -> AForm = \gn -> case gn of {
{g=g ; n=Sg} => ASg g APred ;
{g=g ; n=Pl} => APl g
} ;
genNum2Aform : Gender -> Number -> AForm ;
genNum2Aform g n = case n of {
Sg => ASg g APred ;
Pl => APl g
} ;
genNumPos2Aform : Gender -> Number -> Bool -> AForm ;
genNumPos2Aform g n isPre = case n of {
Sg => ASg g (if_then_else APosition isPre AAttr APred) ;
Pl => APl g
} ;
conjGender : Gender -> Gender -> Gender = \m,n -> conjGender : Gender -> Gender -> Gender = \m,n ->
case m of { case m of {
@@ -236,7 +264,7 @@ oper
oper oper
mkOrd : {s : Degree => AForm => Str} -> {s : AAgr => Str} ; mkOrd : {s : Degree => AForm => Str} -> {s : AAgr => Str} ;
mkOrd x = {s = \\ag => x.s ! Posit ! AF ag.g ag.n} ; mkOrd x = {s = \\ag => x.s ! Posit ! aagr2aform ag } ;
-- This is used in Spanish and Italian to bind clitics with preceding verb. -- This is used in Spanish and Italian to bind clitics with preceding verb.

View File

@@ -14,7 +14,8 @@ incomplete concrete ConjunctionRomance of Conjunction =
hasClit = False ; isNeg = ss.isNeg hasClit = False ; isNeg = ss.isNeg
}) ; }) ;
ConjAP conj ss = conjunctDistrTable AForm conj ss ** { ConjAP conj ss = conjunctDistrTable AForm conj ss ** {
isPre = ss.isPre isPre = ss.isPre ;
copTyp = ss.copTyp
} ; } ;
ConjRS conj ss = conjunctDistrTable2 Mood Agr conj ss ** { ConjRS conj ss = conjunctDistrTable2 Mood Agr conj ss ** {
c = ss.c c = ss.c
@@ -40,8 +41,8 @@ incomplete concrete ConjunctionRomance of Conjunction =
s2 = \\c => xs.s2 ! c ; ----e (conjunctCase c) ; s2 = \\c => xs.s2 ! c ; ----e (conjunctCase c) ;
a = conjAgr x.a xs.a ; isNeg = orB x.isNeg xs.isNeg a = conjAgr x.a xs.a ; isNeg = orB x.isNeg xs.isNeg
} ; } ;
BaseAP x y = twoTable AForm x y ** {isPre = andB x.isPre y.isPre} ; BaseAP x y = twoTable AForm x y ** {isPre = andB x.isPre y.isPre ; copTyp = y.copTyp} ;
ConsAP xs x = consrTable AForm comma xs x ** {isPre = andB xs.isPre x.isPre} ; ConsAP x xs = consrTable AForm comma x xs ** {isPre = andB x.isPre xs.isPre ; copTyp = xs.copTyp} ;
BaseRS x y = twoTable2 Mood Agr x y ** {c = y.c} ; BaseRS x y = twoTable2 Mood Agr x y ** {c = y.c} ;
ConsRS xs x = consrTable2 Mood Agr comma xs x ** {c = xs.c} ; ConsRS xs x = consrTable2 Mood Agr comma xs x ** {c = xs.c} ;
BaseIAdv = twoSS ; BaseIAdv = twoSS ;
@@ -55,7 +56,7 @@ incomplete concrete ConjunctionRomance of Conjunction =
[AdV] = {s1,s2 : Str} ; [AdV] = {s1,s2 : Str} ;
[IAdv] = {s1,s2 : Str} ; [IAdv] = {s1,s2 : Str} ;
[NP] = {s1,s2 : Case => Str ; a : Agr ; isNeg : Bool} ; [NP] = {s1,s2 : Case => Str ; a : Agr ; isNeg : Bool} ;
[AP] = {s1,s2 : AForm => Str ; isPre : Bool} ; [AP] = {s1,s2 : AForm => Str ; isPre : Bool ; copTyp : CopulaType} ;
[RS] = {s1,s2 : Mood => Agr => Str ; c : Case} ; [RS] = {s1,s2 : Mood => Agr => Str ; c : Case} ;
[CN] = {s1,s2 : Number => Str ; g : Gender} ; [CN] = {s1,s2 : Number => Str ; g : Gender} ;

View File

@@ -101,9 +101,9 @@ incomplete concrete NounRomance of Noun =
AdNum adn num = {s = \\a => adn.s ++ num.s ! a ; isNum = num.isNum ; n = num.n} ; AdNum adn num = {s = \\a => adn.s ++ num.s ! a ; isNum = num.isNum ; n = num.n} ;
OrdSuperl adj = {s = \\a => adj.s ! Superl ! AF a.g a.n} ; OrdSuperl adj = {s = \\a => adj.s ! Superl ! genNum2Aform a.g a.n} ;
OrdNumeralSuperl num adj = {s = \\a => num.s ! NOrd a.g a.n ++ adj.s ! Superl ! AF a.g a.n} ; -- la terza più grande OrdNumeralSuperl num adj = {s = \\a => num.s ! NOrd a.g a.n ++ adj.s ! Superl ! genNum2Aform a.g a.n} ; -- la terza più grande
---- could be discontinuous: la terza città più grande ---- could be discontinuous: la terza città più grande
DefArt = { DefArt = {
@@ -153,7 +153,7 @@ incomplete concrete NounRomance of Noun =
let let
g = cn.g g = cn.g
in { in {
s = \\n => preOrPost ap.isPre (ap.s ! (AF g n)) (cn.s ! n) ; s = \\n => preOrPost ap.isPre (ap.s ! genNumPos2Aform g n ap.isPre) (cn.s ! n) ;
g = g ; g = g ;
} ; } ;
@@ -188,9 +188,9 @@ incomplete concrete NounRomance of Noun =
CountNP det np = heavyNPpol np.isNeg CountNP det np = heavyNPpol np.isNeg
{s = \\c => det.s ! np.a.g ! c ++ (np.s ! genitive).ton ; {s = \\c => det.s ! np.a.g ! c ++ (np.s ! genitive).ton ;
a = np.a ** {n = det.n} } ; a = np.a ** {n = det.n} } ;
AdjDAP det ap = { AdjDAP det ap = {
s = \\g => det.s ! g ++ ap.s ! AF g det.n ; s = \\g => det.s ! g ++ ap.s ! genNum2Aform g det.n ;
n = det.n ; n = det.n ;
} ; } ;

View File

@@ -1,4 +1,4 @@
incomplete concrete PhraseRomance of Phrase = incomplete concrete PhraseRomance of Phrase =
CatRomance ** open CommonRomance, ResRomance, Prelude in { CatRomance ** open CommonRomance, ResRomance, Prelude in {
flags optimize = all_subs ; flags optimize = all_subs ;
@@ -18,7 +18,7 @@ incomplete concrete PhraseRomance of Phrase =
UttVP vp = {s = infVP vp (agrP3 Fem Sg)} ; --- Agr UttVP vp = {s = infVP vp (agrP3 Fem Sg)} ; --- Agr
UttAdv adv = adv ; UttAdv adv = adv ;
UttCN n = {s = n.s ! Sg} ; UttCN n = {s = n.s ! Sg} ;
UttAP ap = {s = ap.s ! AF Masc Sg} ; UttAP ap = {s = ap.s ! genNum2Aform Masc Sg} ;
UttCard n = {s = n.s ! Masc} ; UttCard n = {s = n.s ! Masc} ;
UttInterj i = i ; UttInterj i = i ;

View File

@@ -1,4 +1,4 @@
incomplete concrete VerbRomance of Verb = incomplete concrete VerbRomance of Verb =
CatRomance ** open Prelude, CommonRomance, ResRomance in { CatRomance ** open Prelude, CommonRomance, ResRomance in {
flags optimize=all_subs ; flags optimize=all_subs ;
@@ -6,50 +6,50 @@ incomplete concrete VerbRomance of Verb =
lin lin
UseV = predV ; UseV = predV ;
ComplVV v vp = ComplVV v vp =
insertComplement (\\a => prepCase v.c2.c ++ infVP vp a) (predV v) ; insertComplement (\\a => prepCase v.c2.c ++ infVP vp a) (predV v) ;
ComplVS v s = insertExtrapos (\\b => conjThat ++ s.s ! (v.m ! b)) (predV v) ; ComplVS v s = insertExtrapos (\\b => conjThat ++ s.s ! (v.m ! b)) (predV v) ;
ComplVQ v q = insertExtrapos (\\_ => q.s ! QIndir) (predV v) ; ComplVQ v q = insertExtrapos (\\_ => q.s ! QIndir) (predV v) ;
ComplVA v ap = ComplVA v ap =
insertComplement (\\a => let agr = complAgr a in ap.s ! AF agr.g agr.n) (predV v) ; insertComplement (\\a => let agr = complAgr a in ap.s ! genNum2Aform agr.g agr.n) (predV v) ;
SlashV2a v = mkVPSlash v.c2 (predV v) ; SlashV2a v = mkVPSlash v.c2 (predV v) ;
Slash2V3 v np = mkVPSlash v.c3 (insertObject v.c2 np (predV v)) ; Slash2V3 v np = mkVPSlash v.c3 (insertObject v.c2 np (predV v)) ;
Slash3V3 v np = mkVPSlash v.c2 (insertObject v.c3 np (predV v)) ; Slash3V3 v np = mkVPSlash v.c2 (insertObject v.c3 np (predV v)) ;
SlashV2V v vp = SlashV2V v vp =
mkVPSlash v.c2 mkVPSlash v.c2
(insertComplement (insertComplement
(\\a => v.c3.s ++ prepCase v.c3.c ++ infVP vp a) (\\a => v.c3.s ++ prepCase v.c3.c ++ infVP vp a)
(predV v)) ; (predV v)) ;
SlashV2S v s = SlashV2S v s =
mkVPSlash v.c2 mkVPSlash v.c2
(insertExtrapos (insertExtrapos
(\\b => conjThat ++ s.s ! Indic) ---- mood (\\b => conjThat ++ s.s ! Indic) ---- mood
(predV v)) ; (predV v)) ;
SlashV2Q v q = SlashV2Q v q =
mkVPSlash v.c2 mkVPSlash v.c2
(insertExtrapos (insertExtrapos
(\\_ => q.s ! QIndir) (\\_ => q.s ! QIndir)
(predV v)) ; (predV v)) ;
{- ---- lincat should be fixed {- ---- lincat should be fixed
SlashV2A v ap = SlashV2A v ap =
let af = case v.c3.isDir of { let af = case v.c3.isDir of {
True => AF np.a.g np.a.n ; -- ... bleues True => genNum2Aform np.a.g np.a.n ; -- ... bleues
_ => AF Masc Sg -- il les peint en bleu _ => genNum2Aform Masc Sg -- il les peint en bleu
} }
-} -}
SlashV2A v ap = SlashV2A v ap =
let af = AF Masc Sg let af = genNum2Aform Masc Sg
in in
mkVPSlash v.c2 mkVPSlash v.c2
(insertComplement (insertComplement
(\\_ => v.c3.s ++ prepCase v.c3.c ++ ap.s ! af) (\\_ => v.c3.s ++ prepCase v.c3.c ++ ap.s ! af)
(predV v)) ; (predV v)) ;
@@ -57,33 +57,33 @@ incomplete concrete VerbRomance of Verb =
ReflVP v = case v.c2.isDir of { ReflVP v = case v.c2.isDir of {
True => insertRefl v ; True => insertRefl v ;
False => insertComplement False => insertComplement
(\\a => let agr = verbAgr a in v.c2.s ++ reflPron agr.n agr.p v.c2.c) v (\\a => let agr = verbAgr a in v.c2.s ++ reflPron agr.n agr.p v.c2.c) v
} ; } ;
SlashVV v vp = SlashVV v vp =
mkVPSlash vp.c2 mkVPSlash vp.c2
(insertComplement (\\a => prepCase v.c2.c ++ infVP vp a) (predV v)) ; (insertComplement (\\a => prepCase v.c2.c ++ infVP vp a) (predV v)) ;
SlashV2VNP v np vps = let obj = np.s ! v.c2.c in { SlashV2VNP v np vps = let obj = np.s ! v.c2.c in {
s = v ; s = v ;
agr = getVPAgr v ; agr = getVPAgr v ;
clit1 = obj.c1 ; clit1 = obj.c1 ;
clit2 = obj.c2 ; clit2 = obj.c2 ;
clit3 = {s,imp = [] ; hasClit = False} ; ---- shortcut from insertObject, to check AR 20/11/2013 clit3 = {s,imp = [] ; hasClit = False} ; ---- shortcut from insertObject, to check AR 20/11/2013
isNeg = False ; isNeg = False ;
neg = negation ; neg = negation ;
comp = \\a => v.c2.s ++ obj.comp ++ prepCase v.c3.c ++ infVP vps a ; comp = \\a => v.c2.s ++ obj.comp ++ prepCase v.c3.c ++ infVP vps a ;
ext = \\p => [] ; ext = \\p => [] ;
c2 = vps.c2 c2 = vps.c2
} ; } ;
{- ---- this takes ages to compile, hence inlined as above AR 20/11/2013 {- ---- this takes ages to compile, hence inlined as above AR 20/11/2013
SlashV2VNP v np vp = SlashV2VNP v np vp =
mkVPSlash vp.c2 mkVPSlash vp.c2
(insertComplement (insertComplement
(\\a => prepCase v.c3.c ++ infVP vp a) (\\a => prepCase v.c3.c ++ infVP vp a)
(insertObject v.c2 np (predV v))) ; (insertObject v.c2 np (predV v))) ;
-} -}
@@ -91,9 +91,15 @@ incomplete concrete VerbRomance of Verb =
UseCopula = predV copula ; UseCopula = predV copula ;
CompAP ap = {s = \\ag => let agr = complAgr ag in ap.s ! AF agr.g agr.n ; cop = serCopula} ; CompAP ap = {
CompCN cn = { s = \\ag => s = \\ag =>
let agr = complAgr ag in let
agr = complAgr ag
in ap.s ! genNum2Aform agr.g agr.n ;
cop = ap.copTyp
} ;
CompCN cn = { s = \\ag =>
let agr = complAgr ag in
artIndef False cn.g agr.n Nom ++ cn.s ! agr.n ; artIndef False cn.g agr.n Nom ++ cn.s ! agr.n ;
cop = serCopula cop = serCopula
}; --- RE 7/12/2010 -- AR added indef 2/8/2011 }; --- RE 7/12/2010 -- AR added indef 2/8/2011
@@ -109,11 +115,11 @@ incomplete concrete VerbRomance of Verb =
AdVVPSlash adv vps = vps ** insertAdV adv.s vps ; AdVVPSlash adv vps = vps ** insertAdV adv.s vps ;
PassV2 v = insertComplement PassV2 v = insertComplement
(\\a => let agr = complAgr a in v.s ! VPart agr.g agr.n) (predV auxPassive) ; (\\a => let agr = complAgr a in v.s ! VPart agr.g agr.n) (predV auxPassive) ;
VPSlashPrep vp prep = vp ** { VPSlashPrep vp prep = vp ** {
c2 = {s = prep.s ; c = prep.c ; isDir = False} c2 = {s = prep.s ; c = prep.c ; isDir = False}
} ; } ;
}
} ;

View File

@@ -1,6 +1,6 @@
--# -path=.:../abstract:../common --# -path=.:../abstract:../common
incomplete concrete DocumentationSpaFunctor of Documentation = CatSpa ** open incomplete concrete DocumentationSpaFunctor of Documentation = CatSpa ** open
Terminology, -- the interface to be instantiated Terminology, -- the interface to be instantiated
ResSpa, ResSpa,
CommonRomance, CommonRomance,
@@ -19,22 +19,22 @@ lincat
Definition = {s : Str} ; Definition = {s : Str} ;
Document = {s : Str} ; Document = {s : Str} ;
Tag = {s : Str} ; Tag = {s : Str} ;
{- {-
-} --# notpresent -} --# notpresent
oper oper
heading : N -> Str = \n -> (nounHeading n).s ; heading : N -> Str = \n -> (nounHeading n).s ;
lin lin
InflectionN, InflectionN3, InflectionN3 = \noun -> { InflectionN, InflectionN3, InflectionN3 = \noun -> {
t = "n" ; t = "n" ;
s1 = heading1 (heading noun_Category ++ s1 = heading1 (heading noun_Category ++
case noun.g of { case noun.g of {
Masc => "("+heading masculine_Parameter+")" ; Masc => "("+heading masculine_Parameter+")" ;
Fem => "("+heading feminine_Parameter+")" Fem => "("+heading feminine_Parameter+")"
}) ; }) ;
s2 = frameTable ( s2 = frameTable (
tr (th (heading singular_Parameter) ++ th (heading plural_Parameter)) ++ tr (th (heading singular_Parameter) ++ th (heading plural_Parameter)) ++
tr (td (noun.s ! Sg) ++ td (noun.s ! Pl)) tr (td (noun.s ! Sg) ++ td (noun.s ! Pl))
) )
@@ -45,8 +45,8 @@ lin
s1 = heading1 (nounHeading adjective_Category).s ; s1 = heading1 (nounHeading adjective_Category).s ;
s2 = frameTable ( s2 = frameTable (
tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter)) ++ tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter)) ++
tr (th (heading masculine_Parameter) ++ td (adj.s ! Posit ! (AF Masc Sg)) ++ td (adj.s ! Posit ! (AF Masc Pl))) ++ tr (th (heading masculine_Parameter) ++ td (adj.s ! Posit ! genNum2Aform Masc Sg) ++ td (adj.s ! Posit ! (genNum2Aform Masc Pl))) ++
tr (th (heading feminine_Parameter) ++ td (adj.s ! Posit ! (AF Fem Sg)) ++ td (adj.s ! Posit ! (AF Fem Pl))) tr (th (heading feminine_Parameter) ++ td (adj.s ! Posit ! genNum2Aform Fem Sg) ++ td (adj.s ! Posit ! (genNum2Aform Fem Pl)))
) )
} ; } ;
@@ -142,23 +142,23 @@ lin
MkDocument b i e = ss (i.s1 ++ "<p style=\"font-size:20px\">"++b.s++"</p>" ++ i.s2 ++ paragraph e.s) ; -- explanation appended in a new paragraph MkDocument b i e = ss (i.s1 ++ "<p style=\"font-size:20px\">"++b.s++"</p>" ++ i.s2 ++ paragraph e.s) ; -- explanation appended in a new paragraph
MkTag i = ss i.t ; MkTag i = ss i.t ;
oper oper
verbExample : CatSpa.Cl -> Str = \cl -> verbExample : CatSpa.Cl -> Str = \cl ->
(S.mkUtt cl).s (S.mkUtt cl).s
++ ";" ++ (S.mkUtt (S.mkS S.anteriorAnt cl)).s --# notpresent ++ ";" ++ (S.mkUtt (S.mkS S.anteriorAnt cl)).s --# notpresent
; ;
inflVerb : Verb -> Str = \verb -> inflVerb : Verb -> Str = \verb ->
let let
vfin : CommonRomance.VF -> Str = \f -> vfin : CommonRomance.VF -> Str = \f ->
verb.s ! f ; verb.s ! f ;
ttable : TMood -> Str = \tense -> ttable : TMood -> Str = \tense ->
frameTable ( frameTable (
tr (th "" ++ tr (th "" ++
th (heading singular_Parameter) ++ th (heading singular_Parameter) ++
th (heading plural_Parameter)) ++ th (heading plural_Parameter)) ++
tr (th "1.p" ++ tr (th "1.p" ++
td (vfin (VFin tense Sg P1)) ++ td (vfin (VFin tense Sg P1)) ++
td (vfin (VFin tense Pl P1))) ++ td (vfin (VFin tense Pl P1))) ++
tr (th "2.p" ++ tr (th "2.p" ++
@@ -171,11 +171,11 @@ oper
ttable2 : (Mood -> TMood) -> Str = \f -> ttable2 : (Mood -> TMood) -> Str = \f ->
frameTable ( frameTable (
tr (intagAttr "th" "colspan=2" "" ++ tr (intagAttr "th" "colspan=2" "" ++
th (heading indicative_Parameter) ++ th (heading indicative_Parameter) ++
th (heading conjunctive_Parameter)) ++ th (heading conjunctive_Parameter)) ++
tr (intagAttr "th" "rowspan=3" (heading singular_Parameter) ++ tr (intagAttr "th" "rowspan=3" (heading singular_Parameter) ++
th "1.p" ++ th "1.p" ++
td (vfin (VFin (f Indic) Sg P1)) ++ td (vfin (VFin (f Indic) Sg P1)) ++
td (vfin (VFin (f Conjunct) Sg P1))) ++ td (vfin (VFin (f Conjunct) Sg P1))) ++
tr (th "2.p" ++ tr (th "2.p" ++
@@ -183,7 +183,7 @@ oper
td (vfin (VFin (f Conjunct) Sg P2))) ++ td (vfin (VFin (f Conjunct) Sg P2))) ++
tr (th "3.p" ++ tr (th "3.p" ++
td (vfin (VFin (f Indic) Sg P3)) ++ td (vfin (VFin (f Indic) Sg P3)) ++
td (vfin (VFin (f Conjunct) Sg P3))) ++ td (vfin (VFin (f Conjunct) Sg P3))) ++
tr (intagAttr "th" "rowspan=3" (heading plural_Parameter) ++ tr (intagAttr "th" "rowspan=3" (heading plural_Parameter) ++
th "1.p" ++ th "1.p" ++
td (vfin (VFin (f Indic) Pl P1)) ++ td (vfin (VFin (f Indic) Pl P1)) ++
@@ -191,7 +191,7 @@ oper
tr (th "2.p" ++ tr (th "2.p" ++
td (vfin (VFin (f Indic) Pl P2)) ++ td (vfin (VFin (f Indic) Pl P2)) ++
td (vfin (VFin (f Conjunct) Pl P2))) ++ td (vfin (VFin (f Conjunct) Pl P2))) ++
tr (th "3.p" ++ tr (th "3.p" ++
td (vfin (VFin (f Indic) Pl P3)) ++ td (vfin (VFin (f Indic) Pl P3)) ++
td (vfin (VFin (f Conjunct) Pl P3))) td (vfin (VFin (f Conjunct) Pl P3)))
) ; ) ;
@@ -210,17 +210,17 @@ oper
paragraph (vfin (VInfin False)) ++ paragraph (vfin (VInfin False)) ++
heading2 (heading imperative_Parameter) ++ heading2 (heading imperative_Parameter) ++
frameTable ( frameTable (
tr (th "sg.2.p" ++ td (vfin (VImper SgP2))) ++ tr (th "sg.2.p" ++ td (vfin (VImper SgP2))) ++
tr (th "pl.1.p" ++ td (vfin (VImper PlP1))) ++ tr (th "pl.1.p" ++ td (vfin (VImper PlP1))) ++
tr (th "pl.2.p" ++ td (vfin (VImper PlP2))) tr (th "pl.2.p" ++ td (vfin (VImper PlP2)))
) ++ ) ++
heading2 (heading participle_Parameter) ++ heading2 (heading participle_Parameter) ++
frameTable ( frameTable (
tr (th (heading past_Parameter) ++ td (vfin (VPart Masc Sg))) ++ tr (th (heading past_Parameter) ++ td (vfin (VPart Masc Sg))) ++
tr (th (heading present_Parameter) ++ td (vfin VGer)) tr (th (heading present_Parameter) ++ td (vfin VGer))
) ; ) ;
{- --# notpresent {- --# notpresent
-} -}
} }

View File

@@ -1,7 +1,7 @@
--# -path=.:../romance:../common:../abstract:../../prelude --# -path=.:../romance:../common:../abstract:../../prelude
concrete LexiconSpa of Lexicon = CatSpa ** open concrete LexiconSpa of Lexicon = CatSpa ** open
(M=MorphoSpa), ParadigmsSpa, BeschSpa in { (M=MorphoSpa), ParadigmsSpa, (D = DiffSpa), BeschSpa in {
flags flags
coding=utf8 ; coding=utf8 ;
@@ -233,6 +233,7 @@ lin
correct_A = regA "correcto" ; correct_A = regA "correcto" ;
dry_A = regA "seco" ; dry_A = regA "seco" ;
dull_A = regA "desafilado" ; dull_A = regA "desafilado" ;
ready_A = adjCopula (mkA "listo") D.estarCopula ;
full_A = regA "lleno" ; full_A = regA "lleno" ;
heavy_A = regA "pesado" ; heavy_A = regA "pesado" ;
near_A = regA "cercano" ; near_A = regA "cercano" ;

View File

@@ -57,12 +57,16 @@ oper
-- Adjectives are conveniently seen as gender-dependent nouns. -- Adjectives are conveniently seen as gender-dependent nouns.
-- Here are some patterns. First one that describes the worst case. -- Here are some patterns. First one that describes the worst case.
mkAdj : (_,_,_,_,_ : Str) -> Adj = \solo,sola,soli,sole,solamente -> mkAdj : (x1,_,_,_,_,_,x7 : Str) -> Adj = \buen,solo,gran,sola,solos,solas,solamente ->
{s = table { {s = table {
AF Masc n => numForms solo soli ! n ; ASg Masc AAttr => buen ;
AF Fem n => numForms sola sole ! n ; ASg Masc APred => solo ;
AA => solamente ASg Fem AAttr => gran ;
} ASg Fem APred => sola ;
APl Masc => solos ;
APl Fem => solas ;
AA => solamente
}
} ; } ;
-- Then the regular and invariant patterns. -- Then the regular and invariant patterns.
@@ -71,26 +75,36 @@ oper
let let
sol = Predef.tk 1 solo sol = Predef.tk 1 solo
in in
mkAdj solo (sol + "a") (sol + "os") (sol + "as") (sol + "amente") ; mkAdj solo solo (sol + "a") (sol + "a")
(sol + "os") (sol + "as") (sol + "amente") ;
-- masculine and feminine are identical: -- masculine and feminine are identical:
-- adjectives ending with -e, -a and many but not all that end in a consonant -- adjectives ending with -e, -a and many but not all that end in a consonant
adjUtil : Str -> Str -> Adj = \util,utiles -> adjUtil : Str -> Str -> Adj = \util,utiles ->
mkAdj util util utiles utiles (util + "mente") ; mkAdj util util util util
utiles utiles (util + "mente") ;
-- adjectives that end in consonant but have different masc and fem forms -- adjectives that end in consonant but have different masc and fem forms
-- español, hablador ... -- español, hablador ...
adjEspanol : Str -> Str -> Adj = \espanol,espanola -> adjEspanol : Str -> Str -> Adj = \espanol,espanola ->
mkAdj espanol espanola (espanol + "es") (espanol + "as") (espanola + "mente") ; mkAdj espanol espanol espanola espanola
(espanol + "es") (espanol + "as") (espanola + "mente") ;
adjBlu : Str -> Adj = \blu -> adjBueno : Str -> Adj = \bueno ->
mkAdj blu blu blu blu blu ; --- let buen = init bueno in
mkAdj buen bueno (buen + "a") (buen + "a")
(buen + "os") (buen + "as") (buen + "amente") ;
adjGrande : Str -> Str -> Adj = \gran,grande ->
mkAdj gran grande gran grande
(grande + "s") (grande + "s") (grande + "mente") ;
-- francés francesa franceses francesas -- francés francesa franceses francesas
adjEs : Str -> Adj = \francEs -> adjEs : Str -> Adj = \francEs ->
let franc : Str = Predef.tk 2 francEs ; let franc : Str = Predef.tk 2 francEs ;
frances : Str = franc + "es" ; frances : Str = franc + "es" ;
in mkAdj francEs (frances + "a") (frances + "es") (frances + "as") (frances + "amente") ; in mkAdj francEs francEs (frances + "a") (frances + "a")
(frances + "es") (frances + "as") (frances + "amente") ;
-- alemán alemana alemanes alemanas -- alemán alemana alemanes alemanas
@@ -106,11 +120,13 @@ oper
"ú" => "u" "ú" => "u"
} ; } ;
alemVn : Str = alem + V + "n" ; alemVn : Str = alem + V + "n" ;
in mkAdj alemAn (alemVn + "a") (alemVn + "es") in mkAdj alemAn alemAn (alemVn + "a") (alemVn + "a")
(alemVn + "as") (alemVn + "amente") ; (alemVn + "es") (alemVn + "as") (alemVn + "amente") ;
mkAdjReg : Str -> Adj = \solo -> mkAdjReg : Str -> Adj = \solo ->
case solo of { case solo of {
"grande" => adjGrande "gran" "grande" ;
"bueno" => adjBueno solo ;
_ + "o" => adjSolo solo ; _ + "o" => adjSolo solo ;
_ + ("e" | "a") => adjUtil solo (solo + "s") ; _ + ("e" | "a") => adjUtil solo (solo + "s") ;
_ + "és" => adjEs solo ; _ + "és" => adjEs solo ;
@@ -153,11 +169,11 @@ oper
-- Determiners, traditionally called indefinite pronouns, are inflected -- Determiners, traditionally called indefinite pronouns, are inflected
-- in gender and number, like adjectives. -- in gender and number, like adjectives.
pronForms : Adj -> Gender -> Number -> Str = \tale,g,n -> tale.s ! AF g n ; pronForms : Adj -> Gender -> Number -> Str = \tale,g,n -> tale.s ! genNum2Aform g n ;
mkOrdinal : A -> Ord = \adj-> mkOrdinal : A -> Ord = \adj->
lin Ord { lin Ord {
s = \\ag => adj.s ! Posit ! AF ag.g ag.n ; s = \\ag => adj.s ! Posit ! genNum2Aform ag.g ag.n ;
} ; } ;
mkQuantifier : (ese,esa,esos,esas : Str) -> Quant = \ese,esa,esos,esas-> mkQuantifier : (ese,esa,esos,esas : Str) -> Quant = \ese,esa,esos,esas->

View File

@@ -4,12 +4,12 @@
-- --
-- Aarne Ranta 2004 - 2006 -- Aarne Ranta 2004 - 2006
-- --
-- This is an API for the user of the resource grammar -- This is an API for the user of the resource grammar
-- for adding lexical items. It gives functions for forming -- for adding lexical items. It gives functions for forming
-- expressions of open categories: nouns, adjectives, verbs. -- expressions of open categories: nouns, adjectives, verbs.
-- --
-- Closed categories (determiners, pronouns, conjunctions) are -- Closed categories (determiners, pronouns, conjunctions) are
-- accessed through the resource syntax API, $Structural.gf$. -- accessed through the resource syntax API, $Structural.gf$.
-- --
-- The main difference with $MorphoSpa.gf$ is that the types -- The main difference with $MorphoSpa.gf$ is that the types
-- referred to are compiled resource grammar types. We have moreover -- referred to are compiled resource grammar types. We have moreover
@@ -23,30 +23,30 @@
-- verbs, there is a fairly complete list of irregular verbs in -- verbs, there is a fairly complete list of irregular verbs in
-- [``IrregSpa`` ../../spanish/IrregSpa.gf]. -- [``IrregSpa`` ../../spanish/IrregSpa.gf].
resource ParadigmsSpa = resource ParadigmsSpa =
open open
(Predef=Predef), (Predef=Predef),
Prelude, Prelude,
MorphoSpa, MorphoSpa,
BeschSpa, BeschSpa,
CatSpa in { CatSpa in {
flags optimize=all ; flags optimize=all ;
coding=utf8 ; coding=utf8 ;
--2 Parameters --2 Parameters
-- --
-- To abstract over gender names, we define the following identifiers. -- To abstract over gender names, we define the following identifiers.
oper oper
Gender : Type ; Gender : Type ;
masculine : Gender ; masculine : Gender ;
feminine : Gender ; feminine : Gender ;
-- To abstract over number names, we define the following. -- To abstract over number names, we define the following.
Number : Type ; Number : Type ;
singular : Number ; singular : Number ;
plural : Number ; plural : Number ;
@@ -71,7 +71,7 @@ oper
mkN : overload { mkN : overload {
-- The regular function takes the singular form and the gender, -- The regular function takes the singular form and the gender,
-- and computes the plural and the gender by a heuristic. -- and computes the plural and the gender by a heuristic.
-- The heuristic says that the gender is feminine for nouns -- The heuristic says that the gender is feminine for nouns
-- ending with "a" or "z", and masculine for all other words. -- ending with "a" or "z", and masculine for all other words.
-- Nouns ending with "a", "o", "e" have the plural with "s", -- Nouns ending with "a", "o", "e" have the plural with "s",
@@ -92,23 +92,23 @@ oper
} ; } ;
--3 Compound nouns --3 Compound nouns
-- --
-- Some nouns are ones where the first part is inflected as a noun but -- Some nouns are ones where the first part is inflected as a noun but
-- the second part is not inflected. e.g. "número de teléfono". -- the second part is not inflected. e.g. "número de teléfono".
-- They could be formed in syntax, but we give a shortcut here since -- They could be formed in syntax, but we give a shortcut here since
-- they are frequent in lexica. -- they are frequent in lexica.
compN : N -> Str -> N ; -- compound, e.g. "número" + "de teléfono" compN : N -> Str -> N ; -- compound, e.g. "número" + "de teléfono"
--3 Relational nouns --3 Relational nouns
-- --
-- Relational nouns ("fille de x") need a case and a preposition. -- Relational nouns ("fille de x") need a case and a preposition.
mkN2 : N -> Prep -> N2 ; -- relational noun with preposition mkN2 : N -> Prep -> N2 ; -- relational noun with preposition
-- The most common cases are the genitive "de" and the dative "a", -- The most common cases are the genitive "de" and the dative "a",
-- with the empty preposition. -- with the empty preposition.
deN2 : N -> N2 ; -- relational noun with preposition "de" deN2 : N -> N2 ; -- relational noun with preposition "de"
@@ -126,7 +126,7 @@ oper
-- $N3$ are purely lexical categories. But you can use the $AdvCN$ -- $N3$ are purely lexical categories. But you can use the $AdvCN$
-- and $PrepNP$ constructions to build phrases like this. -- and $PrepNP$ constructions to build phrases like this.
-- --
--3 Proper names and noun phrases --3 Proper names and noun phrases
-- --
-- Proper names need a string and a gender. -- Proper names need a string and a gender.
@@ -156,14 +156,18 @@ oper
-- One-place adjectives compared with "mas" need five forms in the worst -- One-place adjectives compared with "mas" need five forms in the worst
-- case (masc and fem singular, masc plural, adverbial). -- case (masc and fem singular, masc plural, adverbial).
mkA : (solo,sola,solos,solas,solamente : Str) -> A ; -- worst-case mkA : (solo,sola,solos,solas,solamente : Str) -> A ; -- almost worst-case, except for buen/bueno gran/grande
-- In the worst case, two separate adjectives are given: mkA : (gran,grande,gran,grande,grandes,grandes,solamente : Str) -> A ; -- worst-case
-- the positive ("bueno"), and the comparative ("mejor").
-- In the worst case, two separate adjectives are given:
-- the positive ("bueno"), and the comparative ("mejor").
mkA : (bueno : A) -> (mejor : A) -> A ; -- special comparison (default with "mas") mkA : (bueno : A) -> (mejor : A) -> A ; -- special comparison (default with "mas")
mkA : (blanco : A) -> (hueso : Str) -> A -- noninflecting component after the adjective mkA : (blanco : A) -> (hueso : Str) -> A ; -- noninflecting component after the adjective
mkA : A -> CopulaType -> A -- force copula type
} ; } ;
-- The functions above create postfix adjectives. To switch -- The functions above create postfix adjectives. To switch
@@ -184,7 +188,7 @@ oper
--2 Adverbs --2 Adverbs
-- Adverbs are not inflected. Most lexical ones have position -- Adverbs are not inflected. Most lexical ones have position
-- after the verb. -- after the verb.
mkAdv : Str -> Adv ; mkAdv : Str -> Adv ;
@@ -197,7 +201,7 @@ oper
mkAdA : Str -> AdA ; mkAdA : Str -> AdA ;
mkAdN : Str -> AdN ; mkAdN : Str -> AdN ;
--2 Verbs --2 Verbs
@@ -239,7 +243,7 @@ oper
--3 Two-place verbs --3 Two-place verbs
-- --
-- Two-place verbs need a preposition, except the special case with direct object. -- Two-place verbs need a preposition, except the special case with direct object.
-- (transitive verbs). -- (transitive verbs).
mkV2 : overload { mkV2 : overload {
mkV2 : Str -> V2 ; -- regular, direct object mkV2 : Str -> V2 ; -- regular, direct object
@@ -258,7 +262,7 @@ oper
-- the first one or both can be absent. -- the first one or both can be absent.
mkV3 : overload { mkV3 : overload {
mkV3 : V -> V3 ; -- donner (+ accusative + dative) mkV3 : V -> V3 ; -- donner (+ accusative + dative)
mkV3 : V -> Prep -> V3 ; -- placer (+ accusative) + dans mkV3 : V -> Prep -> V3 ; -- placer (+ accusative) + dans
mkV3 : V -> Prep -> Prep -> V3 -- parler + dative + genitive mkV3 : V -> Prep -> Prep -> V3 -- parler + dative + genitive
} ; } ;
@@ -301,9 +305,9 @@ oper
mkAV : A -> Prep -> AV ; --% mkAV : A -> Prep -> AV ; --%
mkA2V : A -> Prep -> Prep -> A2V ; --% mkA2V : A -> Prep -> Prep -> A2V ; --%
-- Notice: categories $AS, A2S, AV, A2V$ are just $A$, -- Notice: categories $AS, A2S, AV, A2V$ are just $A$,
-- and the second argument is given -- and the second argument is given
-- as an adverb. Likewise -- as an adverb. Likewise
-- $V0$ is just $V$. -- $V0$ is just $V$.
V0 : Type ; --% V0 : Type ; --%
@@ -316,7 +320,7 @@ oper
-- The definitions should not bother the user of the API. So they are -- The definitions should not bother the user of the API. So they are
-- hidden from the document. -- hidden from the document.
Gender = MorphoSpa.Gender ; Gender = MorphoSpa.Gender ;
Number = MorphoSpa.Number ; Number = MorphoSpa.Number ;
masculine = Masc ; masculine = Masc ;
feminine = Fem ; feminine = Fem ;
@@ -354,23 +358,25 @@ oper
makeNP x g n = {s = (pn2np (mk2PN x g)).s; a = agrP3 g n ; hasClit = False ; isPol = False ; isNeg = False} ** {lock_NP = <>} ; makeNP x g n = {s = (pn2np (mk2PN x g)).s; a = agrP3 g n ; hasClit = False ; isPol = False ; isNeg = False} ** {lock_NP = <>} ;
mk5A a b c d e = mk7A a b c d e f g =
compADeg {s = \\_ => (mkAdj a b c d e).s ; isPre = False ; lock_A = <>} ; compADeg {s = \\_ => (mkAdj a b c d e f g).s ; isPre = False ; copTyp = serCopula ; lock_A = <>} ;
mk2A a b = mk5A a b c d e = mk7A a a b b c d e ;
compADeg {s = \\_ => (adjEspanol a b).s ; isPre = False ; lock_A = <>} ;
regA a = compADeg {s = \\_ => (mkAdjReg a).s ; isPre = False ; lock_A = <>} ; mk2A a b = compADeg {s = \\_ => (adjEspanol a b).s ; isPre = False ; copTyp = serCopula ; lock_A = <>} ;
prefA a = {s = a.s ; isPre = True ; lock_A = <>} ;
regA a = compADeg {s = \\_ => (mkAdjReg a).s ; isPre = False ; copTyp = serCopula ; lock_A = <>} ;
adjCopula a cop = a ** {copTyp = cop} ;
prefA a = {s = a.s ; isPre = True ; copTyp = a.copTyp ; lock_A = <>} ;
mkA2 a p = a ** {c2 = p ; lock_A2 = <>} ; mkA2 a p = a ** {c2 = p ; lock_A2 = <>} ;
mkADeg a b = mkADeg a b =
{s = table {Posit => a.s ! Posit ; _ => b.s ! Posit} ; {s = table {Posit => a.s ! Posit ; _ => b.s ! Posit} ;
isPre = a.isPre ; lock_A = <>} ; isPre = a.isPre ; copTyp = a.copTyp ; lock_A = <>} ;
compADeg a = compADeg a =
{s = table {Posit => a.s ! Posit ; _ => \\f => "más" ++ a.s ! Posit ! f} ; {s = table {Posit => a.s ! Posit ; _ => \\f => "más" ++ a.s ! Posit ! f} ;
isPre = a.isPre ; isPre = a.isPre ; copTyp = a.copTyp ;
lock_A = <>} ; lock_A = <>} ;
regADeg a = compADeg (regA a) ; regADeg a = compADeg (regA a) ;
@@ -381,7 +387,7 @@ oper
regV x = -- cortar actuar cazar guiar pagar sacar regV x = -- cortar actuar cazar guiar pagar sacar
let let
ar = Predef.dp 2 x ; ar = Predef.dp 2 x ;
z = Predef.dp 1 (Predef.tk 2 x) ; z = Predef.dp 1 (Predef.tk 2 x) ;
verb = case ar of { verb = case ar of {
@@ -407,7 +413,7 @@ oper
special_ppV ve pa = { special_ppV ve pa = {
s = table { s = table {
VPart g n => (adjSolo pa).s ! AF g n ; VPart g n => (adjSolo pa).s ! genNum2Aform g n ;
p => ve.s ! p p => ve.s ! p
} ; } ;
lock_V = <> ; lock_V = <> ;
@@ -417,10 +423,10 @@ oper
regAltV x y = case x of { regAltV x y = case x of {
_ + "ar" => verboV (regAlternV x y) ; _ + "ar" => verboV (regAlternV x y) ;
_ => verboV (regAlternVEr x y) _ => verboV (regAlternVEr x y)
} ; } ;
mk2V2 v p = lin V2 (v ** {c2 = p}) ; mk2V2 v p = lin V2 (v ** {c2 = p}) ;
dirV2 v = mk2V2 v accusative ; dirV2 v = mk2V2 v accusative ;
@@ -502,20 +508,25 @@ oper
-- To form a noun phrase that can also be plural, -- To form a noun phrase that can also be plural,
-- you can use the worst-case function. -- you can use the worst-case function.
makeNP : Str -> Gender -> Number -> NP ; makeNP : Str -> Gender -> Number -> NP ;
mkA = overload { mkA = overload {
mkA : (util : Str) -> A = regA ; mkA : (util : Str) -> A = regA ;
mkA : (espanol,espanola : Str) -> A = mk2A ; mkA : (espanol,espanola : Str) -> A = mk2A ;
mkA : (solo,sola,solos,solas,solamente : Str) -> A = mk5A ; mkA : (solo,sola,solos,solas,solamente : Str) -> A = mk5A ;
mkA : (_,_,_,_,_,_,_ : Str) -> A = mk7A ;
mkA : (bueno : A) -> (mejor : A) -> A = mkADeg ; mkA : (bueno : A) -> (mejor : A) -> A = mkADeg ;
mkA : (blanco : A) -> (hueso : Str) -> A = \blanco,hueso -> blanco ** mkA : (blanco : A) -> (hueso : Str) -> A = \blanco,hueso -> blanco **
{ s = \\x,y => blanco.s ! x ! y ++ hueso } ; { s = \\x,y => blanco.s ! x ! y ++ hueso } ;
mkA : A -> CopulaType -> A =
adjCopula ;
} ; } ;
mk7A : (_,_,_,_,_,_,_ : Str) -> A ;
mk5A : (solo,sola,solos,solas,solamente : Str) -> A ; mk5A : (solo,sola,solos,solas,solamente : Str) -> A ;
mk2A : (espanol,espanola : Str) -> A ; mk2A : (espanol,espanola : Str) -> A ;
regA : Str -> A ; regA : Str -> A ;
adjCopula : A -> CopulaType -> A ;
mkADeg : A -> A -> A ; mkADeg : A -> A -> A ;
compADeg : A -> A ; compADeg : A -> A ;
regADeg : Str -> A ; regADeg : Str -> A ;
@@ -538,7 +549,7 @@ oper
mkV2 = overload { mkV2 = overload {
mkV2 : Str -> V2 = \s -> dirV2 (regV s) ; mkV2 : Str -> V2 = \s -> dirV2 (regV s) ;
mkV2 : V -> V2 = dirV2 ; mkV2 : V -> V2 = dirV2 ;
mkV2 : V -> Prep -> V2 = mk2V2 mkV2 : V -> Prep -> V2 = mk2V2
} ; } ;
mk2V2 : V -> Prep -> V2 ; mk2V2 : V -> Prep -> V2 ;

View File

@@ -1,5 +1,5 @@
--# -path=alltenses --# -path=alltenses
concrete ParseSpa of ParseEngAbs = concrete ParseSpa of ParseEngAbs =
TenseSpa, TenseSpa,
-- CatSpa, -- CatSpa,
NounSpa - [PPartNP], NounSpa - [PPartNP],
@@ -19,7 +19,7 @@ concrete ParseSpa of ParseEngAbs =
VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV, VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
ClSlash, RCl, EmptyRelSlash], ClSlash, RCl, EmptyRelSlash],
DictEngSpa ** DictEngSpa **
open MorphoSpa, ResSpa, ParadigmsSpa, SyntaxSpa, Prelude in { open MorphoSpa, ResSpa, ParadigmsSpa, SyntaxSpa, Prelude in {
flags flags
@@ -30,11 +30,11 @@ flags
lin lin
-- missing from ExtraSpa; should not really be there either -- missing from ExtraSpa; should not really be there either
GenNP np = GenNP np =
let denp = (np.s ! ResSpa.genitive).ton in { let denp = (np.s ! ResSpa.genitive).ton in {
s = \\_,_,_,_ => [] ; s = \\_,_,_,_ => [] ;
sp = \\_,_,_ => denp ; sp = \\_,_,_ => denp ;
s2 = denp ; s2 = denp ;
isNeg = False ; isNeg = False ;
} ; } ;
@@ -48,7 +48,7 @@ lin
another_Quant = mkQuantifier "otro" "otra" "otros" "otras" ; another_Quant = mkQuantifier "otro" "otra" "otros" "otras" ;
some_Quant = mkQuantifier "algún" "alguna" "algunos" "algunas" ; some_Quant = mkQuantifier "algún" "alguna" "algunos" "algunas" ;
anySg_Det = mkDeterminer "algún" "alguna" Sg False ; ---- also meaning "whichever" ? anySg_Det = mkDeterminer "algún" "alguna" Sg False ; ---- also meaning "whichever" ?
each_Det = SyntaxSpa.every_Det ; each_Det = SyntaxSpa.every_Det ;
but_Subj = {s = "pero" ; m = Indic} ; ---- strange to have this as Subj but_Subj = {s = "pero" ; m = Indic} ; ---- strange to have this as Subj
@@ -70,7 +70,7 @@ lin
g = cn.g g = cn.g
} ; } ;
{- {-
DashCN noun1 noun2 = { DashCN noun1 noun2 = {
s = \\n,c => noun1.s ! Sg ! Nom ++ "-" ++ noun2.s ! n ! c ; s = \\n,c => noun1.s ! Sg ! Nom ++ "-" ++ noun2.s ! n ! c ;
g = noun2.g g = noun2.g
@@ -80,7 +80,7 @@ lin
s = \\n,c => v.s ! VPresPart ; s = \\n,c => v.s ! VPresPart ;
g = Neutr g = Neutr
} ; } ;
GerundAP v = { GerundAP v = {
s = \\agr => v.s ! VPresPart ; s = \\agr => v.s ! VPresPart ;
isPre = True isPre = True
@@ -89,7 +89,8 @@ lin
PastPartAP v = { PastPartAP v = {
s = table { s = table {
AF g n => v.s ! VPart g n ; ASg g _ => v.s ! VPart g Sg ;
APl g _ => v.s ! VPart g Pl ;
_ => v.s ! VPart Masc Sg ---- the adverb form _ => v.s ! VPart Masc Sg ---- the adverb form
} ; } ;
isPre = True isPre = True
@@ -108,11 +109,11 @@ lin
infVP v.typ vp ant.a p.p a) infVP v.typ vp ant.a p.p a)
(predVc v) ; (predVc v) ;
SlashVPIV2V v p vpi = insertObjc (\\a => p.s ++ SlashVPIV2V v p vpi = insertObjc (\\a => p.s ++
v.c3 ++ v.c3 ++
vpi.s ! VVAux ! a) vpi.s ! VVAux ! a)
(predVc v) ; (predVc v) ;
ComplVV v a p vp = insertObj (\\agr => a.s ++ p.s ++ ComplVV v a p vp = insertObj (\\agr => a.s ++ p.s ++
infVP v.typ vp a.a p.p agr) infVP v.typ vp a.a p.p agr)
(predVV v) ; (predVV v) ;
-} -}
@@ -126,10 +127,10 @@ lin
{- {-
CompQS qs = {s = \\_ => qs.s ! QIndir} ; CompQS qs = {s = \\_ => qs.s ! QIndir} ;
CompVP ant p vp = {s = \\a => ant.s ++ p.s ++ CompVP ant p vp = {s = \\a => ant.s ++ p.s ++
infVP VVInf vp ant.a p.p a} ; infVP VVInf vp ant.a p.p a} ;
VPSlashVS vs vp = VPSlashVS vs vp =
insertObj (\\a => infVP VVInf vp Simul CPos a) (predV vs) ** insertObj (\\a => infVP VVInf vp Simul CPos a) (predV vs) **
{c2 = ""; gapInMiddle = False} ; {c2 = ""; gapInMiddle = False} ;
@@ -147,11 +148,11 @@ lin
s = \\c => np1.s ! c ++ "," ++ np2.s ! npNom ; s = \\c => np1.s ! c ++ "," ++ np2.s ! npNom ;
a = np1.a a = np1.a
} ; } ;
AdAdV = cc2 ; AdAdV = cc2 ;
UttAdV adv = adv; UttAdV adv = adv;
-} -}
} }