1
0
forked from GitHub/gf-rgl

Merge remote-tracking branch 'upstream/master' into por

This commit is contained in:
odanoburu
2018-06-06 09:51:42 -03:00
10 changed files with 55 additions and 312 deletions

View File

@@ -400,7 +400,6 @@
"CatDut", "CatDut",
"ExtDut", "ExtDut",
"GrammarDut", "GrammarDut",
"MorphoDut",
"NumeralDut", "NumeralDut",
"StructuralDut", "StructuralDut",
"IdiomDut", "IdiomDut",

View File

@@ -1,5 +1,5 @@
concrete ExtraDut of ExtraDutAbs = CatDut ** concrete ExtraDut of ExtraDutAbs = CatDut **
open ResDut, MorphoDut, Coordination, Prelude, IrregDut, (P = ParadigmsDut), NounDut in open ResDut, Coordination, Prelude, IrregDut, (P = ParadigmsDut), NounDut in
{ {
flags coding=utf8 ; flags coding=utf8 ;
@@ -109,7 +109,7 @@ lin
inf : Str = vp.inf.p1 ; inf : Str = vp.inf.p1 ;
extra : Str = vp.ext extra : Str = vp.ext
in in
lin NP (MorphoDut.mkNP (vp.s.s ! VInf ++ "van" ++ compl ++ inf ++ extra ) Utr Sg) ; lin NP (mkNP (vp.s.s ! VInf ++ "van" ++ compl ++ inf ++ extra ) Utr Sg) ;
lin lin

View File

@@ -1,5 +1,5 @@
concrete IdiomDut of Idiom = CatDut ** concrete IdiomDut of Idiom = CatDut **
open MorphoDut, (P = ParadigmsDut), IrregDut, Prelude in { open ResDut, (P = ParadigmsDut), IrregDut, Prelude in {
flags optimize=all_subs ; flags optimize=all_subs ;

View File

@@ -1,6 +1,6 @@
--# -path=.:../common:../abstract --# -path=.:../common:../abstract
resource MakeStructuralDut = open CatDut, ParadigmsDut, MorphoDut, Prelude in resource MakeStructuralDut = open CatDut, ParadigmsDut, Prelude in
{ {
--{ --{
-- --

View File

@@ -1,101 +0,0 @@
--# -path=.:../common:../../prelude
--
----1 A Simple Dutman Resource Morphology
----
---- Aarne Ranta & Harald Hammarström 2002 -- 2006
----
---- This resource morphology contains definitions needed in the resource
---- syntax. To build a lexicon, it is better to use $ParadigmsDut$, which
---- gives a higher-level access to this module.
--
resource MorphoDut = ResDut ** open Prelude, (Predef=Predef) in
{
flags coding=utf8 ;
--{
--
-- flags optimize=all ;
--
--oper
--
---- For $StructuralDut$.
--
-- mkPrep : Str -> Case -> Preposition = \s,c ->
-- {s = s ; c = c} ;
--
-- nameNounPhrase : {s : Case => Str} -> {s : Case => Str ; a : Agr} = \name ->
-- name ** {a = agrP3 Sg} ;
--
-- detLikeAdj : Number -> Str ->
-- {s,sp : Gender => Case => Str ; n : Number ; a : Adjf} = \n,dies ->
-- {s,sp = appAdj (regA dies) ! n ; n = n ; a = Weak} ;
--
-- mkOrd : {s : Degree => AForm => Str} -> {s : AForm => Str} = \a ->
-- {s = a.s ! Posit} ;
--
---- For $ParadigmsDut$.
--
-- genitS : Str -> Str = \hund -> case hund of {
-- _ + ("el" | "en" | "er") => hund + "s" ;
-- _ + ("s" | "ß" | "sch" | "st" | "x" | "z") => hund + "es" ;
-- _ => hund + variants {"s" ; "es"}
-- } ;
-- pluralN : Str -> Str = \hund -> case hund of {
-- _ + ("el" | "er" | "e") => hund + "n" ;
-- _ + "en" => hund ;
-- _ => hund + "en"
-- } ;
-- dativE : Str -> Str = \hund -> case hund of {
-- _ + ("el" | "en" | "er" | "e") => hund ;
-- _ => variants {hund ; hund + "e"}
-- } ;
--
---- Duden, p. 119
--
-- verbT : Str -> Str = \v -> case v of {
-- _ + ("t" | "d") => v + "et" ; -- gründen, reden, betten
-- _ + ("ch" | "k" | "p" | "t" | "g" | "b" | "d" | "f" | "s") +
-- ("m" | "n") => v + "et" ; -- atmen, widmen, öffnen, rechnen
-- _ => v + "t" -- lernen, lärmen, qualmen etc
-- } ;
--
-- verbST : Str -> Str = \v -> case v of {
-- _ + ("s" | "ss" | "ß" | "sch" | "x" | "z") => v + "t" ;
-- _ => v + "st"
-- } ;
--
-- stemVerb : Str -> Str = \v -> case v of {
-- _ + ("rn" | "ln") => init v ;
-- _ => Predef.tk 2 v
-- } ;
--
---- For $Numeral$.
--
-- LinDigit = {s : DForm => CardOrd => Str} ;
--
-- cardOrd : Str -> Str -> CardOrd => Str = \drei,dritte ->
-- table {
-- NCard _ _ => drei ;
-- NOrd a => (regA (init dritte)).s ! Posit ! a
-- } ;
--
-- cardReg : Str -> CardOrd => Str = \zehn ->
-- cardOrd zehn (zehn + "te") ;
--
-- mkDigit : (x1,_,_,x4 : Str) -> LinDigit =
-- \drei,dreizehn,dreissig,dritte ->
-- {s = table {
-- DUnit => cardOrd drei dritte ;
-- DTeen => cardReg dreizehn ;
-- DTen => cardOrd dreissig (dreissig + "ste")
-- }
-- } ;
--
-- regDigit : Str -> LinDigit = \vier ->
-- mkDigit vier (vier + "zehn") (vier + "zig") (vier + "te") ;
--
-- invNum : CardOrd = NCard Masc Nom ;
--
--} ;
--
}

View File

@@ -327,169 +327,14 @@ oper
} ; } ;
mkmaxV3 : V -> Prep -> Prep -> V3 = \v,c,d -> lin V3 (v ** {c2 = <c,True> ; c3 = <d,True>}) ; mkmaxV3 : V -> Prep -> Prep -> V3 = \v,c,d -> lin V3 (v ** {c2 = <c,True> ; c3 = <d,True>}) ;
----2 Definitions of paradigms
----
---- The definitions should not bother the user of the API. So they are
---- hidden from the document.
--
--
--
-- Gender = MorphoDut.Gender ;
-- Case = MorphoDut.Case ;
-- Number = MorphoDut.Number ;
-- masculine = Masc ;
-- feminine = Fem ;
-- neuter = Neutr ;
-- nominative = Nom ;
-- accusative = Acc ;
-- dative = Dat ;
-- genitive = Gen ;
-- singular = Sg ;
-- plural = Pl ;
--
-- mk6N a b c d e f g = MorphoDut.mkN a b c d e f g ** {lock_N = <>} ;
--
-- regN : Str -> N = \hund -> case hund of {
-- _ + "e" => mk6N hund hund hund hund (hund + "n") (hund + "n") Fem ;
-- _ + ("ion" | "ung") => mk6N hund hund hund hund (hund + "en") (hund + "en") Fem ;
-- _ + ("er" | "en" | "el") => mk6N hund hund hund (genitS hund) hund (pluralN hund) Masc ;
-- _ => mk6N hund hund hund (genitS hund) (hund + "e") (pluralN hund) Masc
-- } ;
--
-- reg2N : (x1,x2 : Str) -> Gender -> N = \hund,hunde,g ->
-- let
-- hunds = genitS hund ;
-- hundE = dativE hund ;
-- hunden = pluralN hunde
-- in
-- case <hund,hunde,g> of { -- Duden p. 223
-- <_,_ + ("e" | "er"), Masc | Neutr> => -- I,IV
-- mk6N hund hund hundE hunds hunde hunden g ;
-- <_ + ("el"|"er"|"en"),_ + ("el"|"er"|"en"), Masc | Neutr> => -- II
-- mk6N hund hund hund hunds hunde hunden g ;
-- <_,_ + "s", Masc | Neutr> => -- V
-- mk6N hund hund hund (hund + "s") hunde hunde g ;
-- <_,_ + "en", Masc> => -- VI
-- mk6N hund hunde hunde hunde hunde hunde g ;
-- <_,_ + ("e" | "er"), Fem> => -- VII,VIII
-- mk6N hund hund hund hund hunde hunden g ;
-- <_,_ + ("n" | "s"), Fem> => -- IX,X
-- mk6N hund hund hund hund hunde hunde g ;
-- _ => {s = (regN hund).s ; g = g ; lock_N = <>}
-- } ;
--
-- mkN2 = overload {
-- mkN2 : Str -> N2 = \s -> vonN2 (regN s) ;
-- mkN2 : N -> N2 = vonN2 ;
-- mkN2 : N -> Prep -> N2 = mmkN2
-- } ;
--
--
-- mmkN2 : N -> Prep -> N2 = \n,p -> n ** {c2 = p ; lock_N2 = <>} ;
-- vonN2 : N -> N2 = \n -> n ** {c2 = {s = "von" ; c = dative} ; lock_N2 = <>} ;
--
-- mkN3 = \n,p,q -> n ** {c2 = p ; c3 = q ; lock_N3 = <>} ;
--
-- mk2PN = \karolus, karoli ->
-- {s = table {Gen => karoli ; _ => karolus} ; lock_PN = <>} ;
-- regPN = \horst ->
-- mk2PN horst (ifTok Tok (Predef.dp 1 horst) "s" horst (horst + "s")) ;
--
-- mkPN = overload {
-- mkPN : Str -> PN = regPN ;
-- mkPN : (nom,gen : Str) -> PN = mk2PN ;
-- mkPN : (nom,acc,dat,gen : Str) -> PN = \nom,acc,dat,gen ->
-- {s = table {Nom => nom ; Acc => acc ; Dat => dat ; Gen => gen} ; lock_PN = <>}
-- } ;
--
-- mk2PN : (karolus, karoli : Str) -> PN ; -- karolus, karoli
-- regPN : (Johann : Str) -> PN ;
-- -- Johann, Johanns ; Johannes, Johannes
--
--
-- mk3A : (gut,besser,beste : Str) -> A = \a,b,c ->
-- let aa : Str = case a of {
-- teu + "er" => teu + "r" ;
-- mud + "e" => mud ;
-- _ => a
-- } in
-- MorphoDut.mkA a aa b (init c) ** {lock_A = <>} ;
-- mk4A : (gut,gute,besser,beste : Str) -> A = \a,aa,b,c ->
-- MorphoDut.mkA a aa b (init c) ** {lock_A = <>} ;
--
-- regA : Str -> A = \a -> case a of {
-- teu + "er" => mk3A a (teu + "rer") (teu + "reste") ;
-- _ + "e" => mk3A a (a + "r") (a + "ste") ;
-- _ => mk3A a (a + "er") (a + "este")
-- } ;
invarA = \s -> lin A {s = \\_,_ => s} ; ---- comparison invarA = \s -> lin A {s = \\_,_ => s} ; ---- comparison
mkA2 = \a,p -> lin A2 (a ** {c2 = p}) ; mkA2 = \a,p -> lin A2 (a ** {c2 = p}) ;
mkAdv s = {s = s ; lock_Adv = <>} ; mkAdv s = {s = s ; lock_Adv = <>} ;
--
-- mkPrep s c = {s = s ; c = c ; lock_Prep = <>} ;
noPrep = nomergePrep [] ; noPrep = nomergePrep [] ;
-- datPrep = mkPrep [] dative ;
-- genPrep = mkPrep [] genitive ;
-- von_Prep = mkPrep "von" dative ;
-- zu_Prep = mkPrep "zu" dative ;
--
-- mk6V geben gibt gib gab gaebe gegeben =
-- let
-- geb = stemVerb geben ;
-- gebe = geb + "e" ;
-- gibst = verbST (init gibt) ;
-- gebt = verbT geb ;
-- gabst = verbST gab ;
-- gaben = pluralN gab ;
-- gabt = verbT gab
-- in
-- MorphoDut.mkV
-- geben gebe gibst gibt gebt gib gab gabst gaben gabt gaebe gegeben
-- [] VHaben ** {lock_V = <>} ;
--
-- regV fragen =
-- let
-- frag = stemVerb fragen ;
-- fragt = verbT frag ;
-- fragte = fragt + "e" ;
-- gefragt = "ge" + fragt ;
-- in
-- mk6V fragen fragt (frag + "e") fragte fragte gefragt ;
--
-- irregV singen singt sang saenge gesungen =
-- let
-- sing = stemVerb singen ;
-- in
-- mk6V singen singt sing sang saenge gesungen ;
--
-- prefixV p v = MorphoDut.prefixV p v ** {lock_V = v.lock_V} ;
--
-- habenV v =
-- {s = v.s ; prefix = v.prefix ; lock_V = v.lock_V ; aux = VHaben ; vtype = v.vtype} ;
-- seinV v =
-- {s = v.s ; prefix = v.prefix ; lock_V = v.lock_V ; aux = VSein ; vtype = v.vtype} ;
-- reflV v c =
-- {s = v.s ; prefix = v.prefix ; lock_V = v.lock_V ; aux = VHaben ; vtype = VRefl c} ;
--
-- no_geV v = let vs = v.s in {
-- s = table {
-- p@(VPastPart _) => Predef.drop 2 (vs ! p) ;
-- p => vs ! p
-- } ;
-- prefix = v.prefix ; lock_V = v.lock_V ; aux = v.aux ; vtype = v.vtype
-- } ;
--
-- haben_V = MorphoDut.haben_V ** {lock_V = <>} ;
-- sein_V = MorphoDut.sein_V ** {lock_V = <>} ;
-- werden_V = MorphoDut.werden_V ** {lock_V = <>} ;
--
prepV2 : V -> Prep -> V2 ; prepV2 : V -> Prep -> V2 ;
prepV2 v c = lin V2 (v ** {c2 = <c,True>}) ; --if it has prep, needed for word order (place of negation) prepV2 v c = lin V2 (v ** {c2 = <c,True>}) ; --if it has prep, needed for word order (place of negation)

View File

@@ -20,6 +20,13 @@ resource ResDut = ParamX ** open Prelude, Predef in {
NPCase = NPNom | NPAcc ; NPCase = NPNom | NPAcc ;
oper oper
consonant : pattern Str = #("b"|"c"|"d"|"f"|"g"|"h"|"j"|"k"|"l"|"m"|"n"|"p"|"q"|"r"|"s"|"t"|"v"|"w"|"x"|"y"|"z") ;
vowel : pattern Str = #("a"|"e"|"i"|"o"|"u") ;
dupCons : pattern Str = #("b"|"d"|"f"|"g"|"k"|"l"|"m"|"n"|"p"|"r"|"s"|"t") ; -- duplicable consonant
dupVow : pattern Str = #("aa"|"ee"|"oo"|"uu") ; -- actually duplicated vowel
diphthong : pattern Str = #("ei"|"eu"|"oe"|"ou"|"ie"|"ij"|"ui") ;
Noun = {s : NForm => Str ; g : Gender} ; Noun = {s : NForm => Str ; g : Gender} ;
mkNoun : (_,_ : Str) -> Gender -> Noun = \sg,pl,g -> { mkNoun : (_,_ : Str) -> Gender -> Noun = \sg,pl,g -> {
@@ -33,17 +40,16 @@ resource ResDut = ParamX ** open Prelude, Predef in {
} ; } ;
regNoun : Str -> Noun = \s -> case s of { regNoun : Str -> Noun = \s -> case s of {
_ + ("a" | "o" | "y" | "u" | "oe" | "é") => mkNoun s (s + "'s") Utr ; _ + ("a"|"o"|"y"|"u"|"oe"|"é") => mkNoun s (s + "'s") Utr ;
_ + ("oir" | "ion" | "je" | "c") => mkNoun s (s + "s") Neutr ; _ + ("oir"|"ion"|"je"|"c") => mkNoun s (s + "s") Neutr ;
? + ? + ? + _ + ? + ? + ? + _ + ("el" | "em" | "en" | "er" | "erd" | "aar" | "aard" | "ie") -- unstressed
("el" | "em" | "en" | "er" | "erd" | "aar" | "aard" | "ie") => -- unstressed => mkNoun s (s + "s") Utr ;
mkNoun s (s + "s") Utr ;
_ + ("i"|"u") => mkNoun s (endCons s + "en") Utr ;
b + v@("aa"|"ee"|"oo"|"uu") + c@? => mkNoun s (b + shortVoc v c + "en") Utr ;
b + ("ei"|"eu"|"oe"|"ou"|"ie"|"ij"|"ui") + ? => mkNoun s (endCons s + "en") Utr ;
_ + ("ie"|"ee") => mkNoun s (s + "ën") Utr ; -- zee→zeeën, knie→knieën. _ + ("ie"|"ee") => mkNoun s (s + "ën") Utr ; -- zee→zeeën, knie→knieën.
-- olie→oliën, industrie→industrieën with 2-arg constructor. -- olie→oliën, industrie→industrieën with 2-arg constructor.
b + v@("a"|"e"|"i"|"o"|"u") + c@? => mkNoun s (b + v + c + c + "en") Utr ; _ + ("i"|"u") => mkNoun s (endCons s + "en") Utr ;
b + v@#vowel + c@#dupCons => mkNoun s (b + v + c + c + "en") Utr ;
b + v@#dupVow + c@? => mkNoun s (b + shortVoc v c + "en") Utr ;
b + #diphthong + ? => mkNoun s (endCons s + "en") Utr ;
_ + "e" => mkNoun s (s + "s") Utr ; -- vrede→vredes. Might not be a good generalisation though. /IL2018 _ + "e" => mkNoun s (s + "s") Utr ; -- vrede→vredes. Might not be a good generalisation though. /IL2018
_ => mkNoun s (endCons s + "en") Utr _ => mkNoun s (endCons s + "en") Utr
} ; } ;
@@ -62,7 +68,6 @@ resource ResDut = ParamX ** open Prelude, Predef in {
_ => s _ => s
} ; } ;
dupCons : pattern Str = #("b"|"d"|"f"|"g"|"k"|"l"|"m"|"n"|"p"|"r"|"s"|"t") ;
add_s : Str -> Str = \s -> case s of { add_s : Str -> Str = \s -> case s of {
_ + "s" => s ; _ + "s" => s ;
@@ -99,12 +104,13 @@ resource ResDut = ParamX ** open Prelude, Predef in {
regAdjective : Str -> Adjective = \s -> regAdjective : Str -> Adjective = \s ->
let let
se : Str = case s of { se : Str = case s of {
_ + ("er"|"en"|"ig") => s + "e" ; --- for unstressed adjective suffixes _ + ("er"|"en"|"ig") => s + "e" ; --- for unstressed adjective suffixes
_ + ("i"|"u"|"ij") => endCons s + "e" ; _ + ("i"|"u"|"ij") => endCons s + "e" ; -- ambigu-ambigue
b + v@("aa"|"ee"|"oo"|"uu") + c@? => b + shortVoc v c + "e" ; _ + ("a"|"e"|"o") => s ; -- no e: lila-lila ; beige-beige ; indigo-indigo
b + ("ei"|"eu"|"oe"|"ou"|"ie"|"ij"|"ui") + ? => endCons s + "e" ;
b + v@("a"|"e"|"i"|"o"|"u" ) + "w" => s + "e" ; -- to prevent *blauwwe -- does this happen to other end consonants? b + v@#dupVow + c@? => b + shortVoc v c + "e" ;
b + v@("a"|"e"|"i"|"o"|"u" ) + c@? => b + v + c + c + "e" ; b + #diphthong + ? => endCons s + "e" ;
b + v@#vowel + c@dupCons => b + v + c + c + "e" ;
_ => endCons s + "e" _ => endCons s + "e"
} ; } ;
in reg2Adjective s se ; in reg2Adjective s se ;
@@ -215,8 +221,6 @@ param
_ => d_regVerb vergeten vergeet _ => d_regVerb vergeten vergeet
}; };
consonant : pattern Str = #("b"|"c"|"d"|"f"|"g"|"h"|"j"|"k"|"l"|"m"|"n"|"p"|"q"|"r"|"s"|"t"|"v"|"w"|"x"|"y"|"z") ;
vowel : pattern Str = #("a"|"e"|"i"|"o"|"u") ;
-- To make a stem out of a verb -- To make a stem out of a verb
-- If a stem ends in a 'v' then the 'v' changes into a 'f' -- If a stem ends in a 'v' then the 'v' changes into a 'f'
-- If a stem ends in a 'z' then the 'z' changes into an 's' -- If a stem ends in a 'z' then the 'z' changes into an 's'
@@ -243,7 +247,7 @@ param
-- Penultimate is vowel, but it doesn't double: either because -- Penultimate is vowel, but it doesn't double: either because
_+ #vowel + _ + #vowel + #consonant => kerf ; -- a) ≥2 syllables, e.g. ademen, rekenen, schakelen _+ #vowel + _ + #vowel + #consonant => kerf ; -- a) ≥2 syllables, e.g. ademen, rekenen, schakelen
-- b) diphthong, e.g. vriezen (ij + #consonant falls into the default case!) -- b) diphthong, e.g. vriezen (ij + #consonant falls into the default case!)
-- OBS. will do the wrong thing, if you use it on prefix verbs -- NB. this will do the wrong thing, if you use it on prefix verbs
_ + #vowel + ("w"|"j") => werk ; -- Don't double a vowel before a w or j (are there other consonants?) _ + #vowel + ("w"|"j") => werk ; -- Don't double a vowel before a w or j (are there other consonants?)

View File

@@ -199,9 +199,9 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
rc = (np.rc ++ embedInCommas (rs.s ! RGenNum (gennum (genderAgr np.a) (numberAgr np.a)))) ; rc = (np.rc ++ embedInCommas (rs.s ! RGenNum (gennum (genderAgr np.a) (numberAgr np.a)))) ;
isPron = False } ; isPron = False } ;
SentCN cn s = cn ** {ext = embedInCommas s.s} ; SentCN cn s = cn ** {ext = cn.ext ++ embedInCommas s.s} ;
AdvCN cn a = cn ** {adv = a.s} ; AdvCN cn a = cn ** {adv = cn.adv ++ a.s} ;
ApposCN cn np = let g = cn.g in cn ** { ApposCN cn np = let g = cn.g in cn ** {
s = \\a,n,c => cn.s ! a ! n ! c ++ np.s ! NPC c ++ bigNP np } ; s = \\a,n,c => cn.s ! a ! n ! c ++ np.s ! NPC c ++ bigNP np } ;

View File

@@ -1,7 +1,7 @@
--# -path=.:../abstract --# -path=.:../abstract
concrete ExtensionsDut of Extensions = concrete ExtensionsDut of Extensions =
CatDut ** open MorphoDut, ResDut, ParadigmsDut, SyntaxDut, (E = ExtraDut), (G = GrammarDut), Prelude in { CatDut ** open ResDut, ParadigmsDut, SyntaxDut, (E = ExtraDut), ExtendDut, (G = GrammarDut), Prelude in {
flags literal=Symb ; coding = utf8 ; flags literal=Symb ; coding = utf8 ;
@@ -70,14 +70,13 @@ lin
} ; } ;
CompoundAP noun adj = { CompoundAP noun adj = {
s = \\af => glue (noun.s ! NF Sg Nom) (adj.s ! Posit ! af) ; s = \\agr,af => glue (noun.s ! NF Sg Nom) (adj.s ! Posit ! af) ;
isPre = True isPre = True
} ; } ;
GerundNP vp = { -- infinitive: Bier zu trinken GerundNP vp = heavyNP { -- infinitive: Bier zu trinken
s = \\c => useInfVP False vp ; s = \\c => useInfVP False vp ! agrP3 Sg ;
a = agrP3 Sg ; a = agrP3 Sg
isPron = False
} ; } ;
GerundAdv vp = { -- Bier trinkend GerundAdv vp = { -- Bier trinkend
@@ -85,33 +84,31 @@ lin
} ; } ;
WithoutVP vp = { -- ohne Bier zu trinken WithoutVP vp = { -- ohne Bier zu trinken
s = "zonder" ++ useInfVP False vp s = "zonder" ++ useInfVP False vp ! agrP3 Sg
} ; } ;
InOrderToVP vp = { -- um Bier zu trinken InOrderToVP vp = { -- um Bier zu trinken
s = "om" ++ useInfVP False vp s = "om" ++ useInfVP False vp ! agrP3 Sg
} ; } ;
ByVP vp = { ---- durch Bier zu drinken ByVP vp = { ---- durch Bier zu drinken
s = "door" ++ useInfVP False vp ---- s = "door" ++ useInfVP False vp ! agrP3 Sg ----
} ; } ;
PresPartAP vp = { PastPartAP = ExtendDut.PastPartAP ;
s = \\af => vp.n0 ! agrP3 Sg ++ vp.n2 ! agrP3 Sg ++ vp.a2 ++ vp.a1 ! Pos ++ vp.inf.p1 ++ vp.ext ++ vp.s.s ! VPresPart ;
isPre = True
} ;
PastPartAP vp = { PresPartAP vp = { --# notpresent
s = \\af => vp.n0 ! agrP3 Sg ++ vp.n2 ! agrP3 Sg ++ vp.a2 ++ vp.a1 ! Pos ++ vp.inf.p1 ++ vp.ext ++ vp.s.s ! VPerf ; ---- agr inflection? s = \\agr,af => let aForm = case vp.isHeavy of { --# notpresent
isPre = True True => APred ; --# notpresent
} ; False => af } ; --# notpresent
in (infClause [] agr vp aForm).s ! Pres ! Simul ! Pos ! Sub ; --# notpresent
isPre = notB vp.isHeavy ; --# notpresent
} ; --# notpresent
PastPartAgentAP vp np = PastPartAgentAP vp np =
let agent = (SyntaxDut.mkAdv (mkPrep "door") (lin NP np)).s let agent = (SyntaxDut.mkAdv (mkPrep "door") (lin NP np)).s ;
in { ap = ExtendDut.PastPartAP vp ;
s = \\af => vp.n0 ! agrP3 Sg ++ vp.n2 ! agrP3 Sg ++ vp.a2 ++ vp.a1 ! Pos ++ vp.inf.p1 ++ vp.ext ++ vp.s.s ! VPerf ; ---- agr inflection? in ap ** { s = \\agr,af => ap.s ! agr ! af ++ agent } ;
isPre = True
} ;
{- {-
@@ -139,16 +136,15 @@ lin
} ; } ;
-} -}
CompS s = {s = \\_ => "dat" ++ s.s ! Main} ; -- S -> Comp CompS s = {s = \\_ => "dat" ++ s.s ! Main} ; -- S -> Comp
CompVP ant p vp = {s = \\_ => useInfVP True vp} ; -- VP -> Comp CompVP ant p vp = {s = useInfVP True vp} ; -- VP -> Comp
lin lin
that_RP = which_RP ; that_RP = which_RP ;
UttAdV adv = adv ; UttAdV adv = adv ;
ApposNP np1 np2 = { ApposNP np1 np2 = np1 ** {
s = \\c => np1.s ! c ++ SOFT_BIND ++ "," ++ np2.s ! NPNom ; s = \\c => np1.s ! c ++ SOFT_BIND ++ "," ++ np2.s ! NPNom ;
a = np1.a ;
isPron = False isPron = False
} ; } ;

View File

@@ -30,7 +30,7 @@ concrete TranslateDut of Translate =
, WithoutVP, InOrderToVP, ByVP , WithoutVP, InOrderToVP, ByVP
], ],
DictionaryDut ** DictionaryDut **
open MorphoDut, ResDut, ParadigmsDut, SyntaxDut, (E = ExtraDut), Prelude in { open ResDut, ParadigmsDut, SyntaxDut, (E = ExtendDut), Prelude in {
flags flags
literal=Symb ; literal=Symb ;