forked from GitHub/gf-core
refactoring German VP
This commit is contained in:
@@ -123,7 +123,7 @@ flags startcat = Text ;
|
||||
fun
|
||||
TextS : S -> Text ; -- with .
|
||||
TextQS : QS -> Text ; -- with ?
|
||||
TextImp : VP -> Text ; -- with !
|
||||
-- TextImp : VP -> Text ; -- with !
|
||||
|
||||
ComplV2 : V2 -> NP -> VP ;
|
||||
ModCN : AP -> CN -> CN ;
|
||||
|
||||
@@ -3774,7 +3774,7 @@ source <A HREF="http://www.grammaticalframework.org/lib/src/afrikaans/ParadigmsA
|
||||
<TR>
|
||||
<TD><CODE>mkN</CODE></TD>
|
||||
<TD><CODE>(muis</CODE> <CODE>:</CODE> <CODE>Str)</CODE> <CODE>-></CODE> <A HREF="#N" TITLE="N - common noun">N</A></TD>
|
||||
<TD><I>de muis-muisen, with some predictable exceptions</I></TD>
|
||||
<TD><I>de muis, muisen, with some predictable exceptions</I></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkN</CODE></TD>
|
||||
@@ -5326,7 +5326,7 @@ source <A HREF="http://www.grammaticalframework.org/lib/src/dutch/ParadigmsDut.g
|
||||
<TR>
|
||||
<TD><CODE>mkN</CODE></TD>
|
||||
<TD><CODE>(muis</CODE> <CODE>:</CODE> <CODE>Str)</CODE> <CODE>-></CODE> <A HREF="#N" TITLE="N - common noun">N</A></TD>
|
||||
<TD><I>de muis-muisen, with some predictable exceptions</I></TD>
|
||||
<TD><I>de muis-muizen, with some predictable exceptions</I></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><CODE>mkN</CODE></TD>
|
||||
|
||||
@@ -38,7 +38,7 @@ concrete CatGer of Cat =
|
||||
-- Verb
|
||||
|
||||
VP = ResGer.VP ;
|
||||
VPSlash = ResGer.VP ** {c2 : Preposition} ;
|
||||
VPSlash = ResGer.VPSlash ;
|
||||
Comp = {s : Agr => Str} ;
|
||||
|
||||
-- Adjective
|
||||
|
||||
@@ -84,8 +84,8 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||
subj = [] ;
|
||||
verb = vps.s ! ord ! agr ! VPFinite m t a ;
|
||||
neg = vp.a1 ! b ;
|
||||
obj0 = vp.n0 ! agr ;
|
||||
obj = vp.n2 ! agr ;
|
||||
obj0 = (vp.nn ! agr).p1 ;
|
||||
obj = (vp.nn ! agr).p2 ;
|
||||
compl = obj0 ++ neg ++ obj ++ vp.a2 ; -- from EG 15/5
|
||||
inf = vp.inf ++ verb.inf ;
|
||||
extra = vp.ext ;
|
||||
|
||||
@@ -438,12 +438,11 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
|
||||
VP : Type = {
|
||||
s : Verb ;
|
||||
a1 : Polarity => Str ; -- nicht
|
||||
n0 : Agr => Str ; -- dich
|
||||
n2 : Agr => Str ; -- deine Frau
|
||||
a2 : Str ; -- heute
|
||||
isAux : Bool ; -- is a double infinitive
|
||||
inf : Str ; -- sagen
|
||||
a1 : Polarity => Str ; -- nicht
|
||||
nn : Agr => Str * Str ; -- dich/deine Frau
|
||||
a2 : Str ; -- heute
|
||||
isAux : Bool ; -- is a double infinitive
|
||||
inf : Str ; -- sagen
|
||||
ext : Str ; -- dass sie kommt
|
||||
infExt : Str
|
||||
} ;
|
||||
@@ -514,11 +513,10 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
} ;
|
||||
|
||||
a1 : Polarity => Str = negation ;
|
||||
n0 : Agr => Str = case verb.vtype of {
|
||||
VAct => \\_ => [] ;
|
||||
VRefl c => \\a => reflPron ! a ! c
|
||||
nn : Agr => Str * Str = case verb.vtype of {
|
||||
VAct => \\_ => <[],[]> ;
|
||||
VRefl c => \\a => <reflPron ! a ! c,[]>
|
||||
} ;
|
||||
n2 : Agr => Str = \\_ => [] ;
|
||||
a2 : Str = [] ;
|
||||
isAux = isAux ; ----
|
||||
inf,ext,infExt : Str = []
|
||||
@@ -580,6 +578,8 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
Neg => "nicht"
|
||||
} ;
|
||||
|
||||
VPSlash = VP ** {c2 : Preposition} ;
|
||||
|
||||
-- Extending a verb phrase with new constituents.
|
||||
|
||||
insertObj : (Agr => Str) -> VP -> VP = insertObjNP False ;
|
||||
@@ -587,8 +587,12 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
insertObjNP : Bool -> (Agr => Str) -> VP -> VP = \isPron, obj,vp -> {
|
||||
s = vp.s ;
|
||||
a1 = vp.a1 ;
|
||||
n0 = \\a => case isPron of {True => obj ! a ; _ => []} ++ vp.n0 ! a ;
|
||||
n2 = \\a => case isPron of {False => obj ! a ; _ => []} ++ vp.n2 ! a ;
|
||||
nn = \\a =>
|
||||
let vpnn = vp.nn ! a in
|
||||
case isPron of {
|
||||
True => <obj ! a ++ vpnn.p1, vpnn.p2> ;
|
||||
False => < vpnn.p1, obj ! a ++ vpnn.p2>
|
||||
} ;
|
||||
a2 = vp.a2 ;
|
||||
isAux = vp.isAux ;
|
||||
inf = vp.inf ;
|
||||
@@ -599,8 +603,7 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
insertAdV : Str -> VP -> VP = \adv,vp -> {
|
||||
s = vp.s ;
|
||||
a1 = \\a => adv ++ vp.a1 ! a ; -- immer nicht
|
||||
n0 = vp.n0 ;
|
||||
n2 = vp.n2 ;
|
||||
nn = vp.nn ;
|
||||
a2 = vp.a2 ;
|
||||
isAux = vp.isAux ;
|
||||
inf = vp.inf ;
|
||||
@@ -611,8 +614,7 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
insertAdv : Str -> VP -> VP = \adv,vp -> {
|
||||
s = vp.s ;
|
||||
a1 = vp.a1 ;
|
||||
n0 = vp.n0 ;
|
||||
n2 = vp.n2 ;
|
||||
nn = vp.nn ;
|
||||
a2 = vp.a2 ++ adv ;
|
||||
isAux = vp.isAux ;
|
||||
inf = vp.inf ;
|
||||
@@ -623,8 +625,7 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
insertExtrapos : Str -> VP -> VP = \ext,vp -> {
|
||||
s = vp.s ;
|
||||
a1 = vp.a1 ;
|
||||
n0 = vp.n0 ;
|
||||
n2 = vp.n2 ;
|
||||
nn = vp.nn ;
|
||||
a2 = vp.a2 ;
|
||||
isAux = vp.isAux ;
|
||||
inf = vp.inf ;
|
||||
@@ -635,8 +636,7 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
insertInfExt : Str -> VP -> VP = \infExt,vp -> {
|
||||
s = vp.s ;
|
||||
a1 = vp.a1 ;
|
||||
n0 = vp.n0 ;
|
||||
n2 = vp.n2 ;
|
||||
nn = vp.nn ;
|
||||
a2 = vp.a2 ;
|
||||
isAux = vp.isAux ;
|
||||
inf = vp.inf ;
|
||||
@@ -647,8 +647,7 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
insertInf : Str -> VP -> VP = \inf,vp -> {
|
||||
s = vp.s ;
|
||||
a1 = vp.a1 ;
|
||||
n0 = vp.n0 ;
|
||||
n2 = vp.n2 ;
|
||||
nn = vp.nn ;
|
||||
a2 = vp.a2 ;
|
||||
isAux = vp.isAux ; ----
|
||||
inf = inf ++ vp.inf ;
|
||||
@@ -672,8 +671,8 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
} ;
|
||||
verb = vps.s ! ord ! agr ! VPFinite m t a ;
|
||||
neg = vp.a1 ! b ;
|
||||
obj0 = vp.n0 ! agr ;
|
||||
obj = vp.n2 ! agr ;
|
||||
obj0 = (vp.nn ! agr).p1 ;
|
||||
obj = (vp.nn ! agr).p2 ;
|
||||
compl = obj0 ++ neg ++ obj ++ vp.a2 ; -- from EG 15/5
|
||||
inf = vp.inf ++ verb.inf ;
|
||||
extra = vp.ext ;
|
||||
@@ -712,7 +711,7 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
|
||||
infVP : Bool -> VP -> ((Agr => Str) * Str * Str * Str) = \isAux, vp -> let vps = useVP vp in
|
||||
<
|
||||
\\agr => vp.n0 ! agr ++ vp.n2 ! agr ++ vp.a2,
|
||||
\\agr => (vp.nn ! agr).p1 ++ (vp.nn ! agr).p2 ++ vp.a2,
|
||||
vp.a1 ! Pos ++ (vps.s ! (notB isAux) ! agrP3 Sg ! VPInfinit Simul).inf,
|
||||
vp.inf,
|
||||
vp.ext
|
||||
|
||||
@@ -20,7 +20,7 @@ concrete SentenceGer of Sentence = CatGer ** open ResGer, Prelude in {
|
||||
inf = vp.inf ++ verb.inf ;
|
||||
in
|
||||
verb.fin ++ ps.p2 ++
|
||||
vp.n0 ! agr ++ vp.a1 ! pol ++ vp.n2 ! agr ++ vp.a2 ++ inf ++ vp.ext
|
||||
(vp.nn ! agr).p1 ++ vp.a1 ! pol ++ (vp.nn ! agr).p2 ++ vp.a2 ++ inf ++ vp.ext
|
||||
} ;
|
||||
|
||||
SlashVP np vp =
|
||||
|
||||
@@ -14,7 +14,7 @@ The resulting output is converted into an HTML table.
|
||||
The file gfmorpho.html gives some more information. Open issues in addition to those mentioned there are:
|
||||
|
||||
- GFMorpho.hs creates the temporary files _gfcommand.tmp and _gfmorpho.tmp which need to be world-writable; they should be created more properly and removed after use
|
||||
- gfmorpho.cgi defines the variable GF_LIB_PATH to reside in /Users/aarne, and must be edited for other environments
|
||||
- gfmorpho.cgi defines the variable GF_LIB_PATH to reside in /home/aarne, and must be edited for other environments
|
||||
- to work for all languages mentioned, one has to compile some incomplete GF grammars not standardly compiled:
|
||||
|
||||
GF/lib/src$ runghc Make alltenses lang langs=Amh,Ara,Lat,Mlt,Tur
|
||||
|
||||
Reference in New Issue
Block a user