forked from GitHub/gf-core
renamed mkNP to makeNP in Paradigms; added overloaded Paradigms to all 10
This commit is contained in:
@@ -328,7 +328,7 @@ resource ParadigmsAra = open
|
||||
|
||||
mkN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p ; c3 = q} ;
|
||||
|
||||
mkNP : (_,_,_ : Str) -> PerGenNum -> NP = \ana,nI,I,pgn ->
|
||||
makeNP : (_,_,_ : Str) -> PerGenNum -> NP = \ana,nI,I,pgn ->
|
||||
{ s =
|
||||
table {
|
||||
Nom => ana;
|
||||
|
||||
@@ -130,7 +130,7 @@ oper
|
||||
-- To form a noun phrase that can also be plural,
|
||||
-- you can use the worst-case function.
|
||||
|
||||
mkNP : Str -> Gender -> Number -> NP ;
|
||||
makeNP : Str -> Gender -> Number -> NP ;
|
||||
|
||||
----2 Adjectives
|
||||
--
|
||||
@@ -302,7 +302,7 @@ oper
|
||||
mkN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p ; c3 = q} ;
|
||||
|
||||
mkPN x g = {s = x ; g = g} ** {lock_PN = <>} ;
|
||||
mkNP x g n = {s = (pn2np (mkPN x g)).s; a = agrP3 g n ; hasClit = False} ** {lock_NP = <>} ;
|
||||
makeNP x g n = {s = (pn2np (mkPN x g)).s; a = agrP3 g n ; hasClit = False} ** {lock_NP = <>} ;
|
||||
--
|
||||
mkA a b c d e =
|
||||
compADeg {s = \\_ => (mkAdj a b c d e).s ; isPre = False ; lock_A = <>} ;
|
||||
|
||||
@@ -64,31 +64,36 @@ oper
|
||||
|
||||
--2 Nouns
|
||||
|
||||
-- Worst case: give all four forms. The gender is computed from the
|
||||
-- last letter of the second form (if "n", then $utrum$, otherwise $neutrum$).
|
||||
|
||||
mkN : (dreng,drengen,drenge,drengene : Str) -> N ;
|
||||
mkN : overload {
|
||||
|
||||
-- The regular function takes the singular indefinite form
|
||||
-- and computes the other forms and the gender by a heuristic.
|
||||
-- The heuristic is that all nouns are $utrum$ with the
|
||||
-- plural ending "er" or "r".
|
||||
|
||||
regN : Str -> N ;
|
||||
mkN : (bil : Str) -> N ;
|
||||
|
||||
-- Giving gender manually makes the heuristic more reliable.
|
||||
|
||||
regGenN : Str -> Gender -> N ;
|
||||
mkN : (hus : Str) -> Gender -> N ;
|
||||
|
||||
-- This function takes the singular indefinite and definite forms; the
|
||||
-- gender is computed from the definite form.
|
||||
|
||||
mk2N : (bil,bilen : Str) -> N ;
|
||||
mkN : (bil,bilen : Str) -> N ;
|
||||
|
||||
-- This function takes the singular indefinite and definite and the plural
|
||||
-- indefinite
|
||||
|
||||
mk3N : (bil,bilen,biler : Str) -> N ;
|
||||
mkN : (bil,bilen,biler : Str) -> N ;
|
||||
|
||||
-- Worst case: give all four forms. The gender is computed from the
|
||||
-- last letter of the second form (if "n", then $utrum$, otherwise $neutrum$).
|
||||
|
||||
mkN : (dreng,drengen,drenge,drengene : Str) -> N ;
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
|
||||
--3 Compound nouns
|
||||
@@ -129,60 +134,36 @@ oper
|
||||
--
|
||||
-- Proper names, with a regular genitive, are formed as follows
|
||||
|
||||
mkPN : Str -> Gender -> PN ; -- Paris neutrum
|
||||
regPN : Str -> PN ; -- utrum gender
|
||||
mkPN : overload {
|
||||
mkPN : Str -> PN ; -- utrum
|
||||
mkPN : Str -> Gender -> PN ;
|
||||
mkPN : N -> PN ;
|
||||
} ;
|
||||
|
||||
-- Sometimes you can reuse a common noun as a proper name, e.g. "Bank".
|
||||
|
||||
nounPN : N -> PN ;
|
||||
|
||||
-- To form a noun phrase that can also be plural and have an irregular
|
||||
-- genitive, you can use the worst-case function.
|
||||
|
||||
mkNP : Str -> Str -> Number -> Gender -> NP ;
|
||||
|
||||
--2 Adjectives
|
||||
|
||||
-- Non-comparison one-place adjectives need three forms:
|
||||
-- The regular pattern works for many adjectives, e.g. those ending
|
||||
-- with "ig". Two, five, or at worst five forms are sometimes needed.
|
||||
|
||||
mkA : (galen,galet,galne : Str) -> A ;
|
||||
mkA : overload {
|
||||
mkA : (fin : Str) -> A ;
|
||||
mkA : (fin,fint : Str) -> A ;
|
||||
mkA : (galen,galet,galne : Str) -> A ;
|
||||
mkA : (stor,stort,store,storre,storst : Str) -> A ;
|
||||
|
||||
-- For regular adjectives, the other forms are derived.
|
||||
-- If comparison is formed by "mer", "mest", as in general for
|
||||
-- long adjective, the following pattern is used:
|
||||
|
||||
regA : Str -> A ;
|
||||
mkA : A -> A ; -- -/mer/mest norsk
|
||||
} ;
|
||||
|
||||
-- In most cases, two forms are enough.
|
||||
|
||||
mk2A : (stor,stort : Str) -> A ;
|
||||
|
||||
--3 Two-place adjectives
|
||||
--
|
||||
-- Two-place adjectives need a preposition for their second argument.
|
||||
|
||||
mkA2 : A -> Prep -> A2 ;
|
||||
|
||||
-- Comparison adjectives may need as many as five forms.
|
||||
|
||||
mkADeg : (stor,stort,store,storre,storst : Str) -> A ;
|
||||
|
||||
-- The regular pattern works for many adjectives, e.g. those ending
|
||||
-- with "ig".
|
||||
|
||||
regADeg : Str -> A ;
|
||||
|
||||
-- Just the comparison forms can be irregular.
|
||||
|
||||
irregADeg : (tung,tyngre,tyngst : Str) -> A ;
|
||||
|
||||
-- Sometimes just the positive forms are irregular.
|
||||
|
||||
mk3ADeg : (galen,galet,galna : Str) -> A ;
|
||||
mk2ADeg : (bred,bredt : Str) -> A ;
|
||||
|
||||
-- If comparison is formed by "mer", "mest", as in general for
|
||||
-- long adjective, the following pattern is used:
|
||||
|
||||
compoundA : A -> A ; -- -/mer/mest norsk
|
||||
|
||||
|
||||
--2 Adverbs
|
||||
@@ -201,22 +182,34 @@ oper
|
||||
|
||||
--2 Verbs
|
||||
--
|
||||
-- The worst case needs six forms.
|
||||
|
||||
mkV : (spise,spiser,spises,spiste,spist,spis : Str) -> V ;
|
||||
mkV : overload {
|
||||
|
||||
-- The 'regular verb' function is the first conjugation.
|
||||
|
||||
regV : (snakke : Str) -> V ;
|
||||
mkV : (snakke : Str) -> V ;
|
||||
|
||||
-- The almost regular verb function needs the infinitive and the preteritum.
|
||||
|
||||
mk2V : (leve,levde : Str) -> V ;
|
||||
mkV : (leve,levde : Str) -> V ;
|
||||
|
||||
-- There is an extensive list of irregular verbs in the module $IrregDan$.
|
||||
-- In practice, it is enough to give three forms, as in school books.
|
||||
|
||||
irregV : (drikke, drak, drukket : Str) -> V ;
|
||||
mkV : (drikke, drakk, drukket : Str) -> V ;
|
||||
|
||||
-- The worst case needs six forms.
|
||||
|
||||
mkV : (spise,spiser,spises,spiste,spist,spis : Str) -> V ;
|
||||
|
||||
|
||||
--3 Verbs with a particle.
|
||||
--
|
||||
-- The particle, such as in "lukke op", is given as a string.
|
||||
|
||||
mkV : V -> Str -> V ;
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
--3 Verbs with 'være' as auxiliary
|
||||
@@ -227,12 +220,6 @@ oper
|
||||
|
||||
|
||||
|
||||
--3 Verbs with a particle
|
||||
--
|
||||
-- The particle, such as in "passe på", is given as a string.
|
||||
|
||||
partV : V -> Str -> V ;
|
||||
|
||||
|
||||
--3 Deponent verbs
|
||||
--
|
||||
@@ -246,11 +233,14 @@ oper
|
||||
--3 Two-place verbs
|
||||
--
|
||||
-- Two-place verbs need a preposition, except the special case with direct object.
|
||||
-- (transitive verbs). Notice that a particle comes from the $V$.
|
||||
-- (transitive verbs). Notice that, if a particle is needed, it comes from the $V$.
|
||||
|
||||
mkV2 : V -> Prep -> V2 ;
|
||||
mkV2 : overload {
|
||||
mkV2 : Str -> V2 ;
|
||||
mkV2 : V -> V2 ;
|
||||
mkV2 : V -> Prep -> V2 ;
|
||||
} ;
|
||||
|
||||
dirV2 : V -> V2 ;
|
||||
|
||||
--3 Three-place verbs
|
||||
--
|
||||
@@ -315,18 +305,18 @@ oper
|
||||
mkPrep p = {s = p ; lock_Prep = <>} ;
|
||||
noPrep = mkPrep [] ;
|
||||
|
||||
mkN x y z u = mkSubstantive x y z u ** {g = extNGen y ; lock_N = <>} ;
|
||||
mk4N x y z u = mkSubstantive x y z u ** {g = extNGen y ; lock_N = <>} ;
|
||||
|
||||
regN x = regGenN x Utr ;
|
||||
|
||||
regGenN x g = case last x of {
|
||||
"e" => case g of {
|
||||
Utr => mkN x (x + "n") (x + "r") (x + "rne") ;
|
||||
Neutr => mkN x (x + "t") (x + "r") (init x + "ene")
|
||||
Utr => mk4N x (x + "n") (x + "r") (x + "rne") ;
|
||||
Neutr => mk4N x (x + "t") (x + "r") (init x + "ene")
|
||||
} ;
|
||||
_ => case g of {
|
||||
Utr => mkN x (x + "en") (x + "er") (x + "erne") ;
|
||||
Neutr => mkN x (x + "et") (x + "") (x + "ene")
|
||||
Utr => mk4N x (x + "en") (x + "er") (x + "erne") ;
|
||||
Neutr => mk4N x (x + "et") (x + "") (x + "ene")
|
||||
}
|
||||
} ;
|
||||
|
||||
@@ -336,21 +326,26 @@ oper
|
||||
_ => mk3N x y x
|
||||
} ;
|
||||
|
||||
mk3N x y z = let u = ifTok Str x z "ene" "ne" in mkN x y z (z + u) ;
|
||||
mk3N x y z = let u = ifTok Str x z "ene" "ne" in mk4N x y z (z + u) ;
|
||||
|
||||
mkN2 = \n,p -> n ** {lock_N2 = <> ; c2 = p.s} ;
|
||||
regN2 n g = mkN2 (regGenN n g) (mkPreposition "av") ;
|
||||
mkN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p.s ; c3 = q.s} ;
|
||||
|
||||
mkPN n g = {s = \\c => mkCase c n ; g = g} ** {lock_PN = <>} ;
|
||||
regPN n = mkPN n utrum ;
|
||||
mk2PN n g = {s = \\c => mkCase c n ; g = g} ** {lock_PN = <>} ;
|
||||
regPN n = mk2PN n utrum ;
|
||||
nounPN n = {s = n.s ! singular ! Indef ; g = n.g ; lock_PN = <>} ;
|
||||
mkNP x y n g =
|
||||
|
||||
-- To form a noun phrase that can also be plural and have an irregular
|
||||
-- genitive, you can use the worst-case function.
|
||||
|
||||
makeNP : Str -> Str -> Number -> Gender -> NP ;
|
||||
makeNP x y n g =
|
||||
{s = table {NPPoss _ => x ; _ => y} ; a = agrP3 g n ;
|
||||
lock_NP = <>} ;
|
||||
|
||||
mkA = mk3ADeg ;
|
||||
mk2A a b = mkA a b (a + "e") ;
|
||||
mk3A = mk3ADeg ;
|
||||
mk2A a b = mk3A a b (a + "e") ;
|
||||
regA a = (regADeg a) ** {lock_A = <>} ;
|
||||
|
||||
mkA2 a p = a ** {c2 = p.s ; lock_A2 = <>} ;
|
||||
@@ -377,7 +372,7 @@ oper
|
||||
mkAdV x = ss x ** {lock_AdV = <>} ;
|
||||
mkAdA x = ss x ** {lock_AdA = <>} ;
|
||||
|
||||
mkV a b c d e f = mkVerb6 a b c d e f **
|
||||
mk6V a b c d e f = mkVerb6 a b c d e f **
|
||||
{part = [] ; vtype = VAct ; lock_V = <> ; isVaere = False} ;
|
||||
|
||||
regV a = case last a of {
|
||||
@@ -400,7 +395,7 @@ oper
|
||||
_ => drikke + "r"
|
||||
}
|
||||
in
|
||||
mkV drikke drikker (drikke + "s") drakk drukket (mkImper drikk) ;
|
||||
mk6V drikke drikker (drikke + "s") drakk drukket (mkImper drikk) ;
|
||||
|
||||
vaereV v = {
|
||||
s = v.s ;
|
||||
@@ -425,8 +420,8 @@ oper
|
||||
s = v.s ; part = v.part ; vtype = VRefl ; isVaere = False ; lock_V = <>
|
||||
} ;
|
||||
|
||||
mkV2 v p = v ** {c2 = p.s ; lock_V2 = <>} ;
|
||||
dirV2 v = mkV2 v (mkPrep []) ;
|
||||
mk2V2 v p = v ** {c2 = p.s ; lock_V2 = <>} ;
|
||||
dirV2 v = mk2V2 v (mkPrep []) ;
|
||||
|
||||
mkV3 v p q = v ** {c2 = p.s ; c3 = q.s ; lock_V3 = <>} ;
|
||||
dirV3 v p = mkV3 v noPrep p ;
|
||||
@@ -434,13 +429,13 @@ oper
|
||||
|
||||
mkV0 v = v ** {lock_V0 = <>} ;
|
||||
mkVS v = v ** {lock_VS = <>} ;
|
||||
mkV2S v p = mkV2 v p ** {lock_V2S = <>} ;
|
||||
mkV2S v p = mk2V2 v p ** {lock_V2S = <>} ;
|
||||
mkVV v = v ** {c2 = "å" ; lock_VV = <>} ;
|
||||
mkV2V v p t = mkV2 v p ** {s3 = t ; lock_V2V = <>} ;
|
||||
mkV2V v p t = mk2V2 v p ** {s3 = t ; lock_V2V = <>} ;
|
||||
mkVA v = v ** {lock_VA = <>} ;
|
||||
mkV2A v p = mkV2 v p ** {lock_V2A = <>} ;
|
||||
mkV2A v p = mk2V2 v p ** {lock_V2A = <>} ;
|
||||
mkVQ v = v ** {lock_VQ = <>} ;
|
||||
mkV2Q v p = mkV2 v p ** {lock_V2Q = <>} ;
|
||||
mkV2Q v p = mk2V2 v p ** {lock_V2Q = <>} ;
|
||||
|
||||
mkAS v = v ** {lock_A = <>} ;
|
||||
mkA2S v p = mkA2 v p ** {lock_A = <>} ;
|
||||
@@ -452,5 +447,73 @@ oper
|
||||
AS, A2S, AV : Type = A ;
|
||||
A2V : Type = A2 ;
|
||||
|
||||
---------------
|
||||
|
||||
mkN = overload {
|
||||
mkN : Str -> N = regN ;
|
||||
mkN : Str -> Gender -> N = regGenN ;
|
||||
mkN : (bil,bilen : Str) -> N = mk2N ;
|
||||
mkN : (bil,bilen,biler : Str) -> N = mk3N ;
|
||||
mkN : (dreng,drengen,drenge,drengene : Str) -> N = mk4N ;
|
||||
} ;
|
||||
|
||||
|
||||
regN : Str -> N ;
|
||||
regGenN : Str -> Gender -> N ;
|
||||
mk2N : (bil,bilen : Str) -> N ;
|
||||
mk3N : (bil,bilen,biler : Str) -> N ;
|
||||
mk4N : (dreng,drengen,drenge,drengene : Str) -> N ;
|
||||
|
||||
mkPN = overload {
|
||||
mkPN : Str -> PN = regPN ; -- masculine
|
||||
mkPN : Str -> Gender -> PN = mk2PN ;
|
||||
mkPN : N -> PN = nounPN ;
|
||||
} ;
|
||||
|
||||
regPN : Str -> PN ; -- utrum
|
||||
mk2PN : Str -> Gender -> PN ;
|
||||
nounPN : N -> PN ;
|
||||
|
||||
mkA = overload {
|
||||
mkA : (fin : Str) -> A = regADeg ;
|
||||
mkA : (fin,fint : Str) -> A = mk2ADeg ;
|
||||
mkA : (galen,galet,galne : Str) -> A = mk3ADeg ;
|
||||
mkA : (stor,stort,store,storre,storst : Str) -> A = mkADeg ;
|
||||
mkA : A -> A = compoundA ; -- -/mer/mest norsk
|
||||
} ;
|
||||
|
||||
mk3A : (galen,galet,galne : Str) -> A ;
|
||||
regA : Str -> A ;
|
||||
mk2A : (stor,stort : Str) -> A ;
|
||||
mkADeg : (stor,stort,store,storre,storst : Str) -> A ;
|
||||
regADeg : Str -> A ;
|
||||
irregADeg : (tung,tyngre,tyngst : Str) -> A ;
|
||||
mk3ADeg : (galen,galet,galne : Str) -> A ;
|
||||
mk2ADeg : (bred,bredt : Str) -> A ;
|
||||
compoundA : A -> A ; -- -/mer/mest norsk
|
||||
|
||||
mkV = overload {
|
||||
mkV : (snakke : Str) -> V = regV ;
|
||||
mkV : (leve,levde : Str) -> V = mk2V ;
|
||||
mkV : (drikke, drakk, drukket : Str) -> V = irregV ;
|
||||
mkV : (spise,spiser,spises,spiste,spist,spis : Str) -> V = mk6V ;
|
||||
mkV : V -> Str -> V = partV ;
|
||||
} ;
|
||||
|
||||
|
||||
regV : (snakke : Str) -> V ;
|
||||
mk2V : (leve,levde : Str) -> V ;
|
||||
irregV : (drikke, drakk, drukket : Str) -> V ;
|
||||
mk6V : (spise,spiser,spises,spiste,spist,spis : Str) -> V ;
|
||||
partV : V -> Str -> V ;
|
||||
|
||||
mkV2 = overload {
|
||||
mkV2 : Str -> V2 = \s -> dirV2 (regV s) ;
|
||||
mkV2 : V -> V2 = dirV2 ;
|
||||
mkV2 : V -> Prep -> V2 = mk2V2 ;
|
||||
} ;
|
||||
|
||||
mk2V2 : V -> Prep -> V2 ;
|
||||
dirV2 : V -> V2 ;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -4,6 +4,10 @@ It has been machine-generated from the source files; each chapter gives a link
|
||||
to the relevant source files, which give more information. Some of the files have
|
||||
not yet been prepared so that the machine generated documentation has the right format.
|
||||
|
||||
Since the character encoding is UTF-8 for Russian and Latin-1 for other languages, you
|
||||
may have to change the encoding preference of your browser when reading different
|
||||
parts of the document.
|
||||
|
||||
The second-last chapter gives instructions on how to "browse" the library by
|
||||
loading the grammars into the ``gf`` command editor.
|
||||
|
||||
|
||||
@@ -339,6 +339,7 @@ Source 2: <A HREF="../abstract/Cat.gf"><CODE>http://www.cs.chalmers.se/~aarne/GF
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P></P>
|
||||
<A NAME="toc2"></A>
|
||||
<H1>Syntax Rules</H1>
|
||||
<P>
|
||||
@@ -1532,6 +1533,7 @@ Source: <A HREF="../api/Constructors.gf"><CODE>http://www.cs.chalmers.se/~aarne/
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P></P>
|
||||
<A NAME="toc3"></A>
|
||||
<H1>Structural Words</H1>
|
||||
<P>
|
||||
@@ -2025,6 +2027,7 @@ Source: <A HREF="../abstract/Structural.gf"><CODE>http://www.cs.chalmers.se/~aar
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P></P>
|
||||
<A NAME="toc4"></A>
|
||||
<H1>Paradigms for Danish</H1>
|
||||
<P>
|
||||
@@ -2093,30 +2096,30 @@ source <A HREF="../danish/ParadigmsDan.gf"><CODE>http://www.cs.chalmers.se/~aarn
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkN</CODE></TD>
|
||||
<TD><CODE>(dreng,drengen,drenge,drengene : Str) -> N</CODE></TD>
|
||||
<TD><CODE>(bil : Str) -> N</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>regN</CODE></TD>
|
||||
<TD><CODE>Str -> N</CODE></TD>
|
||||
<TD><CODE>mkN</CODE></TD>
|
||||
<TD><CODE>(hus : Str) -> Gender -> N</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>regGenN</CODE></TD>
|
||||
<TD><CODE>Str -> Gender -> N</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mk2N</CODE></TD>
|
||||
<TD><CODE>mkN</CODE></TD>
|
||||
<TD><CODE>(bil,bilen : Str) -> N</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mk3N</CODE></TD>
|
||||
<TD><CODE>mkN</CODE></TD>
|
||||
<TD><CODE>(bil,bilen,biler : Str) -> N</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkN</CODE></TD>
|
||||
<TD><CODE>(dreng,drengen,drenge,drengene : Str) -> N</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkN2</CODE></TD>
|
||||
<TD><CODE>N -> Prep -> N2</CODE></TD>
|
||||
<TD>-</TD>
|
||||
@@ -2133,22 +2136,27 @@ source <A HREF="../danish/ParadigmsDan.gf"><CODE>http://www.cs.chalmers.se/~aarn
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkPN</CODE></TD>
|
||||
<TD><CODE>Str -> Gender -> PN</CODE></TD>
|
||||
<TD><I>Paris neutrum</I></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>regPN</CODE></TD>
|
||||
<TD><CODE>Str -> PN</CODE></TD>
|
||||
<TD><I>utrum gender</I></TD>
|
||||
<TD><I>utrum</I></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>nounPN</CODE></TD>
|
||||
<TD><CODE>mkPN</CODE></TD>
|
||||
<TD><CODE>Str -> Gender -> PN</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkPN</CODE></TD>
|
||||
<TD><CODE>N -> PN</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkNP</CODE></TD>
|
||||
<TD><CODE>Str -> Str -> Number -> Gender -> NP</CODE></TD>
|
||||
<TD><CODE>mkA</CODE></TD>
|
||||
<TD><CODE>(fin : Str) -> A</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkA</CODE></TD>
|
||||
<TD><CODE>(fin,fint : Str) -> A</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
@@ -2157,14 +2165,14 @@ source <A HREF="../danish/ParadigmsDan.gf"><CODE>http://www.cs.chalmers.se/~aarn
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>regA</CODE></TD>
|
||||
<TD><CODE>Str -> A</CODE></TD>
|
||||
<TD><CODE>mkA</CODE></TD>
|
||||
<TD><CODE>(stor,stort,store,storre,storst : Str) -> A</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mk2A</CODE></TD>
|
||||
<TD><CODE>(stor,stort : Str) -> A</CODE></TD>
|
||||
<TD>-</TD>
|
||||
<TD><CODE>mkA</CODE></TD>
|
||||
<TD><CODE>A -> A</CODE></TD>
|
||||
<TD><I>-/mer/mest norsk</I></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkA2</CODE></TD>
|
||||
@@ -2172,36 +2180,6 @@ source <A HREF="../danish/ParadigmsDan.gf"><CODE>http://www.cs.chalmers.se/~aarn
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkADeg</CODE></TD>
|
||||
<TD><CODE>(stor,stort,store,storre,storst : Str) -> A</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>regADeg</CODE></TD>
|
||||
<TD><CODE>Str -> A</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>irregADeg</CODE></TD>
|
||||
<TD><CODE>(tung,tyngre,tyngst : Str) -> A</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mk3ADeg</CODE></TD>
|
||||
<TD><CODE>(galen,galet,galna : Str) -> A</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mk2ADeg</CODE></TD>
|
||||
<TD><CODE>(bred,bredt : Str) -> A</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>compoundA</CODE></TD>
|
||||
<TD><CODE>A -> A</CODE></TD>
|
||||
<TD><I>-/mer/mest norsk</I></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkAdv</CODE></TD>
|
||||
<TD><CODE>Str -> Adv</CODE></TD>
|
||||
<TD>-</TD>
|
||||
@@ -2218,22 +2196,27 @@ source <A HREF="../danish/ParadigmsDan.gf"><CODE>http://www.cs.chalmers.se/~aarn
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkV</CODE></TD>
|
||||
<TD><CODE>(spise,spiser,spises,spiste,spist,spis : Str) -> V</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>regV</CODE></TD>
|
||||
<TD><CODE>(snakke : Str) -> V</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mk2V</CODE></TD>
|
||||
<TD><CODE>mkV</CODE></TD>
|
||||
<TD><CODE>(leve,levde : Str) -> V</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>irregV</CODE></TD>
|
||||
<TD><CODE>(drikke, drak, drukket : Str) -> V</CODE></TD>
|
||||
<TD><CODE>mkV</CODE></TD>
|
||||
<TD><CODE>(drikke, drakk, drukket : Str) -> V</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkV</CODE></TD>
|
||||
<TD><CODE>(spise,spiser,spises,spiste,spist,spis : Str) -> V</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkV</CODE></TD>
|
||||
<TD><CODE>V -> Str -> V</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
@@ -2242,11 +2225,6 @@ source <A HREF="../danish/ParadigmsDan.gf"><CODE>http://www.cs.chalmers.se/~aarn
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>partV</CODE></TD>
|
||||
<TD><CODE>V -> Str -> V</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>depV</CODE></TD>
|
||||
<TD><CODE>V -> V</CODE></TD>
|
||||
<TD>-</TD>
|
||||
@@ -2258,15 +2236,20 @@ source <A HREF="../danish/ParadigmsDan.gf"><CODE>http://www.cs.chalmers.se/~aarn
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkV2</CODE></TD>
|
||||
<TD><CODE>V -> Prep -> V2</CODE></TD>
|
||||
<TD><CODE>Str -> V2</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>dirV2</CODE></TD>
|
||||
<TD><CODE>mkV2</CODE></TD>
|
||||
<TD><CODE>V -> V2</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkV2</CODE></TD>
|
||||
<TD><CODE>V -> Prep -> V2</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkV3</CODE></TD>
|
||||
<TD><CODE>V -> Prep -> Prep -> V3</CODE></TD>
|
||||
<TD><I>snakke, med, om</I></TD>
|
||||
@@ -2348,6 +2331,7 @@ source <A HREF="../danish/ParadigmsDan.gf"><CODE>http://www.cs.chalmers.se/~aarn
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P></P>
|
||||
<A NAME="toc5"></A>
|
||||
<H1>Paradigms for English</H1>
|
||||
<P>
|
||||
@@ -2631,6 +2615,7 @@ source <A HREF="../english/ParadigmsEng.gf"><CODE>http://www.cs.chalmers.se/~aar
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P></P>
|
||||
<A NAME="toc6"></A>
|
||||
<H1>Paradigms for Finnish</H1>
|
||||
<P>
|
||||
@@ -3044,6 +3029,7 @@ source <A HREF="../finnish/ParadigmsFin.gf"><CODE>http://www.cs.chalmers.se/~aar
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P></P>
|
||||
<A NAME="toc7"></A>
|
||||
<H1>Paradigms for French</H1>
|
||||
<P>
|
||||
@@ -3327,6 +3313,7 @@ source <A HREF="../french/ParadigmsFre.gf"><CODE>http://www.cs.chalmers.se/~aarn
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P></P>
|
||||
<A NAME="toc8"></A>
|
||||
<H1>Paradigms for German</H1>
|
||||
<P>
|
||||
@@ -3640,6 +3627,7 @@ source <A HREF="../german/ParadigmsGer.gf"><CODE>http://www.cs.chalmers.se/~aarn
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P></P>
|
||||
<A NAME="toc9"></A>
|
||||
<H1>Paradigms for Italian</H1>
|
||||
<P>
|
||||
@@ -3928,6 +3916,7 @@ source <A HREF="../italian/ParadigmsIta.gf"><CODE>http://www.cs.chalmers.se/~aar
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P></P>
|
||||
<A NAME="toc10"></A>
|
||||
<H1>Paradigms for Norwegian</H1>
|
||||
<P>
|
||||
@@ -4001,25 +3990,25 @@ source <A HREF="../norwegian/ParadigmsNor.gf"><CODE>http://www.cs.chalmers.se/~a
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkN</CODE></TD>
|
||||
<TD><CODE>(dreng,drengen,drenger,drengene : Str) -> N</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>regN</CODE></TD>
|
||||
<TD><CODE>Str -> N</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>regGenN</CODE></TD>
|
||||
<TD><CODE>mkN</CODE></TD>
|
||||
<TD><CODE>Str -> Gender -> N</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mk2N</CODE></TD>
|
||||
<TD><CODE>mkN</CODE></TD>
|
||||
<TD><CODE>(bil,bilen : Str) -> N</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkN</CODE></TD>
|
||||
<TD><CODE>(dreng,drengen,drenger,drengene : Str) -> N</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkN2</CODE></TD>
|
||||
<TD><CODE>N -> Prep -> N2</CODE></TD>
|
||||
<TD>-</TD>
|
||||
@@ -4035,23 +4024,28 @@ source <A HREF="../norwegian/ParadigmsNor.gf"><CODE>http://www.cs.chalmers.se/~a
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>regPN</CODE></TD>
|
||||
<TD><CODE>mkPN</CODE></TD>
|
||||
<TD><CODE>Str -> PN</CODE></TD>
|
||||
<TD><I>utrum</I></TD>
|
||||
<TD><I>masculine</I></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>regGenPN</CODE></TD>
|
||||
<TD><CODE>mkPN</CODE></TD>
|
||||
<TD><CODE>Str -> Gender -> PN</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>nounPN</CODE></TD>
|
||||
<TD><CODE>mkPN</CODE></TD>
|
||||
<TD><CODE>N -> PN</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkNP</CODE></TD>
|
||||
<TD><CODE>Str -> Str -> Number -> Gender -> NP</CODE></TD>
|
||||
<TD><CODE>mkA</CODE></TD>
|
||||
<TD><CODE>(fin : Str) -> A</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkA</CODE></TD>
|
||||
<TD><CODE>(fin,fint : Str) -> A</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
@@ -4060,14 +4054,14 @@ source <A HREF="../norwegian/ParadigmsNor.gf"><CODE>http://www.cs.chalmers.se/~a
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>regA</CODE></TD>
|
||||
<TD><CODE>Str -> A</CODE></TD>
|
||||
<TD><CODE>mkA</CODE></TD>
|
||||
<TD><CODE>(stor,stort,store,storre,storst : Str) -> A</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mk2A</CODE></TD>
|
||||
<TD><CODE>(stor,stort : Str) -> A</CODE></TD>
|
||||
<TD>-</TD>
|
||||
<TD><CODE>mkA</CODE></TD>
|
||||
<TD><CODE>A -> A</CODE></TD>
|
||||
<TD><I>-/mer/mest norsk</I></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkA2</CODE></TD>
|
||||
@@ -4075,36 +4069,6 @@ source <A HREF="../norwegian/ParadigmsNor.gf"><CODE>http://www.cs.chalmers.se/~a
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkADeg</CODE></TD>
|
||||
<TD><CODE>(stor,stort,store,storre,storst : Str) -> A</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>regADeg</CODE></TD>
|
||||
<TD><CODE>Str -> A</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>irregADeg</CODE></TD>
|
||||
<TD><CODE>(tung,tyngre,tyngst : Str) -> A</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mk3ADeg</CODE></TD>
|
||||
<TD><CODE>(galen,galet,galne : Str) -> A</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mk2ADeg</CODE></TD>
|
||||
<TD><CODE>(bred,bredt : Str) -> A</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>compoundA</CODE></TD>
|
||||
<TD><CODE>A -> A</CODE></TD>
|
||||
<TD><I>-/mer/mest norsk</I></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkAdv</CODE></TD>
|
||||
<TD><CODE>Str -> Adv</CODE></TD>
|
||||
<TD><I>e.g. her</I></TD>
|
||||
@@ -4121,35 +4085,35 @@ source <A HREF="../norwegian/ParadigmsNor.gf"><CODE>http://www.cs.chalmers.se/~a
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkV</CODE></TD>
|
||||
<TD><CODE>(spise,spiser,spises,spiste,spist,spis : Str) -> V</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>regV</CODE></TD>
|
||||
<TD><CODE>(snakke : Str) -> V</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mk2V</CODE></TD>
|
||||
<TD><CODE>mkV</CODE></TD>
|
||||
<TD><CODE>(leve,levde : Str) -> V</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>irregV</CODE></TD>
|
||||
<TD><CODE>mkV</CODE></TD>
|
||||
<TD><CODE>(drikke, drakk, drukket : Str) -> V</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkV</CODE></TD>
|
||||
<TD><CODE>(spise,spiser,spises,spiste,spist,spis : Str) -> V</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkV</CODE></TD>
|
||||
<TD><CODE>V -> Str -> V</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>vaereV</CODE></TD>
|
||||
<TD><CODE>V -> V</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>partV</CODE></TD>
|
||||
<TD><CODE>V -> Str -> V</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>depV</CODE></TD>
|
||||
<TD><CODE>V -> V</CODE></TD>
|
||||
<TD>-</TD>
|
||||
@@ -4161,15 +4125,20 @@ source <A HREF="../norwegian/ParadigmsNor.gf"><CODE>http://www.cs.chalmers.se/~a
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkV2</CODE></TD>
|
||||
<TD><CODE>V -> Prep -> V2</CODE></TD>
|
||||
<TD><CODE>Str -> V2</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>dirV2</CODE></TD>
|
||||
<TD><CODE>mkV2</CODE></TD>
|
||||
<TD><CODE>V -> V2</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkV2</CODE></TD>
|
||||
<TD><CODE>V -> Prep -> V2</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkV3</CODE></TD>
|
||||
<TD><CODE>V -> Prep -> Prep -> V3</CODE></TD>
|
||||
<TD><I>snakke, med, om</I></TD>
|
||||
@@ -4251,6 +4220,7 @@ source <A HREF="../norwegian/ParadigmsNor.gf"><CODE>http://www.cs.chalmers.se/~a
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P></P>
|
||||
<A NAME="toc11"></A>
|
||||
<H1>Paradigms for Russian</H1>
|
||||
<P>
|
||||
@@ -4334,12 +4304,17 @@ source <A HREF="../russian/ParadigmsRus.gf"><CODE>http://www.cs.chalmers.se/~aar
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkN</CODE></TD>
|
||||
<TD><CODE>(nomSg, genSg, datSg, accSg, instSg, preposSg,</CODE></TD>
|
||||
<TD><CODE>Str -> N</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>regN</CODE></TD>
|
||||
<TD><CODE>Str -> N</CODE></TD>
|
||||
<TD><CODE>mkN</CODE></TD>
|
||||
<TD><CODE>Str -> Gender -> Animacy -> N</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkN</CODE></TD>
|
||||
<TD><CODE>(nomSg,_,_,_,_,_,_,_,_,_,_,prepPl : Str) -> Gender -> Animacy -> N</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
@@ -4454,35 +4429,30 @@ source <A HREF="../russian/ParadigmsRus.gf"><CODE>http://www.cs.chalmers.se/~aar
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkPN</CODE></TD>
|
||||
<TD><CODE>Str -> PN</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkPN</CODE></TD>
|
||||
<TD><CODE>Str -> Gender -> Animacy -> PN</CODE></TD>
|
||||
<TD><I>"Иван", "Маша"</I></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>nounPN</CODE></TD>
|
||||
<TD><CODE>mkPN</CODE></TD>
|
||||
<TD><CODE>N -> PN</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkCN</CODE></TD>
|
||||
<TD><CODE>N -> CN</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkNP</CODE></TD>
|
||||
<TD><CODE>Str -> Gender -> Animacy -> NP</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>regA</CODE></TD>
|
||||
<TD><CODE>Str -> Str -> A</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>adjInvar</CODE></TD>
|
||||
<TD><CODE>mkA</CODE></TD>
|
||||
<TD><CODE>Str -> A</CODE></TD>
|
||||
<TD><I>khaki, mini, hindi, netto</I></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkA</CODE></TD>
|
||||
<TD><CODE>Str -> Str -> A</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>AStaruyj</CODE></TD>
|
||||
<TD><CODE>Str -> Str -> A</CODE></TD>
|
||||
<TD><I>ending with "-ый"</I></TD>
|
||||
@@ -4519,36 +4489,37 @@ source <A HREF="../russian/ParadigmsRus.gf"><CODE>http://www.cs.chalmers.se/~aar
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkV</CODE></TD>
|
||||
<TD><CODE>Aspect -> (presentSgP1,presentSgP2,presentSgP3,</CODE></TD>
|
||||
<TD><CODE>Aspect -> Conjugation -> (stemPrsSgP1,endPrsSgP1,pastSgP1,imp,inf : Str) -> V</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>pastSgP1,imperative,infinitive</CODE></TD>
|
||||
<TD><CODE>Str) -> V</CODE></TD>
|
||||
<TD><CODE>mkV</CODE></TD>
|
||||
<TD><CODE>Aspect -> (presSgP1,presSgP2,presSgP3,presPlP1,presPlP2,presPlP3,pastSgMasc,imp,inf: Str) -> V</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkV2</CODE></TD>
|
||||
<TD><CODE>V -> V2</CODE></TD>
|
||||
<TD><I>"видеть", "любить"</I></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkV2</CODE></TD>
|
||||
<TD><CODE>V -> Str -> Case -> V2</CODE></TD>
|
||||
<TD><I>"войти в дом"; "в", accusative</I></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkV3</CODE></TD>
|
||||
<TD><CODE>V -> Str -> Str -> Case -> Case -> V3</CODE></TD>
|
||||
<TD><I>"Ñ<>ложить пиÑ<C2B8>ьмо в конверт"</I></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>dirV2</CODE></TD>
|
||||
<TD><CODE>V -> V2</CODE></TD>
|
||||
<TD><I>"видеть", "любить"</I></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>tvDirDir</CODE></TD>
|
||||
<TD><CODE>V -> V3</CODE></TD>
|
||||
<TD>-</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkV3</CODE></TD>
|
||||
<TD><CODE>V -> Str -> Str -> Case -> Case -> V3</CODE></TD>
|
||||
<TD><I>"Ñ<>ложить пиÑ<C2B8>ьмо в конверт"</I></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P></P>
|
||||
<A NAME="toc12"></A>
|
||||
<H1>Paradigms for Spanish</H1>
|
||||
<P>
|
||||
@@ -4842,6 +4813,7 @@ source <A HREF="../spanish/ParadigmsSpa.gf"><CODE>http://www.cs.chalmers.se/~aar
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P></P>
|
||||
<A NAME="toc13"></A>
|
||||
<H1>Paradigms for Swedish</H1>
|
||||
<P>
|
||||
@@ -5140,6 +5112,7 @@ source <A HREF="../swedish/ParadigmsSwe.gf"><CODE>http://www.cs.chalmers.se/~aar
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P></P>
|
||||
<A NAME="toc14"></A>
|
||||
<H1>Browsing the libraries with GF commands</H1>
|
||||
<P>
|
||||
@@ -5235,6 +5208,6 @@ For each language, an instantiation of the functor:
|
||||
</PRE>
|
||||
<P></P>
|
||||
|
||||
<!-- html code generated by txt2tags 2.4 (http://txt2tags.sf.net) -->
|
||||
<!-- html code generated by txt2tags 2.3 (http://txt2tags.sf.net) -->
|
||||
<!-- cmdline: txt2tags -thtml -\-toc synopsis.txt -->
|
||||
</BODY></HTML>
|
||||
|
||||
@@ -484,8 +484,8 @@ reg3N = \vesi,veden,vesi
|
||||
compN = \s,n -> {s = \\c => s ++ n.s ! c ; g = n.g ; lock_N = <>} ;
|
||||
|
||||
|
||||
mkNP : N -> Number -> CatFin.NP ;
|
||||
mkNP noun num = {
|
||||
makeNP : N -> Number -> CatFin.NP ;
|
||||
makeNP noun num = {
|
||||
s = \\c => noun.s ! NCase num (npform2case num c) ;
|
||||
a = agrP3 num ;
|
||||
isPron = False ;
|
||||
|
||||
@@ -32,9 +32,9 @@ concrete StructuralFin of Structural = CatFin **
|
||||
can_VV = reg2V "voida" "voi" ;
|
||||
during_Prep = postGenPrep "aikana" ;
|
||||
either7or_DConj = sd2 "joko" "tai" ** {n = Sg} ;
|
||||
everybody_NP = mkNP (regN "jokainen") Sg ;
|
||||
everybody_NP = makeNP (regN "jokainen") Sg ;
|
||||
every_Det = mkDet Sg (regN "jokainen") ;
|
||||
everything_NP = mkNP ((nhn (sKorpi "kaikki" "kaiken" "kaikkena")) **
|
||||
everything_NP = makeNP ((nhn (sKorpi "kaikki" "kaiken" "kaikkena")) **
|
||||
{lock_N = <>}) Sg ;
|
||||
everywhere_Adv = ss "kaikkialla" ;
|
||||
few_Det = mkDet Sg (regN "harva") ;
|
||||
|
||||
@@ -22,12 +22,12 @@ concrete ExtraFre of ExtraFreAbs = ExtraRomanceFre **
|
||||
i8fem_Pron = mkPronoun
|
||||
(elision "j") (elision "m") (elision "m") "moi" "mon" (elisPoss "m") "mes"
|
||||
Fem Sg P1 ;
|
||||
these8fem_NP = mkNP ["celles-ci"] Fem Pl ;
|
||||
these8fem_NP = makeNP ["celles-ci"] Fem Pl ;
|
||||
they8fem_Pron = mkPronoun
|
||||
"elles" "les" "leur" "eux" "leur" "leur" "leurs"
|
||||
Fem Pl P3 ;
|
||||
this8fem_NP = pn2np (mkPN ["celle-ci"] Fem) ;
|
||||
those8fem_NP = mkNP ["celles-là"] Fem Pl ;
|
||||
those8fem_NP = makeNP ["celles-là"] Fem Pl ;
|
||||
we8fem_Pron = mkPronoun "nous" "nous" "nous" "nous" "notre" "notre" "nos"
|
||||
Fem Pl P1 ;
|
||||
whoPl8fem_IP =
|
||||
|
||||
@@ -405,8 +405,8 @@ oper
|
||||
|
||||
--------------------------- obsolete
|
||||
|
||||
mkNP : Str -> Gender -> Number -> NP ;
|
||||
mkNP x g n = {s = (pn2np {s=x;g= g}).s; a = agrP3 g n ; hasClit = False} ** {lock_NP = <>} ;
|
||||
makeNP : Str -> Gender -> Number -> NP ;
|
||||
makeNP x g n = {s = (pn2np {s=x;g= g}).s; a = agrP3 g n ; hasClit = False} ** {lock_NP = <>} ;
|
||||
regPN : Str -> PN ;
|
||||
mk2PN : Str -> Gender -> PN = \x,g -> {s = x ; g = g} ** {lock_PN = <>} ;
|
||||
|
||||
|
||||
@@ -90,12 +90,12 @@ lin
|
||||
Pl => \\_,_ => "ces"
|
||||
}
|
||||
} ;
|
||||
that_NP = mkNP ["cela"] Masc Sg ;
|
||||
that_NP = makeNP ["cela"] Masc Sg ;
|
||||
there7from_Adv = ss ["de là"] ;
|
||||
there7to_Adv = ss "là" ; --- y
|
||||
there_Adv = ss "là" ;
|
||||
therefore_PConj = ss "donc" ;
|
||||
these_NP = mkNP ["ceux-ci"] Masc Pl ;
|
||||
these_NP = makeNP ["ceux-ci"] Masc Pl ;
|
||||
they_Pron = mkPronoun
|
||||
"ils" "les" "leur" "eux" "leur" "leur" "leurs"
|
||||
Masc Pl P3 ;
|
||||
@@ -108,7 +108,7 @@ lin
|
||||
}
|
||||
} ;
|
||||
this_NP = pn2np (mkPN ["ceci"] Masc) ;
|
||||
those_NP = mkNP ["ceux-là"] Masc Pl ;
|
||||
those_NP = makeNP ["ceux-là"] Masc Pl ;
|
||||
through_Prep = mkPreposition "par" ;
|
||||
too_AdA = ss "trop" ;
|
||||
to_Prep = complDat ;
|
||||
|
||||
@@ -5,12 +5,12 @@ concrete ExtraIta of ExtraItaAbs = ExtraRomanceIta **
|
||||
i8fem_Pron = mkPronoun
|
||||
"io" "mi" "mi" "me" "me" "mio" "mia" "miei" "mie"
|
||||
Fem Sg P1 ;
|
||||
these8fem_NP = mkNP ["queste"] Fem Pl ;
|
||||
these8fem_NP = makeNP ["queste"] Fem Pl ;
|
||||
they8fem_Pron = mkPronoun
|
||||
"loro" "loro" "li" "glie" "loro" "loro" "loro" "loro" "loro"
|
||||
Fem Pl P3 ;
|
||||
this8fem_NP = pn2np (mkPN ["questa"] Fem) ;
|
||||
those8fem_NP = mkNP ["quelle"] Fem Pl ;
|
||||
those8fem_NP = makeNP ["quelle"] Fem Pl ;
|
||||
we8fem_Pron =
|
||||
mkPronoun "noi" "ci" "ci" "ce" "noi" "nostro" "nostra" "nostri" "nostre"
|
||||
Fem Pl P1 ;
|
||||
|
||||
@@ -323,7 +323,7 @@ oper
|
||||
}
|
||||
} ;
|
||||
|
||||
mkNP x g n = {s = (pn2np (mk2PN x g)).s; a = agrP3 g n ; hasClit = False} ** {lock_NP = <>} ;
|
||||
makeNP x g n = {s = (pn2np (mk2PN x g)).s; a = agrP3 g n ; hasClit = False} ** {lock_NP = <>} ;
|
||||
|
||||
mk5A a b c d e =
|
||||
compADeg {s = \\_ => (mkAdj a b c d e).s ; isPre = False ; lock_A = <>} ;
|
||||
@@ -434,7 +434,7 @@ oper
|
||||
regPN : Str -> PN ; -- feminine if "-a", otherwise masculine
|
||||
|
||||
-- obsolete
|
||||
mkNP : Str -> Gender -> Number -> NP ;
|
||||
makeNP : Str -> Gender -> Number -> NP ;
|
||||
|
||||
mkPN = overload {
|
||||
mkPN : Str -> PN = regPN ;
|
||||
|
||||
@@ -27,7 +27,7 @@ lin
|
||||
can_VV = mkVV (verboV (potere_69 "potere")) ;
|
||||
during_Prep = mkPrep "durante" ;
|
||||
either7or_DConj = {s1,s2 = "o" ; n = Sg} ;
|
||||
everybody_NP = mkNP ["tutti"] Masc Pl ;
|
||||
everybody_NP = makeNP ["tutti"] Masc Pl ;
|
||||
every_Det = {s = \\_,_ => "ogni" ; n = Sg} ;
|
||||
everything_NP = pn2np (mkPN ["tutto"] Masc) ;
|
||||
everywhere_Adv = ss "dappertutto" ;
|
||||
@@ -87,12 +87,12 @@ lin
|
||||
Pl => \\g,c => prepCase c ++ genForms "quelli" "quelle" ! g ---- quegli
|
||||
}
|
||||
} ;
|
||||
that_NP = mkNP ["quello"] Masc Sg ;
|
||||
that_NP = makeNP ["quello"] Masc Sg ;
|
||||
there7from_Adv = ss ["di là"] ;
|
||||
there7to_Adv = ss "là" ; --- ci
|
||||
there_Adv = ss "là" ;
|
||||
therefore_PConj = ss "quindi" ;
|
||||
these_NP = mkNP ["questi"] Masc Pl ;
|
||||
these_NP = makeNP ["questi"] Masc Pl ;
|
||||
they_Pron = mkPronoun
|
||||
"loro" "loro" "li" "glie" "loro" "loro" "loro" "loro" "loro"
|
||||
Masc Pl P3 ;
|
||||
@@ -103,7 +103,7 @@ lin
|
||||
}
|
||||
} ;
|
||||
this_NP = pn2np (mkPN ["questo"] Masc) ;
|
||||
those_NP = mkNP ["quelli"] Masc Pl ;
|
||||
those_NP = makeNP ["quelli"] Masc Pl ;
|
||||
through_Prep = mkPrep "per" ;
|
||||
too_AdA = ss "troppo" ;
|
||||
to_Prep = complDat ;
|
||||
|
||||
@@ -66,27 +66,24 @@ oper
|
||||
|
||||
--2 Nouns
|
||||
|
||||
-- Worst case: give all four forms. The gender is computed from the
|
||||
-- last letter of the second form (if "n", then $utrum$, otherwise $neutrum$).
|
||||
|
||||
mkN : (dreng,drengen,drenger,drengene : Str) -> N ;
|
||||
|
||||
-- The regular function takes the singular indefinite form
|
||||
-- and computes the other forms and the gender by a heuristic.
|
||||
-- The heuristic is that nouns ending "e" are feminine like "kvinne",
|
||||
-- all others are masculine like "bil".
|
||||
-- If in doubt, use the $cc$ command to test!
|
||||
|
||||
regN : Str -> N ;
|
||||
|
||||
-- Giving gender manually makes the heuristic more reliable.
|
||||
|
||||
regGenN : Str -> Gender -> N ;
|
||||
|
||||
-- This function takes the singular indefinite and definite forms; the
|
||||
-- One can also compute the gender from the definite form.
|
||||
-- gender is computed from the definite form.
|
||||
-- If in doubt, use the $cc$ command to test!
|
||||
-- In the worst case, give all four forms. The gender is computed from the
|
||||
-- last letter of the second form (if "n", then $utrum$, otherwise $neutrum$).
|
||||
|
||||
mkN : overload {
|
||||
mkN : Str -> N ;
|
||||
mkN : Str -> Gender -> N ;
|
||||
mkN : (bil,bilen : Str) -> N ;
|
||||
mkN : (dreng,drengen,drenger,drengene : Str) -> N
|
||||
} ;
|
||||
|
||||
mk2N : (bil,bilen : Str) -> N ;
|
||||
|
||||
|
||||
--3 Compound nouns
|
||||
@@ -126,61 +123,39 @@ oper
|
||||
--3 Proper names and noun phrases
|
||||
--
|
||||
-- Proper names, with a regular genitive, are formed as follows
|
||||
|
||||
regPN : Str -> PN ; -- utrum
|
||||
regGenPN : Str -> Gender -> PN ;
|
||||
|
||||
-- Sometimes you can reuse a common noun as a proper name, e.g. "Bank".
|
||||
|
||||
nounPN : N -> PN ;
|
||||
mkPN : overload {
|
||||
mkPN : Str -> PN ; -- masculine
|
||||
mkPN : Str -> Gender -> PN ;
|
||||
mkPN : N -> PN ;
|
||||
} ;
|
||||
|
||||
-- To form a noun phrase that can also be plural and have an irregular
|
||||
-- genitive, you can use the worst-case function.
|
||||
|
||||
mkNP : Str -> Str -> Number -> Gender -> NP ;
|
||||
|
||||
--2 Adjectives
|
||||
|
||||
-- Non-comparison one-place adjectives need three forms:
|
||||
-- The regular pattern works for many adjectives, e.g. those ending
|
||||
-- with "ig". Two, five, or at worst five forms are sometimes needed.
|
||||
|
||||
mkA : (galen,galet,galne : Str) -> A ;
|
||||
mkA : overload {
|
||||
mkA : (fin : Str) -> A ;
|
||||
mkA : (fin,fint : Str) -> A ;
|
||||
mkA : (galen,galet,galne : Str) -> A ;
|
||||
mkA : (stor,stort,store,storre,storst : Str) -> A ;
|
||||
|
||||
-- For regular adjectives, the other forms are derived.
|
||||
-- If comparison is formed by "mer", "mest", as in general for
|
||||
-- long adjective, the following pattern is used:
|
||||
|
||||
regA : Str -> A ;
|
||||
|
||||
-- In most cases, two forms are enough.
|
||||
|
||||
mk2A : (stor,stort : Str) -> A ;
|
||||
mkA : A -> A ; -- -/mer/mest norsk
|
||||
} ;
|
||||
|
||||
|
||||
--3 Two-place adjectives
|
||||
--
|
||||
-- Two-place adjectives need a preposition for their second argument.
|
||||
|
||||
mkA2 : A -> Prep -> A2 ;
|
||||
|
||||
-- Comparison adjectives may need as many as five forms.
|
||||
|
||||
mkADeg : (stor,stort,store,storre,storst : Str) -> A ;
|
||||
|
||||
-- The regular pattern works for many adjectives, e.g. those ending
|
||||
-- with "ig".
|
||||
|
||||
regADeg : Str -> A ;
|
||||
|
||||
-- Just the comparison forms can be irregular.
|
||||
|
||||
irregADeg : (tung,tyngre,tyngst : Str) -> A ;
|
||||
|
||||
-- Sometimes just the positive forms are irregular.
|
||||
|
||||
mk3ADeg : (galen,galet,galne : Str) -> A ;
|
||||
mk2ADeg : (bred,bredt : Str) -> A ;
|
||||
|
||||
-- If comparison is formed by "mer", "mest", as in general for
|
||||
-- long adjective, the following pattern is used:
|
||||
|
||||
compoundA : A -> A ; -- -/mer/mest norsk
|
||||
|
||||
|
||||
--2 Adverbs
|
||||
@@ -198,22 +173,33 @@ oper
|
||||
|
||||
--2 Verbs
|
||||
--
|
||||
-- The worst case needs six forms.
|
||||
|
||||
mkV : (spise,spiser,spises,spiste,spist,spis : Str) -> V ;
|
||||
mkV : overload {
|
||||
|
||||
-- The 'regular verb' function is the first conjugation.
|
||||
|
||||
regV : (snakke : Str) -> V ;
|
||||
mkV : (snakke : Str) -> V ;
|
||||
|
||||
-- The almost regular verb function needs the infinitive and the preteritum.
|
||||
|
||||
mk2V : (leve,levde : Str) -> V ;
|
||||
mkV : (leve,levde : Str) -> V ;
|
||||
|
||||
-- There is an extensive list of irregular verbs in the module $IrregNor$.
|
||||
-- In practice, it is enough to give three forms, as in school books.
|
||||
|
||||
irregV : (drikke, drakk, drukket : Str) -> V ;
|
||||
mkV : (drikke, drakk, drukket : Str) -> V ;
|
||||
|
||||
-- The worst case needs six forms.
|
||||
|
||||
mkV : (spise,spiser,spises,spiste,spist,spis : Str) -> V ;
|
||||
|
||||
--3 Verbs with a particle.
|
||||
--
|
||||
-- The particle, such as in "lukke opp", is given as a string.
|
||||
|
||||
mkV : V -> Str -> V ;
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
--3 Verbs with 'være' as auxiliary
|
||||
@@ -223,11 +209,6 @@ oper
|
||||
vaereV : V -> V ;
|
||||
|
||||
|
||||
--3 Verbs with a particle.
|
||||
--
|
||||
-- The particle, such as in "lukke opp", is given as a string.
|
||||
|
||||
partV : V -> Str -> V ;
|
||||
|
||||
--3 Deponent verbs.
|
||||
--
|
||||
@@ -240,11 +221,14 @@ oper
|
||||
--3 Two-place verbs
|
||||
--
|
||||
-- Two-place verbs need a preposition, except the special case with direct object.
|
||||
-- (transitive verbs). Notice that a particle comes from the $V$.
|
||||
-- (transitive verbs). Notice that, if a particle is needed, it comes from the $V$.
|
||||
|
||||
mkV2 : V -> Prep -> V2 ;
|
||||
mkV2 : overload {
|
||||
mkV2 : Str -> V2 ;
|
||||
mkV2 : V -> V2 ;
|
||||
mkV2 : V -> Prep -> V2 ;
|
||||
} ;
|
||||
|
||||
dirV2 : V -> V2 ;
|
||||
|
||||
--3 Three-place verbs
|
||||
--
|
||||
@@ -301,7 +285,7 @@ oper
|
||||
nominative = Nom ;
|
||||
genitive = Gen ;
|
||||
|
||||
mkN x y z u = mkSubstantive x y z u ** {g = extNGen y ; lock_N = <>} ;
|
||||
mk4N x y z u = mkSubstantive x y z u ** {g = extNGen y ; lock_N = <>} ;
|
||||
|
||||
regN x = regGenN x g where {
|
||||
g = case <x : Str> of {
|
||||
@@ -312,14 +296,14 @@ oper
|
||||
|
||||
regGenN x g = case last x of {
|
||||
"e" => case g of {
|
||||
Utr Masc => mkN x (x + "n") (x + "r") (x + "ne") ;
|
||||
Utr Fem => mkN x (init x + "a") (x + "r") (x + "ne") ;
|
||||
Neutr => mkN x (x + "t") (x + "r") (init x + "a")
|
||||
Utr Masc => mk4N x (x + "n") (x + "r") (x + "ne") ;
|
||||
Utr Fem => mk4N x (init x + "a") (x + "r") (x + "ne") ;
|
||||
Neutr => mk4N x (x + "t") (x + "r") (init x + "a")
|
||||
} ;
|
||||
_ => case g of {
|
||||
Utr Masc => mkN x (x + "en") (x + "er") (x + "ene") ;
|
||||
Utr Fem => mkN x (x + "a") (x + "er") (x + "ene") ;
|
||||
Neutr => mkN x (x + "et") (x + "") (x + "a")
|
||||
Utr Masc => mk4N x (x + "en") (x + "er") (x + "ene") ;
|
||||
Utr Fem => mk4N x (x + "a") (x + "er") (x + "ene") ;
|
||||
Neutr => mk4N x (x + "et") (x + "") (x + "a")
|
||||
}
|
||||
} ;
|
||||
|
||||
@@ -337,12 +321,17 @@ oper
|
||||
regGenPN n g = {s = \\c => mkCase c n ; g = g} ** {lock_PN = <>} ;
|
||||
regPN n = regGenPN n utrum ;
|
||||
nounPN n = {s = n.s ! singular ! Indef ; g = n.g ; lock_PN = <>} ;
|
||||
mkNP x y n g =
|
||||
|
||||
-- To form a noun phrase that can also be plural and have an irregular
|
||||
-- genitive, you can use the worst-case function.
|
||||
|
||||
makeNP : Str -> Str -> Number -> Gender -> NP ;
|
||||
makeNP x y n g =
|
||||
{s = table {NPPoss _ => x ; _ => y} ; a = agrP3 g n ;
|
||||
lock_NP = <>} ;
|
||||
|
||||
mkA a b c = (mkAdject a b c [] []) ** {isComp = False ; lock_A = <>} ;
|
||||
mk2A a b = mkA a b (a + "e") ;
|
||||
mk3A a b c = (mkAdject a b c [] []) ** {isComp = False ; lock_A = <>} ;
|
||||
mk2A a b = mk3A a b (a + "e") ;
|
||||
regA a = (regADeg a) ** {isComp = False ; lock_A = <>} ;
|
||||
|
||||
mkA2 a p = a ** {c2 = p.s ; lock_A2 = <>} ;
|
||||
@@ -369,10 +358,22 @@ oper
|
||||
mkPrep p = {s = p ; lock_Prep = <>} ;
|
||||
noPrep = mkPrep [] ;
|
||||
|
||||
mkV a b c d e f = mkVerb6 a b c d e f **
|
||||
mk6V a b c d e f = mkVerb6 a b c d e f **
|
||||
{part = [] ; vtype = VAct ; isVaere = False ; lock_V = <>} ;
|
||||
|
||||
regV a = case last a of {
|
||||
|
||||
--3 Verbs with a particle.
|
||||
--
|
||||
-- The particle, such as in "lukke opp", is given as a string.
|
||||
|
||||
|
||||
|
||||
--3 Verbs with a particle.
|
||||
--
|
||||
-- The particle, such as in "lukke opp", is given as a string.
|
||||
|
||||
|
||||
"e" => vHusk (init a) ;
|
||||
_ => vBo a
|
||||
} ** {part = [] ; vtype = VAct ; isVaere = False ; lock_V = <>} ;
|
||||
@@ -391,7 +392,7 @@ oper
|
||||
_ => drikke + "r"
|
||||
}
|
||||
in
|
||||
mkV drikke drikker (drikke + "s") drakk drukket drikk ;
|
||||
mk6V drikke drikker (drikke + "s") drakk drukket drikk ;
|
||||
|
||||
vaereV v = {
|
||||
s = v.s ;
|
||||
@@ -405,8 +406,8 @@ oper
|
||||
depV v = {s = v.s ; part = v.part ; vtype = VPass ; isVaere = False ; lock_V = <>} ;
|
||||
reflV v = {s = v.s ; part = v.part ; vtype = VRefl ; isVaere = False ; lock_V = <>} ;
|
||||
|
||||
mkV2 v p = v ** {c2 = p.s ; lock_V2 = <>} ;
|
||||
dirV2 v = mkV2 v noPrep ;
|
||||
mk2V2 v p = v ** {c2 = p.s ; lock_V2 = <>} ;
|
||||
dirV2 v = mk2V2 v noPrep ;
|
||||
|
||||
mkV3 v p q = v ** {c2 = p.s ; c3 = q.s ; lock_V3 = <>} ;
|
||||
dirV3 v p = mkV3 v noPrep p ;
|
||||
@@ -414,13 +415,13 @@ oper
|
||||
|
||||
mkV0 v = v ** {lock_V0 = <>} ;
|
||||
mkVS v = v ** {lock_VS = <>} ;
|
||||
mkV2S v p = mkV2 v p ** {lock_V2S = <>} ;
|
||||
mkV2S v p = mk2V2 v p ** {lock_V2S = <>} ;
|
||||
mkVV v = v ** {c2 = "å" ; lock_VV = <>} ;
|
||||
mkV2V v p t = mkV2 v p ** {s3 = t ; lock_V2V = <>} ;
|
||||
mkV2V v p t = mk2V2 v p ** {s3 = t ; lock_V2V = <>} ;
|
||||
mkVA v = v ** {lock_VA = <>} ;
|
||||
mkV2A v p = mkV2 v p ** {lock_V2A = <>} ;
|
||||
mkV2A v p = mk2V2 v p ** {lock_V2A = <>} ;
|
||||
mkVQ v = v ** {lock_VQ = <>} ;
|
||||
mkV2Q v p = mkV2 v p ** {lock_V2Q = <>} ;
|
||||
mkV2Q v p = mk2V2 v p ** {lock_V2Q = <>} ;
|
||||
|
||||
mkAS v = v ** {lock_A = <>} ;
|
||||
mkA2S v p = mkA2 v p ** {lock_A = <>} ;
|
||||
@@ -433,4 +434,72 @@ oper
|
||||
A2V : Type = A2 ;
|
||||
|
||||
|
||||
---------
|
||||
|
||||
mk2N : (bil,bilen : Str) -> N ;
|
||||
mk4N : (dreng,drengen,drenger,drengene : Str) -> N ;
|
||||
regN : Str -> N ;
|
||||
regGenN : Str -> Gender -> N ;
|
||||
mk2N : (bil,bilen : Str) -> N ;
|
||||
|
||||
mkN = overload {
|
||||
mkN : Str -> N = regN ;
|
||||
mkN : Str -> Gender -> N = regGenN ;
|
||||
mkN : (bil,bilen : Str) -> N = mk2N ;
|
||||
mkN : (dreng,drengen,drenger,drengene : Str) -> N = mk4N
|
||||
} ;
|
||||
|
||||
mkPN = overload {
|
||||
mkPN : Str -> PN = regPN ; -- masculine
|
||||
mkPN : Str -> Gender -> PN = regGenPN ;
|
||||
mkPN : N -> PN = nounPN ;
|
||||
} ;
|
||||
|
||||
regPN : Str -> PN ; -- utrum
|
||||
regGenPN : Str -> Gender -> PN ;
|
||||
nounPN : N -> PN ;
|
||||
|
||||
mkA = overload {
|
||||
mkA : (fin : Str) -> A = regADeg ;
|
||||
mkA : (fin,fint : Str) -> A = mk2ADeg ;
|
||||
mkA : (galen,galet,galne : Str) -> A = mk3ADeg ;
|
||||
mkA : (stor,stort,store,storre,storst : Str) -> A = mkADeg ;
|
||||
mkA : A -> A = compoundA ; -- -/mer/mest norsk
|
||||
} ;
|
||||
|
||||
mk3A : (galen,galet,galne : Str) -> A ;
|
||||
regA : Str -> A ;
|
||||
mk2A : (stor,stort : Str) -> A ;
|
||||
mkADeg : (stor,stort,store,storre,storst : Str) -> A ;
|
||||
regADeg : Str -> A ;
|
||||
irregADeg : (tung,tyngre,tyngst : Str) -> A ;
|
||||
mk3ADeg : (galen,galet,galne : Str) -> A ;
|
||||
mk2ADeg : (bred,bredt : Str) -> A ;
|
||||
compoundA : A -> A ; -- -/mer/mest norsk
|
||||
|
||||
mkV = overload {
|
||||
mkV : (snakke : Str) -> V = regV ;
|
||||
mkV : (leve,levde : Str) -> V = mk2V ;
|
||||
mkV : (drikke, drakk, drukket : Str) -> V = irregV ;
|
||||
mkV : (spise,spiser,spises,spiste,spist,spis : Str) -> V = mk6V ;
|
||||
mkV : V -> Str -> V = partV ;
|
||||
} ;
|
||||
|
||||
|
||||
regV : (snakke : Str) -> V ;
|
||||
mk2V : (leve,levde : Str) -> V ;
|
||||
irregV : (drikke, drakk, drukket : Str) -> V ;
|
||||
mk6V : (spise,spiser,spises,spiste,spist,spis : Str) -> V ;
|
||||
partV : V -> Str -> V ;
|
||||
|
||||
|
||||
mkV2 = overload {
|
||||
mkV2 : Str -> V2 = \s -> dirV2 (regV s) ;
|
||||
mkV2 : V -> V2 = dirV2 ;
|
||||
mkV2 : V -> Prep -> V2 = mk2V2 ;
|
||||
} ;
|
||||
|
||||
mk2V2 : V -> Prep -> V2 ;
|
||||
dirV2 : V -> V2 ;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -63,15 +63,27 @@ oper
|
||||
singular : Number ;
|
||||
plural : Number ;
|
||||
|
||||
--2 Nouns
|
||||
|
||||
-- Best case: indeclinabe nouns: "кофе", "пальто", "ВУЗ".
|
||||
Animacy: Type ;
|
||||
|
||||
animate: Animacy;
|
||||
inanimate: Animacy;
|
||||
|
||||
|
||||
|
||||
--2 Nouns
|
||||
|
||||
-- Best case: indeclinabe nouns: "кофе", "пальто", "ВУЗ".
|
||||
|
||||
mkN : overload {
|
||||
|
||||
-- The regular function captures the variants for some popular nouns
|
||||
-- endings below:
|
||||
|
||||
mkN : Str -> N ;
|
||||
|
||||
-- This function is for indeclinable nouns.
|
||||
|
||||
mkIndeclinableNoun: Str -> Gender -> Animacy -> N ;
|
||||
mkN : Str -> Gender -> Animacy -> N ;
|
||||
|
||||
-- Worst case - give six singular forms:
|
||||
-- Nominative, Genetive, Dative, Accusative, Instructive and Prepositional;
|
||||
@@ -82,16 +94,13 @@ oper
|
||||
-- to the Nominative or the Genetive one) is actually of no help,
|
||||
-- since there are a lot of exceptions and the gain is just one form less.
|
||||
|
||||
mkN : (nomSg, genSg, datSg, accSg, instSg, preposSg,
|
||||
nomPl, genPl, datPl, accPl, instPl, preposPl: Str) -> Gender -> Animacy -> N ;
|
||||
mkN : (nomSg,_,_,_,_,_,_,_,_,_,_,prepPl : Str) -> Gender -> Animacy -> N ;
|
||||
|
||||
-- мужчина, мужчины, мужчине, мужчину, мужчиной, мужчине
|
||||
-- мужчины, мужчин, мужчинам, мужчин, мужчинами, мужчинах
|
||||
|
||||
-- мужчина, мужчины, мужчине, мужчину, мужчиной, мужчине
|
||||
-- мужчины, мужчин, мужчинам, мужчин, мужчинами, мужчинах
|
||||
|
||||
-- The regular function captures the variants for some popular nouns
|
||||
-- endings below:
|
||||
|
||||
regN : Str -> N ;
|
||||
} ;
|
||||
|
||||
|
||||
-- Here are some common patterns. The list is far from complete.
|
||||
@@ -140,14 +149,12 @@ oper
|
||||
|
||||
-- Proper names.
|
||||
|
||||
mkPN : Str -> Gender -> Animacy -> PN ; -- "Иван", "Маша"
|
||||
nounPN : N -> PN ;
|
||||
|
||||
-- On the top level, it is maybe $CN$ that is used rather than $N$, and
|
||||
-- $NP$ rather than $PN$.
|
||||
mkPN : overload {
|
||||
mkPN : Str -> PN ;
|
||||
mkPN : Str -> Gender -> Animacy -> PN ; -- "Иван", "Маша"
|
||||
mkPN : N -> PN ;
|
||||
} ;
|
||||
|
||||
mkCN : N -> CN ;
|
||||
mkNP : Str -> Gender -> Animacy -> NP ;
|
||||
|
||||
|
||||
--2 Adjectives
|
||||
@@ -166,18 +173,15 @@ oper
|
||||
-- in the current description, otherwise there would be 32 forms for
|
||||
-- positive degree.
|
||||
|
||||
-- mkA : ( : Str) -> A ;
|
||||
|
||||
-- The regular function captures the variants for some popular adjective
|
||||
-- endings below. The first string agrument is the masculine singular form,
|
||||
-- the second is comparative:
|
||||
-- Invariable adjective is a special case, with only on string needed.
|
||||
|
||||
regA : Str -> Str -> A ;
|
||||
|
||||
|
||||
-- Invariable adjective is a special case.
|
||||
|
||||
adjInvar : Str -> A ; -- khaki, mini, hindi, netto
|
||||
mkA : overload {
|
||||
mkA : Str -> A ; -- khaki, mini, hindi, netto
|
||||
mkA : Str -> Str -> A ;
|
||||
} ;
|
||||
|
||||
-- Some regular patterns depending on the ending.
|
||||
|
||||
@@ -202,12 +206,6 @@ oper
|
||||
-- Syntactic forms are based on the positive forms.
|
||||
|
||||
|
||||
-- mkADeg : A -> Str -> ADeg ;
|
||||
|
||||
-- On top level, there are adjectival phrases. The most common case is
|
||||
-- just to use a one-place adjective.
|
||||
-- ap : A -> IsPostfixAdj -> AP ;
|
||||
|
||||
--2 Adverbs
|
||||
|
||||
-- Adverbs are not inflected.
|
||||
@@ -245,17 +243,6 @@ imperfective: Aspect;
|
||||
perfective: Aspect ;
|
||||
|
||||
|
||||
-- The worst case need 6 forms of the present tense in indicative mood
|
||||
-- ("я бегу", "ты бежишь", "он бежит", "мы бежим", "вы бежите", "они бегут"),
|
||||
-- a past form (singular, masculine: "я бежал"), an imperative form
|
||||
-- (singular, second person: "беги"), an infinitive ("бежать").
|
||||
-- Inherent aspect should also be specified.
|
||||
|
||||
-- mkVerbum : Aspect -> (presentSgP1,presentSgP2,presentSgP3,
|
||||
mkV : Aspect -> (presentSgP1,presentSgP2,presentSgP3,
|
||||
presentPlP1,presentPlP2,presentPlP3,
|
||||
pastSgMasculine,imperative,infinitive: Str) -> V ;
|
||||
|
||||
-- Common conjugation patterns are two conjugations:
|
||||
-- first - verbs ending with "-ать/-ять" and second - "-ить/-еть".
|
||||
-- Instead of 6 present forms of the worst case, we only need
|
||||
@@ -266,19 +253,38 @@ perfective: Aspect ;
|
||||
-- "я люб-лю", "ты люб-ишь". Stems shoud be the same.
|
||||
-- So the definition for verb "любить" looks like:
|
||||
-- regV Imperfective Second "люб" "лю" "любил" "люби" "любить";
|
||||
--
|
||||
-- There is no one-argument case.
|
||||
|
||||
regV :Aspect -> Conjugation -> (stemPresentSgP1,endingPresentSgP1,
|
||||
pastSgP1,imperative,infinitive : Str) -> V ;
|
||||
mkV : overload {
|
||||
mkV : Aspect -> Conjugation -> (stemPrsSgP1,endPrsSgP1,pastSgP1,imp,inf : Str) -> V ;
|
||||
-- The worst case need 6 forms of the present tense in indicative mood
|
||||
-- ("я бегу", "ты бежишь", "он бежит", "мы бежим", "вы бежите", "они бегут"),
|
||||
-- a past form (singular, masculine: "я бежал"), an imperative form
|
||||
-- (singular, second person: "беги"), an infinitive ("бежать").
|
||||
-- Inherent aspect should also be specified.
|
||||
|
||||
mkV : Aspect -> (presSgP1,presSgP2,presSgP3,presPlP1,presPlP2,presPlP3,pastSgMasc,imp,inf: Str) -> V ;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
--3 Two-place verbs
|
||||
|
||||
-- Two-place verbs, and the special case with direct object. Notice that
|
||||
-- a particle can be included in a $V$.
|
||||
|
||||
mkV2 : V -> Str -> Case -> V2 ; -- "войти в дом"; "в", accusative
|
||||
mkV3 : V -> Str -> Str -> Case -> Case -> V3 ; -- "сложить письмо в конверт"
|
||||
dirV2 : V -> V2 ; -- "видеть", "любить"
|
||||
mkV2 : overload {
|
||||
mkV2 : V -> V2 ; -- "видеть", "любить"
|
||||
mkV2 : V -> Str -> Case -> V2 ; -- "войти в дом"; "в", accusative
|
||||
} ;
|
||||
|
||||
|
||||
--3 Three-place verbs
|
||||
|
||||
tvDirDir : V -> V3 ;
|
||||
|
||||
mkV3 : V -> Str -> Str -> Case -> Case -> V3 ; -- "сложить письмо в конверт"
|
||||
-- The definitions should not bother the user of the API. So they are
|
||||
-- hidden from the document.
|
||||
--.
|
||||
@@ -333,7 +339,7 @@ dolzhen = Dolzhen;
|
||||
} ** {lock_N = <>};
|
||||
|
||||
|
||||
mkN = \nomSg, genSg, datSg, accSg, instSg, preposSg,
|
||||
mk12N = \nomSg, genSg, datSg, accSg, instSg, preposSg,
|
||||
nomPl, genPl, datPl, accPl, instPl, preposPl, g, anim ->
|
||||
{
|
||||
s = table {
|
||||
@@ -431,16 +437,22 @@ regN = \ray ->
|
||||
mkN3 f p r = (UseN f) ** {s2 = p.s ; c=p.c; s3=r.s ; c2=r.c; lock_N3 = <>} ;
|
||||
|
||||
|
||||
mkPN = \ivan, g, anim ->
|
||||
mk3PN = \ivan, g, anim ->
|
||||
case g of {
|
||||
Masc => mkProperNameMasc ivan anim ;
|
||||
_ => mkProperNameFem ivan anim
|
||||
} ** {lock_PN =<>};
|
||||
nounPN n = {s=\\c => n.s! SF Sg c; anim=n.anim; g=n.g; lock_PN=<>};
|
||||
|
||||
mkCN = UseN;
|
||||
-- On the top level, it is maybe $CN$ that is used rather than $N$, and
|
||||
-- $NP$ rather than $PN$.
|
||||
|
||||
mkNP = \x,y,z -> UsePN (mkPN x y z) ;
|
||||
makeCN : N -> CN ;
|
||||
makeNP : Str -> Gender -> Animacy -> NP ;
|
||||
|
||||
makeCN = UseN;
|
||||
|
||||
makeNP = \x,y,z -> UsePN (mk3PN x y z) ;
|
||||
|
||||
-- Adjective definitions
|
||||
regA = \ray, comp ->
|
||||
@@ -474,7 +486,7 @@ regN = \ray ->
|
||||
-- Verb definitions
|
||||
|
||||
-- mkVerbum = \asp, sgP1, sgP2, sgP3, plP1, plP2, plP3,
|
||||
mkV = \asp, sgP1, sgP2, sgP3, plP1, plP2, plP3,
|
||||
mk9V = \asp, sgP1, sgP2, sgP3, plP1, plP2, plP3,
|
||||
sgMascPast, imperSgP2, inf -> case asp of {
|
||||
Perfective =>
|
||||
mkVerb (perfectiveActivePattern inf imperSgP2
|
||||
@@ -510,8 +522,8 @@ regN = \ray ->
|
||||
VSubj gn => aller.s ! VFORM vox (VSUB gn)
|
||||
}; t = Present ; a = aller.asp ; w = vox ; lock_V = <>} ;
|
||||
-}
|
||||
mkV2 v p cas = v ** {s2 = p ; c = cas; lock_V2 = <>};
|
||||
dirV2 v = mkV2 v [] Acc;
|
||||
mk2V2 v p cas = v ** {s2 = p ; c = cas; lock_V2 = <>};
|
||||
dirV2 v = mk2V2 v [] Acc;
|
||||
|
||||
|
||||
tvDirDir v = mkV3 v "" "" Acc Dat;
|
||||
@@ -523,438 +535,69 @@ regN = \ray ->
|
||||
mkV3 v s1 s2 c1 c2 = v ** {s2 = s1; c = c1; s4 = s2; c2=c2; lock_V3 = <>};
|
||||
|
||||
|
||||
----2 Parameters
|
||||
----
|
||||
---- To abstract over gender names, we define the following identifiers.
|
||||
--
|
||||
--oper
|
||||
-- Gender : Type ;
|
||||
--
|
||||
-- human : Gender ;
|
||||
-- nonhuman : Gender ;
|
||||
-- masculine : Gender ;
|
||||
--
|
||||
---- To abstract over number names, we define the following.
|
||||
--
|
||||
-- Number : Type ;
|
||||
--
|
||||
-- singular : Number ;
|
||||
-- plural : Number ;
|
||||
--
|
||||
---- To abstract over case names, we define the following.
|
||||
--
|
||||
-- Case : Type ;
|
||||
--
|
||||
-- nominative : Case ;
|
||||
-- genitive : Case ;
|
||||
--
|
||||
---- Prepositions are used in many-argument functions for rection.
|
||||
--
|
||||
-- Preposition : Type ;
|
||||
--
|
||||
--
|
||||
----2 Nouns
|
||||
--
|
||||
---- Worst case: give all four forms and the semantic gender.
|
||||
--
|
||||
-- mkN : (man,men,man's,men's : Str) -> N ;
|
||||
--
|
||||
---- The regular function captures the variants for nouns ending with
|
||||
---- "s","sh","x","z" or "y": "kiss - kisses", "flash - flashes";
|
||||
---- "fly - flies" (but "toy - toys"),
|
||||
--
|
||||
-- regN : Str -> N ;
|
||||
--
|
||||
---- In practice the worst case is just: give singular and plural nominative.
|
||||
--
|
||||
-- mk2N : (man,men : Str) -> N ;
|
||||
--
|
||||
---- All nouns created by the previous functions are marked as
|
||||
---- $nonhuman$. If you want a $human$ noun, wrap it with the following
|
||||
---- function:
|
||||
--
|
||||
-- genderN : Gender -> N -> N ;
|
||||
--
|
||||
----3 Compound nouns
|
||||
----
|
||||
---- A compound noun ia an uninflected string attached to an inflected noun,
|
||||
---- such as "baby boom", "chief executive officer".
|
||||
--
|
||||
-- compoundN : Str -> N -> N ;
|
||||
--
|
||||
--
|
||||
----3 Relational nouns
|
||||
----
|
||||
---- Relational nouns ("daughter of x") need a preposition.
|
||||
--
|
||||
-- mkN2 : N -> Preposition -> N2 ;
|
||||
--
|
||||
---- The most common preposition is "of", and the following is a
|
||||
---- shortcut for regular relational nouns with "of".
|
||||
--
|
||||
-- regN2 : Str -> N2 ;
|
||||
--
|
||||
---- Use the function $mkPreposition$ or see the section on prepositions below to
|
||||
---- form other prepositions.
|
||||
----
|
||||
---- Three-place relational nouns ("the connection from x to y") need two prepositions.
|
||||
--
|
||||
-- mkN3 : N -> Preposition -> Preposition -> N3 ;
|
||||
--
|
||||
--
|
||||
----3 Relational common noun phrases
|
||||
----
|
||||
---- In some cases, you may want to make a complex $CN$ into a
|
||||
---- relational noun (e.g. "the old town hall of").
|
||||
--
|
||||
-- cnN2 : CN -> Preposition -> N2 ;
|
||||
-- cnN3 : CN -> Preposition -> Preposition -> N3 ;
|
||||
--
|
||||
----
|
||||
----3 Proper names and noun phrases
|
||||
----
|
||||
---- Proper names, with a regular genitive, are formed as follows
|
||||
--
|
||||
-- regPN : Str -> Gender -> PN ; -- John, John's
|
||||
--
|
||||
---- Sometimes you can reuse a common noun as a proper name, e.g. "Bank".
|
||||
--
|
||||
-- nounPN : N -> PN ;
|
||||
--
|
||||
---- To form a noun phrase that can also be plural and have an irregular
|
||||
---- genitive, you can use the worst-case function.
|
||||
--
|
||||
-- mkNP : Str -> Str -> Number -> Gender -> NP ;
|
||||
--
|
||||
----2 Adjectives
|
||||
--
|
||||
---- Non-comparison one-place adjectives need two forms: one for
|
||||
---- the adjectival and one for the adverbial form ("free - freely")
|
||||
--
|
||||
-- mkA : (free,freely : Str) -> A ;
|
||||
--
|
||||
---- For regular adjectives, the adverbial form is derived. This holds
|
||||
---- even for cases with the variation "happy - happily".
|
||||
--
|
||||
-- regA : Str -> A ;
|
||||
--
|
||||
----3 Two-place adjectives
|
||||
----
|
||||
---- Two-place adjectives need a preposition for their second argument.
|
||||
--
|
||||
-- mkA2 : A -> Preposition -> A2 ;
|
||||
--
|
||||
---- Comparison adjectives may two more forms.
|
||||
--
|
||||
-- ADeg : Type ;
|
||||
--
|
||||
-- mkADeg : (good,better,best,well : Str) -> ADeg ;
|
||||
--
|
||||
---- The regular pattern recognizes two common variations:
|
||||
---- "-e" ("rude" - "ruder" - "rudest") and
|
||||
---- "-y" ("happy - happier - happiest - happily")
|
||||
--
|
||||
-- regADeg : Str -> ADeg ; -- long, longer, longest
|
||||
--
|
||||
---- However, the duplication of the final consonant is nor predicted,
|
||||
---- but a separate pattern is used:
|
||||
--
|
||||
-- duplADeg : Str -> ADeg ; -- fat, fatter, fattest
|
||||
--
|
||||
---- If comparison is formed by "more, "most", as in general for
|
||||
---- long adjective, the following pattern is used:
|
||||
--
|
||||
-- compoundADeg : A -> ADeg ; -- -/more/most ridiculous
|
||||
--
|
||||
---- From a given $ADeg$, it is possible to get back to $A$.
|
||||
--
|
||||
-- adegA : ADeg -> A ;
|
||||
--
|
||||
--
|
||||
----2 Adverbs
|
||||
--
|
||||
---- Adverbs are not inflected. Most lexical ones have position
|
||||
---- after the verb. Some can be preverbal (e.g. "always").
|
||||
--
|
||||
-- mkAdv : Str -> Adv ;
|
||||
-- mkAdV : Str -> AdV ;
|
||||
--
|
||||
---- Adverbs modifying adjectives and sentences can also be formed.
|
||||
--
|
||||
-- mkAdA : Str -> AdA ;
|
||||
--
|
||||
----2 Prepositions
|
||||
----
|
||||
---- A preposition as used for rection in the lexicon, as well as to
|
||||
---- build $PP$s in the resource API, just requires a string.
|
||||
--
|
||||
-- mkPreposition : Str -> Preposition ;
|
||||
-- mkPrep : Str -> Prep ;
|
||||
--
|
||||
---- (These two functions are synonyms.)
|
||||
--
|
||||
----2 Verbs
|
||||
----
|
||||
---- Except for "be", the worst case needs five forms: the infinitive and
|
||||
---- the third person singular present, the past indicative, and the
|
||||
---- past and present participles.
|
||||
--
|
||||
-- mkV : (go, goes, went, gone, going : Str) -> V ;
|
||||
--
|
||||
---- The regular verb function recognizes the special cases where the last
|
||||
---- character is "y" ("cry - cries" but "buy - buys") or "s", "sh", "x", "z"
|
||||
---- ("fix - fixes", etc).
|
||||
--
|
||||
-- regV : Str -> V ;
|
||||
--
|
||||
---- The following variant duplicates the last letter in the forms like
|
||||
---- "rip - ripped - ripping".
|
||||
--
|
||||
-- regDuplV : Str -> V ;
|
||||
--
|
||||
---- There is an extensive list of irregular verbs in the module $IrregularEng$.
|
||||
---- In practice, it is enough to give three forms,
|
||||
---- e.g. "drink - drank - drunk", with a variant indicating consonant
|
||||
---- duplication in the present participle.
|
||||
--
|
||||
-- irregV : (drink, drank, drunk : Str) -> V ;
|
||||
-- irregDuplV : (get, got, gotten : Str) -> V ;
|
||||
--
|
||||
--
|
||||
----3 Verbs with a particle.
|
||||
----
|
||||
---- The particle, such as in "switch on", is given as a string.
|
||||
--
|
||||
-- partV : V -> Str -> V ;
|
||||
--
|
||||
----3 Reflexive verbs
|
||||
----
|
||||
---- By default, verbs are not reflexive; this function makes them that.
|
||||
--
|
||||
-- reflV : V -> V ;
|
||||
--
|
||||
----3 Two-place verbs
|
||||
----
|
||||
---- Two-place verbs need a preposition, except the special case with direct object.
|
||||
---- (transitive verbs). Notice that a particle comes from the $V$.
|
||||
--
|
||||
-- mkV2 : V -> Preposition -> V2 ;
|
||||
--
|
||||
-- dirV2 : V -> V2 ;
|
||||
--
|
||||
----3 Three-place verbs
|
||||
----
|
||||
---- Three-place (ditransitive) verbs need two prepositions, of which
|
||||
---- the first one or both can be absent.
|
||||
--
|
||||
-- mkV3 : V -> Preposition -> Preposition -> V3 ; -- speak, with, about
|
||||
-- dirV3 : V -> Preposition -> V3 ; -- give,_,to
|
||||
-- dirdirV3 : V -> V3 ; -- give,_,_
|
||||
--
|
||||
----3 Other complement patterns
|
||||
----
|
||||
---- Verbs and adjectives can take complements such as sentences,
|
||||
---- questions, verb phrases, and adjectives.
|
||||
--
|
||||
-- mkV0 : V -> V0 ;
|
||||
-- mkVS : V -> VS ;
|
||||
-- mkV2S : V -> Str -> V2S ;
|
||||
-- mkVV : V -> VV ;
|
||||
-- mkV2V : V -> Str -> Str -> V2V ;
|
||||
-- mkVA : V -> VA ;
|
||||
-- mkV2A : V -> Str -> V2A ;
|
||||
-- mkVQ : V -> VQ ;
|
||||
-- mkV2Q : V -> Str -> V2Q ;
|
||||
--
|
||||
-- mkAS : A -> AS ;
|
||||
-- mkA2S : A -> Str -> A2S ;
|
||||
-- mkAV : A -> AV ;
|
||||
-- mkA2V : A -> Str -> A2V ;
|
||||
--
|
||||
---- Notice: categories $V2S, V2V, V2A, V2Q$ are in v 1.0 treated
|
||||
---- just as synonyms of $V2$, and the second argument is given
|
||||
---- as an adverb. Likewise $AS, A2S, AV, A2V$ are just $A$.
|
||||
---- $V0$ is just $V$.
|
||||
--
|
||||
-- V0, V2S, V2V, V2A, V2Q : Type ;
|
||||
-- AS, A2S, AV, A2V : Type ;
|
||||
--
|
||||
--
|
||||
----2 Definitions of paradigms
|
||||
----
|
||||
---- The definitions should not bother the user of the API. So they are
|
||||
---- hidden from the document.
|
||||
----.
|
||||
--
|
||||
-- Gender = MorphoEng.Gender ;
|
||||
-- Number = MorphoEng.Number ;
|
||||
-- Case = MorphoEng.Case ;
|
||||
-- human = Masc ;
|
||||
-- nonhuman = Neutr ;
|
||||
-- masculine = Masc ;
|
||||
-- feminine = Fem ;
|
||||
-- singular = Sg ;
|
||||
-- plural = Pl ;
|
||||
-- nominative = Nom ;
|
||||
-- genitive = Gen ;
|
||||
--
|
||||
-- Preposition = Str ;
|
||||
--
|
||||
-- regN = \ray ->
|
||||
-- let
|
||||
-- ra = Predef.tk 1 ray ;
|
||||
-- y = Predef.dp 1 ray ;
|
||||
-- r = Predef.tk 2 ray ;
|
||||
-- ay = Predef.dp 2 ray ;
|
||||
-- rays =
|
||||
-- case y of {
|
||||
-- "y" => y2ie ray "s" ;
|
||||
-- "s" => ray + "es" ;
|
||||
-- "z" => ray + "es" ;
|
||||
-- "x" => ray + "es" ;
|
||||
-- _ => case ay of {
|
||||
-- "sh" => ray + "es" ;
|
||||
-- "ch" => ray + "es" ;
|
||||
-- _ => ray + "s"
|
||||
-- }
|
||||
-- }
|
||||
-- in
|
||||
-- mk2N ray rays ;
|
||||
--
|
||||
-- mk2N = \man,men ->
|
||||
-- let mens = case last men of {
|
||||
-- "s" => men + "'" ;
|
||||
-- _ => men + "'s"
|
||||
-- }
|
||||
-- in
|
||||
-- mkN man men (man + "'s") mens ;
|
||||
--
|
||||
-- mkN = \man,men,man's,men's ->
|
||||
-- mkNoun man man's men men's ** {g = Neutr ; lock_N = <>} ;
|
||||
--
|
||||
-- genderN g man = {s = man.s ; g = g ; lock_N = <>} ;
|
||||
--
|
||||
-- compoundN s n = {s = \\x,y => s ++ n.s ! x ! y ; g=n.g ; lock_N = <>} ;
|
||||
--
|
||||
-- mkN2 = \n,p -> n ** {lock_N2 = <> ; c2 = p} ;
|
||||
-- regN2 n = mkN2 (regN n) (mkPreposition "of") ;
|
||||
-- mkN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p ; c3 = q} ;
|
||||
-- cnN2 = \n,p -> n ** {lock_N2 = <> ; c2 = p} ;
|
||||
-- cnN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p ; c3 = q} ;
|
||||
--
|
||||
-- regPN n g = nameReg n g ** {lock_PN = <>} ;
|
||||
-- nounPN n = {s = n.s ! singular ; g = n.g ; lock_PN = <>} ;
|
||||
-- mkNP x y n g = {s = table {Gen => x ; _ => y} ; a = agrP3 n ;
|
||||
-- lock_NP = <>} ;
|
||||
--
|
||||
-- mkA a b = mkAdjective a a a b ** {lock_A = <>} ;
|
||||
-- regA a = regAdjective a ** {lock_A = <>} ;
|
||||
--
|
||||
-- mkA2 a p = a ** {c2 = p ; lock_A2 = <>} ;
|
||||
--
|
||||
-- ADeg = A ; ----
|
||||
--
|
||||
-- mkADeg a b c d = mkAdjective a b c d ** {lock_A = <>} ;
|
||||
--
|
||||
-- regADeg happy =
|
||||
-- let
|
||||
-- happ = init happy ;
|
||||
-- y = last happy ;
|
||||
-- happie = case y of {
|
||||
-- "y" => happ + "ie" ;
|
||||
-- "e" => happy ;
|
||||
-- _ => happy + "e"
|
||||
-- } ;
|
||||
-- happily = case y of {
|
||||
-- "y" => happ + "ily" ;
|
||||
-- _ => happy + "ly"
|
||||
-- } ;
|
||||
-- in mkADeg happy (happie + "r") (happie + "st") happily ;
|
||||
--
|
||||
-- duplADeg fat =
|
||||
-- mkADeg fat
|
||||
-- (fat + last fat + "er") (fat + last fat + "est") (fat + "ly") ;
|
||||
--
|
||||
-- compoundADeg a =
|
||||
-- let ad = (a.s ! AAdj Posit)
|
||||
-- in mkADeg ad ("more" ++ ad) ("most" ++ ad) (a.s ! AAdv) ;
|
||||
--
|
||||
-- adegA a = a ;
|
||||
--
|
||||
-- mkAdv x = ss x ** {lock_Adv = <>} ;
|
||||
-- mkAdV x = ss x ** {lock_AdV = <>} ;
|
||||
-- mkAdA x = ss x ** {lock_AdA = <>} ;
|
||||
--
|
||||
-- mkPreposition p = p ;
|
||||
-- mkPrep p = ss p ** {lock_Prep = <>} ;
|
||||
--
|
||||
-- mkV a b c d e = mkVerb a b c d e ** {s1 = [] ; lock_V = <>} ;
|
||||
--
|
||||
-- regV cry =
|
||||
-- let
|
||||
-- cr = init cry ;
|
||||
-- y = last cry ;
|
||||
-- cries = (regN cry).s ! Pl ! Nom ; -- !
|
||||
-- crie = init cries ;
|
||||
-- cried = case last crie of {
|
||||
-- "e" => crie + "d" ;
|
||||
-- _ => crie + "ed"
|
||||
-- } ;
|
||||
-- crying = case y of {
|
||||
-- "e" => case last cr of {
|
||||
-- "e" => cry + "ing" ;
|
||||
-- _ => cr + "ing"
|
||||
-- } ;
|
||||
-- _ => cry + "ing"
|
||||
-- }
|
||||
-- in mkV cry cries cried cried crying ;
|
||||
--
|
||||
-- regDuplV fit =
|
||||
-- let fitt = fit + last fit in
|
||||
-- mkV fit (fit + "s") (fitt + "ed") (fitt + "ed") (fitt + "ing") ;
|
||||
--
|
||||
-- irregV x y z = let reg = (regV x).s in
|
||||
-- mkV x (reg ! VPres) y z (reg ! VPresPart) ** {s1 = [] ; lock_V = <>} ;
|
||||
--
|
||||
-- irregDuplV fit y z =
|
||||
-- let
|
||||
-- fitting = (regDuplV fit).s ! VPresPart
|
||||
-- in
|
||||
-- mkV fit (fit + "s") y z fitting ;
|
||||
--
|
||||
-- partV v p = verbPart v p ** {lock_V = <>} ;
|
||||
-- reflV v = {s = v.s ; part = v.part ; lock_V = v.lock_V ; isRefl = True} ;
|
||||
--
|
||||
-- mkV2 v p = v ** {s = v.s ; s1 = v.s1 ; c2 = p ; lock_V2 = <>} ;
|
||||
-- dirV2 v = mkV2 v [] ;
|
||||
--
|
||||
-- mkV3 v p q = v ** {s = v.s ; s1 = v.s1 ; c2 = p ; c3 = q ; lock_V3 = <>} ;
|
||||
-- dirV3 v p = mkV3 v [] p ;
|
||||
-- dirdirV3 v = dirV3 v [] ;
|
||||
--
|
||||
-- mkVS v = v ** {lock_VS = <>} ;
|
||||
-- mkVV v = {
|
||||
-- s = table {VVF vf => v.s ! vf ; _ => variants {}} ;
|
||||
-- isAux = False ; lock_VV = <>
|
||||
-- } ;
|
||||
-- mkVQ v = v ** {lock_VQ = <>} ;
|
||||
--
|
||||
-- V0 : Type = V ;
|
||||
-- V2S, V2V, V2Q, V2A : Type = V2 ;
|
||||
-- AS, A2S, AV : Type = A ;
|
||||
-- A2V : Type = A2 ;
|
||||
--
|
||||
-- mkV0 v = v ** {lock_V = <>} ;
|
||||
-- mkV2S v p = mkV2 v p ** {lock_V2 = <>} ;
|
||||
-- mkV2V v p t = mkV2 v p ** {s4 = t ; lock_V2 = <>} ;
|
||||
-- mkVA v = v ** {lock_VA = <>} ;
|
||||
-- mkV2A v p = mkV2 v p ** {lock_V2A = <>} ;
|
||||
-- mkV2Q v p = mkV2 v p ** {lock_V2 = <>} ;
|
||||
--
|
||||
-- mkAS v = v ** {lock_A = <>} ;
|
||||
-- mkA2S v p = mkA2 v p ** {lock_A = <>} ;
|
||||
-- mkAV v = v ** {lock_A = <>} ;
|
||||
-- mkA2V v p = mkA2 v p ** {lock_A2 = <>} ;
|
||||
--
|
||||
---------------------------
|
||||
-- overloaded API started by AR 6/7/2007
|
||||
|
||||
mkN = overload {
|
||||
mkN : Str -> N = regN ;
|
||||
mkN : Str -> Gender -> Animacy -> N = mkIndeclinableNoun ;
|
||||
mkN : (nomSg,_,_,_,_,_,_,_,_,_,_,prepPl : Str) -> Gender -> Animacy -> N = mk12N ;
|
||||
} ;
|
||||
|
||||
regN : Str -> N ;
|
||||
mkIndeclinableNoun: Str -> Gender -> Animacy -> N ;
|
||||
mk12N : (nomSg, genSg, datSg, accSg, instSg, preposSg,
|
||||
nomPl, genPl, datPl, accPl, instPl, preposPl: Str) -> Gender -> Animacy -> N ;
|
||||
|
||||
|
||||
mkPN = overload {
|
||||
mkPN : Str -> PN = regPN ;
|
||||
mkPN : Str -> Gender -> Animacy -> PN = mk3PN ; -- "Иван", "Маша"
|
||||
mkPN : N -> PN = nounPN ;
|
||||
} ;
|
||||
|
||||
regPN : Str -> PN = \s -> nounPN (regN s) ;
|
||||
mk3PN : Str -> Gender -> Animacy -> PN ; -- "Иван", "Маша"
|
||||
nounPN : N -> PN ;
|
||||
|
||||
-- mkADeg : A -> Str -> ADeg ;
|
||||
|
||||
-- On top level, there are adjectival phrases. The most common case is
|
||||
-- just to use a one-place adjective.
|
||||
-- ap : A -> IsPostfixAdj -> AP ;
|
||||
|
||||
mkA = overload {
|
||||
mkA : Str -> A = adjInvar ; -- khaki, mini, hindi, netto
|
||||
mkA : Str -> Str -> A = regA ;
|
||||
} ;
|
||||
|
||||
regA : Str -> Str -> A ;
|
||||
adjInvar : Str -> A ; -- khaki, mini, hindi, netto
|
||||
|
||||
-- mkVerbum : Aspect -> (presentSgP1,presentSgP2,presentSgP3,
|
||||
|
||||
mkV = overload {
|
||||
mkV : Aspect -> Conjugation -> (stemPrsSgP1,endPrsSgP1,pastSgP1,imp,inf : Str) -> V = regV ;
|
||||
mkV : Aspect -> (presSgP1,presSgP2,presSgP3,presPlP1,presPlP2,presPlP3,pastSgMasc,imp,inf: Str) -> V = mk9V ;
|
||||
|
||||
} ;
|
||||
|
||||
regV :Aspect -> Conjugation -> (stemPresentSgP1,endingPresentSgP1,
|
||||
pastSgP1,imperative,infinitive : Str) -> V ;
|
||||
mk9V : Aspect -> (presentSgP1,presentSgP2,presentSgP3,
|
||||
presentPlP1,presentPlP2,presentPlP3,
|
||||
pastSgMasculine,imperative,infinitive: Str) -> V ;
|
||||
|
||||
|
||||
mkV2 = overload {
|
||||
mkV2 : V -> V2 = dirV2 ; -- "видеть", "любить"
|
||||
mkV2 : V -> Str -> Case -> V2 = mk2V2 ; -- "войти в дом"; "в", accusative
|
||||
} ;
|
||||
|
||||
mk2V2 : V -> Str -> Case -> V2 ; -- "войти в дом"; "в", accusative
|
||||
dirV2 : V -> V2 ; -- "видеть", "любить"
|
||||
|
||||
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -6,13 +6,13 @@ concrete ExtraSpa of ExtraSpaAbs = ExtraRomanceSpa **
|
||||
"yo" "me" "me" "mí"
|
||||
"mi" "mi" "mis" "mis"
|
||||
Fem Sg P1 ;
|
||||
these8fem_NP = mkNP ["estas"] Fem Pl ;
|
||||
these8fem_NP = makeNP ["estas"] Fem Pl ;
|
||||
they8fem_Pron = mkPronoun
|
||||
"ellas" "las" "les" "ellas"
|
||||
"su" "su" "sus" "sus"
|
||||
Fem Pl P3 ;
|
||||
this8fem_NP = pn2np (mkPN ["esta"] Fem) ;
|
||||
those8fem_NP = mkNP ["esas"] Fem Pl ;
|
||||
those8fem_NP = makeNP ["esas"] Fem Pl ;
|
||||
|
||||
we8fem_Pron = mkPronoun
|
||||
"nosotras" "nos" "nos" "nosotras"
|
||||
|
||||
@@ -319,7 +319,7 @@ oper
|
||||
}
|
||||
} ;
|
||||
|
||||
mkNP x g n = {s = (pn2np (mk2PN x g)).s; a = agrP3 g n ; hasClit = False} ** {lock_NP = <>} ;
|
||||
makeNP x g n = {s = (pn2np (mk2PN x g)).s; a = agrP3 g n ; hasClit = False} ** {lock_NP = <>} ;
|
||||
|
||||
mk5A a b c d e =
|
||||
compADeg {s = \\_ => (mkAdj a b c d e).s ; isPre = False ; lock_A = <>} ;
|
||||
@@ -430,7 +430,7 @@ oper
|
||||
-- To form a noun phrase that can also be plural,
|
||||
-- you can use the worst-case function.
|
||||
|
||||
mkNP : Str -> Gender -> Number -> NP ;
|
||||
makeNP : Str -> Gender -> Number -> NP ;
|
||||
|
||||
mkA = overload {
|
||||
mkA : (util : Str) -> A = regA ;
|
||||
|
||||
@@ -27,7 +27,7 @@ lin
|
||||
can_VV = mkVV (verboV (poder_58 "poder")) ;
|
||||
during_Prep = mkPrep "durante" ; ----
|
||||
either7or_DConj = {s1,s2 = "o" ; n = Sg} ;
|
||||
everybody_NP = mkNP ["todos"] Masc Pl ;
|
||||
everybody_NP = makeNP ["todos"] Masc Pl ;
|
||||
every_Det = {s = \\_,_ => "cada" ; n = Sg} ;
|
||||
everything_NP = pn2np (mkPN ["todo"] Masc) ;
|
||||
everywhere_Adv = ss ["en todas partes"] ;
|
||||
@@ -92,12 +92,12 @@ lin
|
||||
Pl => \\g,c => prepCase c ++ genForms "esos" "esas" ! g
|
||||
}
|
||||
} ;
|
||||
that_NP = mkNP ["eso"] Masc Sg ;
|
||||
that_NP = makeNP ["eso"] Masc Sg ;
|
||||
there_Adv = mkAdv "allí" ; -- allá
|
||||
there7to_Adv = mkAdv ["para allá"] ;
|
||||
there7from_Adv = mkAdv ["de allá"] ;
|
||||
therefore_PConj = ss ["por eso"] ;
|
||||
these_NP = mkNP ["estos"] Masc Pl ;
|
||||
these_NP = makeNP ["estos"] Masc Pl ;
|
||||
they_Pron = mkPronoun
|
||||
"ellos" "los" "les" "ellos"
|
||||
"su" "su" "sus" "sus"
|
||||
@@ -109,7 +109,7 @@ lin
|
||||
}
|
||||
} ;
|
||||
this_NP = pn2np (mkPN ["esto"] Masc) ;
|
||||
those_NP = mkNP ["esos"] Masc Pl ;
|
||||
those_NP = makeNP ["esos"] Masc Pl ;
|
||||
through_Prep = mkPrep "por" ;
|
||||
too_AdA = ss "demasiado" ;
|
||||
to_Prep = complDat ;
|
||||
|
||||
@@ -431,7 +431,7 @@ oper
|
||||
regPN n = regGenPN n utrum ;
|
||||
regGenPN n g = {s = \\c => mkCase c n ; g = g} ** {lock_PN = <>} ;
|
||||
nounPN n = {s = n.s ! singular ! Indef ; g = n.g ; lock_PN = <>} ;
|
||||
mkNP x y n g =
|
||||
makeNP x y n g =
|
||||
{s = table {NPPoss _ => y ; _ => x} ; a = agrP3 g n ; p = P3 ;
|
||||
lock_NP = <>} ;
|
||||
|
||||
@@ -614,7 +614,7 @@ oper
|
||||
-- To form a noun phrase that can also be plural and have an irregular
|
||||
-- genitive, you can use the worst-case function.
|
||||
|
||||
mkNP : Str -> Str -> Number -> Gender -> NP ;
|
||||
makeNP : Str -> Str -> Number -> Gender -> NP ;
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user