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

View File

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