(Dut) fix a bug with various NP-modifying functions; the NP now loses its old mergeForm and becomes a heavy NP

This commit is contained in:
Inari Listenmaa
2018-02-22 14:36:29 +01:00
parent 0b5b14d053
commit 23f27a9dab
2 changed files with 12 additions and 15 deletions

View File

@@ -27,23 +27,23 @@ concrete NounDut of Noun = CatDut ** open ResDut, Prelude in {
mergeForm = pron.mergeForm
} ;
PredetNP pred np = np ** heavyNP {
PredetNP pred np = heavyNP {
s = \\c =>
pred.s ! np.a.n ! np.a.g ++ np.s ! c ; ---- g
a = np.a
} ;
PPartNP np v2 = np ** heavyNP {
PPartNP np v2 = heavyNP {
s = \\c => np.s ! c ++ v2.s ! VPerf ; -- invar part
a = np.a ;
} ;
AdvNP np adv = np ** heavyNP {
AdvNP np adv = heavyNP {
s = \\c => np.s ! c ++ adv.s ;
a = np.a
} ;
ExtAdvNP np adv = np ** heavyNP {
ExtAdvNP np adv = heavyNP {
s = \\c => np.s ! c ++ embedInCommas adv.s ;
a = np.a
} ;
@@ -173,10 +173,9 @@ concrete NounDut of Noun = CatDut ** open ResDut, Prelude in {
g = cn.g
} ;
RelNP np rs = np ** {
RelNP np rs = heavyNP {
s = \\c => np.s ! c ++ "," ++ rs.s ! np.a.g ! np.a.n ;
a = np.a ;
isPron = False
a = np.a
} ;
SentCN cn s = {

View File

@@ -744,16 +744,14 @@ param
} ;
NounPhrase : Type = MergesWithPrep ** {s : NPCase => Str ; a : Agr ; isPron : Bool } ;
mkNP : Str -> Gender -> Number -> NounPhrase =
\s,g,n -> noMerge ** heavyNP {
s = \\_ => s ;
a = agrgP3 g n ;
} ;
\s,g,n -> heavyNP { s = \\_ => s ;
a = agrgP3 g n } ;
auxVV : VVerb -> VVerb ** {isAux : Bool} = \v -> v ** {isAux = True} ;
heavyNP :
{s : NPCase => Str ; a : Agr} -> {s : NPCase => Str ; a : Agr ; isPron : Bool} = \np ->
np ** {isPron = False ; mergesWithPrep = False ; mergeForm = [] } ;
heavyNP : {s : NPCase => Str ; a : Agr} -> NounPhrase = \np ->
noMerge ** { isPron = False ; s = np.s ; a = np.a } ;
}