forked from GitHub/gf-rgl
(Dut) Fixes in DetQuant*
* Fix the classic "a 1 house" bug (was handled in DetQuant but still present in DetQuantOrd) * In DetQuantOrd, choose quant.s for both s and sp, to prevent "*yours 5 youngest"
This commit is contained in:
@@ -9,22 +9,17 @@ concrete NounDut of Noun = CatDut ** open ResDut, Prelude in {
|
|||||||
isPron = False ;
|
isPron = False ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
DetNP det = {
|
DetNP det = det ** {
|
||||||
s = \\_ => det.sp ! Neutr ;
|
s = \\_ => det.sp ! Neutr ;
|
||||||
a = agrP3 det.n ;
|
a = agrP3 det.n ;
|
||||||
isPron = False ;
|
isPron = False
|
||||||
mergesWithPrep = det.mergesWithPrep ;
|
|
||||||
mergeForm = det.mergeForm
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UsePN pn = noMerge ** {s = pn.s ; a = agrP3 Sg ; isPron = False} ;
|
UsePN pn = noMerge ** {s = pn.s ; a = agrP3 Sg ; isPron = False} ;
|
||||||
|
|
||||||
UsePron pron = {
|
UsePron pron = pron ** {
|
||||||
s = table {NPNom => pron.stressed.nom ; NPAcc => pron.stressed.acc} ;
|
s = table {NPNom => pron.stressed.nom ; NPAcc => pron.stressed.acc} ;
|
||||||
a = pron.a ;
|
|
||||||
isPron = True ;
|
isPron = True ;
|
||||||
mergesWithPrep = pron.mergesWithPrep ;
|
|
||||||
mergeForm = pron.mergeForm
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
PredetNP pred np = heavyNP {
|
PredetNP pred np = heavyNP {
|
||||||
@@ -50,33 +45,30 @@ concrete NounDut of Noun = CatDut ** open ResDut, Prelude in {
|
|||||||
|
|
||||||
DetQuantOrd quant num ord =
|
DetQuantOrd quant num ord =
|
||||||
let
|
let
|
||||||
n = num.n ;
|
detQuant = DetQuant quant num ;
|
||||||
a = quant.a
|
af : Gender -> AForm = \g -> agrAdj g quant.a (NF num.n Nom) ;
|
||||||
in {
|
in detQuant ** {
|
||||||
s = \\g => quant.s ! num.isNum ! n ! g ++
|
-- When combined with an ord, don't use the sp form of the quant.
|
||||||
num.s ++ ord.s ! agrAdj g quant.a (NF n Nom) ;
|
-- Works the same way in English:
|
||||||
sp = \\g => quant.sp ! n ! g ++
|
-- e.g. s="your", sp="yours" -> s,sp="your youngest", not sp="*yours youngest"
|
||||||
num.s ++ ord.s ! agrAdj g quant.a (NF n Nom) ;
|
s,sp = \\g => detQuant.s ! g ++ ord.s ! af g ;
|
||||||
n = n ;
|
|
||||||
a = a ;
|
-- Even if the original quant merges; when you add an ord, it doesn't.
|
||||||
mergesWithPrep = quant.mergesWithPrep ;
|
mergesWithPrep = False
|
||||||
mergeForm = quant.mergeForm
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
DetQuant quant num =
|
DetQuant quant num =
|
||||||
let
|
let
|
||||||
n = num.n ;
|
n = num.n ;
|
||||||
a = quant.a
|
a = quant.a
|
||||||
in {
|
in quant ** {
|
||||||
s = \\g => quant.s ! num.isNum ! n ! g ++ num.s ;
|
s = \\g => quant.s ! num.isNum ! n ! g ++ num.s ;
|
||||||
sp = \\g => case num.isNum of {
|
sp = \\g => case num.isNum of {
|
||||||
False => quant.sp ! n ! g ++ num.s ;
|
False => quant.sp ! n ! g ++ num.s ;
|
||||||
True => quant.s ! True ! n ! g ++ num.s
|
True => quant.s ! True ! n ! g ++ num.s -- to prevent "een 5 …"
|
||||||
} ;
|
} ;
|
||||||
n = n ;
|
n = n ;
|
||||||
a = a ;
|
a = a ;
|
||||||
mergesWithPrep = quant.mergesWithPrep ;
|
|
||||||
mergeForm = quant.mergeForm
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
PossPron p = noMerge ** {
|
PossPron p = noMerge ** {
|
||||||
|
|||||||
Reference in New Issue
Block a user