diff --git a/lib/doc/api-examples.txt b/lib/doc/api-examples.txt index 4d615753d..3ab5c7f94 100644 --- a/lib/doc/api-examples.txt +++ b/lib/doc/api-examples.txt @@ -302,6 +302,14 @@ mkUtt youPl_NP mkUtt they_NP mkDet : Quant -> Det -- this mkDet this_Quant + this_NP : NP +mkUtt this_NP + that_NP : NP +mkUtt that_NP + these_NP : NP +mkUtt these_NP + those_NP : NP +mkUtt those_NP mkDet : Quant -> Card -> Det -- these five mkDet this_Quant (mkCard (mkNumeral n5_Unit)) mkDet : Quant -> Ord -> Det -- the best @@ -331,6 +339,14 @@ mkNP thePl_Det house_N mkNP aSg_Det woman_N aPl_Det : Det -- (houses) mkNP aPl_Det woman_N + this_Det : Det +mkNP this_Det woman_N + that_Det : Det +mkNP that_Det woman_N + these_Det : Det +mkNP these_Det woman_N + those_Det : Det +mkNP those_Det woman_N mkQuant : Pron -> Quant -- my mkNP (mkQuant i_Pron) house_N the_Quant : Quant -- the diff --git a/lib/doc/synopsis.html b/lib/doc/synopsis.html index e93749635..ad57e8036 100644 --- a/lib/doc/synopsis.html +++ b/lib/doc/synopsis.html @@ -516,7 +516,7 @@ Lexical category, constructors given in mkAP A -> NP -> AP -
warmer than Paris
+
warmer than Paris
mkAP @@ -531,12 +531,12 @@ Lexical category, constructors given in mkAP AP -> S -> AP -
it is good that she sleeps
+
it is good that she sleeps
mkAP AP -> QS -> AP -
it is uncertain who sleeps
+
it is uncertain who sleeps
mkAP @@ -571,7 +571,7 @@ Lexical category, constructors given in mkAP Ord -> AP -
oldest
+
oldest
mkAP @@ -581,7 +581,7 @@ Lexical category, constructors given in reflAP A2 -> AP -
married to itself
+
married to itself
@@ -646,7 +646,7 @@ Lexical category, constructors given in mkAdN CAdv -> AdN -
more than eight
+
more than eight
@@ -706,7 +706,7 @@ Lexical category, constructors given in mkAdv Subj -> S -> Adv -
when she sleeps
+
when she sleeps
mkAdv @@ -716,7 +716,7 @@ Lexical category, constructors given in mkAdv CAdv -> A -> S -> Adv -
more warmly than he runs
+
more warmly than he runs
mkAdv @@ -766,12 +766,12 @@ Lexical category, constructors given in anteriorAnt Ant -
she has slept
+
she has slept
simultaneousAnt Ant -
she sleeps
+
she sleeps
@@ -856,12 +856,12 @@ Lexical category, constructors given in mkCN N -> RS -> CN -
man whom she loves
+
man whom she loves
mkCN CN -> RS -> CN -
old man whom she loves
+
old man whom she loves
mkCN @@ -946,122 +946,122 @@ Lexical category, constructors given in genericCl VP -> Cl -
one sleeps
+
one sleeps
mkCl NP -> V -> Cl -
she sleeps
+
she sleeps
mkCl NP -> V2 -> NP -> Cl -
she loves him
+
she loves him
mkCl NP -> V3 -> NP -> NP -> Cl -
she sends it to him
+
she sends it to him
mkCl NP -> VV -> VP -> Cl -
she wants to sleep
+
she wants to sleep
mkCl NP -> VS -> S -> Cl -
she says that I sleep
+
she says that I sleep
mkCl NP -> VQ -> QS -> Cl -
she wonders who sleeps
+
she wonders who sleeps
mkCl NP -> VA -> A -> Cl -
she becomes old
+
she becomes old
mkCl NP -> VA -> AP -> Cl -
she becomes very old
+
she becomes very old
mkCl NP -> V2A -> NP -> A -> Cl -
she paints it red
+
she paints it red
mkCl NP -> V2A -> NP -> AP -> Cl -
she paints it red
+
she paints it red
mkCl NP -> V2S -> NP -> S -> Cl -
she answers to him that we sleep
+
she answers to him that we sleep
mkCl NP -> V2Q -> NP -> QS -> Cl -
she asks him who sleeps
+
she asks him who sleeps
mkCl NP -> V2V -> NP -> VP -> Cl -
she begs him to sleep
+
she begs him to sleep
mkCl NP -> A -> Cl -
she is old
+
she is old
mkCl NP -> A -> NP -> Cl -
she is older than he
+
she is older than he
mkCl NP -> A2 -> NP -> Cl -
she is married to him
+
she is married to him
mkCl NP -> AP -> Cl -
she is very old
+
she is very old
mkCl NP -> NP -> Cl -
she is the woman
+
she is the woman
mkCl NP -> N -> Cl -
she is a woman
+
she is a woman
mkCl NP -> CN -> Cl -
she is an old woman
+
she is an old woman
mkCl NP -> Adv -> Cl -
she is here
+
she is here
mkCl NP -> VP -> Cl -
she always sleeps
+
she always sleeps
mkCl N -> Cl -
there is a house
+
there is a house
mkCl @@ -1071,32 +1071,32 @@ Lexical category, constructors given in mkCl NP -> Cl -
there are many houses
+
there are many houses
mkCl NP -> RS -> Cl -
it is she who sleeps
+
it is she who sleeps
mkCl Adv -> S -> Cl -
it is here that she sleeps
+
it is here that she sleeps
mkCl V -> Cl -
it rains
+
it rains
mkCl VP -> Cl -
it is raining
+
it is raining
mkCl SC -> VP -> Cl -
that she sleeps is good
+
that she sleeps is good
@@ -1111,32 +1111,32 @@ Lexical category, constructors given in mkClSlash NP -> VPSlash -> ClSlash -
whom does she see
+
whom does she see
mkClSlash NP -> V2 -> ClSlash -
whom does she see
+
whom does she see
mkClSlash NP -> VV -> V2 -> ClSlash -
whom does she want to see
+
whom does she want to see
mkClSlash Cl -> Prep -> ClSlash -
with whom does she sleep
+
with whom does she sleep
mkClSlash ClSlash -> Adv -> ClSlash -
whom does she see today
+
whom does she see today
mkClSlash NP -> VS -> SSlash -> ClSlash -
whom does she know that we hadn't seen
+
whom does she know that we hadn't seen
@@ -1256,7 +1256,7 @@ Lexical category, constructors given in mkDet Quant -> Num -> Ord -> Det -
the five best
+
the five best
mkDet @@ -1304,6 +1304,11 @@ Lexical category, constructors given in
some
+that_Det +Det +
that woman
+ + thePl_Det Det
the houses
@@ -1318,6 +1323,21 @@ Lexical category, constructors given in Det
the house
+ +these_Det +Det +
these women
+ + +this_Det +Det +
this woman
+ + +those_Det +Det +
those women
+ @@ -1516,7 +1536,7 @@ Lexical category, constructors given in mkIP IDet -> CN -> IP -
which five big cities
+
which five big cities
mkIP @@ -1536,7 +1556,7 @@ Lexical category, constructors given in mkIP IQuant -> Num -> CN -> IP -
which five big cities
+
which five big cities
mkIP @@ -1815,7 +1835,7 @@ Lexical category, constructors given in mkNP Quant -> Num -> CN -> NP -
these five old men
+
these five old men
mkNP @@ -1825,7 +1845,7 @@ Lexical category, constructors given in mkNP Det -> CN -> NP -
the five old men
+
the five old men
mkNP @@ -1835,7 +1855,7 @@ Lexical category, constructors given in mkNP Numeral -> CN -> NP -
fifty old men
+
fifty old men
mkNP @@ -1845,7 +1865,7 @@ Lexical category, constructors given in mkNP Digits -> CN -> NP -
5 1 old men
+
5 1 old men
mkNP @@ -1895,7 +1915,7 @@ Lexical category, constructors given in mkNP Det -> NP -
the five best
+
the five best
mkNP @@ -1925,7 +1945,7 @@ Lexical category, constructors given in mkNP NP -> RS -> NP -
John , who walks
+
John , who walks
mkNP @@ -1963,11 +1983,31 @@ Lexical category, constructors given in
something
+that_NP +NP +
that
+ + +these_NP +NP +
these
+ + they_NP NP
they
+this_NP +NP +
this
+ + +those_NP +NP +
those
+ + we_NP NP
we
@@ -2105,7 +2145,7 @@ Lexical category, constructors given in mkOrd A -> Ord -
smallest
+
smallest
@@ -2161,12 +2201,12 @@ Lexical category, constructors given in mkPhr S -> Phr -
she won't sleep
+
she won't sleep
mkPhr Cl -> Phr -
she sleeps
+
she sleeps
mkPhr @@ -2191,12 +2231,12 @@ Lexical category, constructors given in negativePol Pol -
she doesn't sleep
+
she doesn't sleep
positivePol Pol -
she sleeps
+
she sleeps
@@ -2436,152 +2476,152 @@ Lexical category, constructors given in mkQCl Cl -> QCl -
does she sleep
+
does she sleep
mkQCl IP -> VP -> QCl -
who always sleeps
+
who always sleeps
mkQCl IP -> V -> QCl -
who sleeps
+
who sleeps
mkQCl IP -> V2 -> NP -> QCl -
who loves her
+
who loves her
mkQCl IP -> V3 -> NP -> NP -> QCl -
who sends it to her
+
who sends it to her
mkQCl IP -> VV -> VP -> QCl -
who wants to sleep
+
who wants to sleep
mkQCl IP -> VS -> S -> QCl -
who says that I sleep
+
who says that I sleep
mkQCl IP -> VQ -> QS -> QCl -
who wonders who sleeps
+
who wonders who sleeps
mkQCl IP -> VA -> A -> QCl -
who becomes old
+
who becomes old
mkQCl IP -> VA -> AP -> QCl -
who becomes very old
+
who becomes very old
mkQCl IP -> V2A -> NP -> A -> QCl -
who paints it red
+
who paints it red
mkQCl IP -> V2A -> NP -> AP -> QCl -
who paints it very red
+
who paints it very red
mkQCl IP -> V2S -> NP -> S -> QCl -
who answers to him that we sleep
+
who answers to him that we sleep
mkQCl IP -> V2Q -> NP -> QS -> QCl -
who asks him who sleeps
+
who asks him who sleeps
mkQCl IP -> V2V -> NP -> VP -> QCl -
who begs him to sleep
+
who begs him to sleep
mkQCl IP -> A -> QCl -
who is old
+
who is old
mkQCl IP -> A -> NP -> QCl -
who is older than he
+
who is older than he
mkQCl IP -> A2 -> NP -> QCl -
who is married to him
+
who is married to him
mkQCl IP -> AP -> QCl -
who is very old
+
who is very old
mkQCl IP -> NP -> QCl -
who is the woman
+
who is the woman
mkQCl IP -> N -> QCl -
who is a woman
+
who is a woman
mkQCl IP -> CN -> QCl -
who is an old woman
+
who is an old woman
mkQCl IP -> Adv -> QCl -
who is here
+
who is here
mkQCl IP -> NP -> V2 -> QCl -
who is her
+
who is her
mkQCl IP -> ClSlash -> QCl -
whom does she love today
+
whom does she love today
mkQCl IAdv -> Cl -> QCl -
why does she sleep
+
why does she sleep
mkQCl Prep -> IP -> Cl -> QCl -
with whom does she sleep
+
with whom does she sleep
mkQCl IAdv -> NP -> QCl -
where is she
+
where is she
mkQCl IComp -> NP -> QCl -
who is this man
+
who is this man
mkQCl IP -> QCl -
which city is there
+
which city is there
@@ -2596,12 +2636,12 @@ Lexical category, constructors given in mkQS (Tense) -> (Ant) -> (Pol) -> QCl -> QS -
who wouldn't have slept
+
who wouldn't have slept
mkQS Cl -> QS -
does she sleep
+
does she sleep
@@ -2656,122 +2696,122 @@ Lexical category, constructors given in mkRCl RP -> VP -> RCl -
woman who always sleeps
+
woman who always sleeps
mkRCl RP -> V -> RCl -
woman who sleeps
+
woman who sleeps
mkRCl RP -> V2 -> NP -> RCl -
woman who loves him
+
woman who loves him
mkRCl RP -> V3 -> NP -> NP -> RCl -
woman who sends it to him
+
woman who sends it to him
mkRCl RP -> VV -> VP -> RCl -
woman who wants to sleep
+
woman who wants to sleep
mkRCl RP -> VS -> S -> RCl -
woman who says that I sleep
+
woman who says that I sleep
mkRCl RP -> VQ -> QS -> RCl -
woman who wonders who sleeps
+
woman who wonders who sleeps
mkRCl RP -> VA -> A -> RCl -
woman who becomes old
+
woman who becomes old
mkRCl RP -> VA -> AP -> RCl -
woman who becomes very old
+
woman who becomes very old
mkRCl RP -> V2A -> NP -> A -> RCl -
woman who paints it red
+
woman who paints it red
mkRCl RP -> V2A -> NP -> AP -> RCl -
woman who paints it very red
+
woman who paints it very red
mkRCl RP -> V2S -> NP -> S -> RCl -
woman who answers to him that we sleep
+
woman who answers to him that we sleep
mkRCl RP -> V2Q -> NP -> QS -> RCl -
woman who asks him who sleeps
+
woman who asks him who sleeps
mkRCl RP -> V2V -> NP -> VP -> RCl -
woman who begs him to sleep
+
woman who begs him to sleep
mkRCl RP -> A -> RCl -
woman who is old
+
woman who is old
mkRCl RP -> A -> NP -> RCl -
woman who is older than he
+
woman who is older than he
mkRCl RP -> A2 -> NP -> RCl -
woman who is married to him
+
woman who is married to him
mkRCl RP -> AP -> RCl -
woman who is very old
+
woman who is very old
mkRCl RP -> NP -> RCl -
woman who is the woman
+
woman who is the woman
mkRCl RP -> N -> RCl -
student who is a woman
+
student who is a woman
mkRCl RP -> CN -> RCl -
student who is an old woman
+
student who is an old woman
mkRCl RP -> Adv -> RCl -
woman who is here
+
woman who is here
mkRCl RP -> NP -> V2 -> RCl -
woman whom we love
+
woman whom we love
mkRCl RP -> ClSlash -> RCl -
woman whom she loves today
+
woman whom she loves today
mkRCl @@ -2791,7 +2831,7 @@ Lexical category, constructors given in mkRP Prep -> NP -> RP -> RP -
all the cities in whom
+
all the cities in whom
which_RP @@ -2811,12 +2851,12 @@ Lexical category, constructors given in mkRS (Tense) -> (Ant) -> (Pol) -> RCl -> RS -
woman who wouldn't have slept
+
woman who wouldn't have slept
mkRS Conj -> RS -> RS -> RS -
woman who sleeps or whom we love
+
woman who sleeps or whom we love
mkRS @@ -2841,17 +2881,17 @@ Lexical category, constructors given in mkS Conj -> S -> S -> S -
she sleeps and I run
+
she sleeps and I run
mkS Conj -> ListS -> S -
she sleeps , I run and you walk
+
she sleeps , I run and you walk
mkS Adv -> S -> S -
today , she sleeps
+
today , she sleeps
@@ -2866,12 +2906,12 @@ Lexical category, constructors given in mkSC S -> SC -
that she sleeps
+
that she sleeps
mkSC QS -> SC -
who sleeps
+
who sleeps
mkSC @@ -2891,7 +2931,7 @@ Lexical category, constructors given in mkSSlash Temp -> Pol -> ClSlash -> SSlash -
she hadn't seen
+
she hadn't seen
@@ -2956,27 +2996,27 @@ Lexical category, constructors given in although_Subj Subj -
although she sleeps
+
although she sleeps
because_Subj Subj -
because she sleeps
+
because she sleeps
if_Subj Subj -
if she sleeps
+
if she sleeps
that_Subj Subj -
that she sleeps
+
that she sleeps
when_Subj Subj -
when she sleeps
+
when she sleeps
@@ -3011,7 +3051,7 @@ Lexical category, constructors given in futureTense Tense -
she will sleep
+
she will sleep
pastTense @@ -3021,7 +3061,7 @@ Lexical category, constructors given in presentTense Tense -
she sleeps
+
she sleeps
@@ -3041,7 +3081,7 @@ Lexical category, constructors given in mkText Phr -> (Punct) -> (Text) -> Text -
does she sleep ? yes .
+
does she sleep ? yes .
mkText @@ -3056,7 +3096,7 @@ Lexical category, constructors given in mkText Cl -> Text -
she sleeps .
+
she sleeps .
mkText @@ -3066,7 +3106,7 @@ Lexical category, constructors given in mkText (Pol) -> Imp -> Text -
don't sleep !
+
don't sleep !
mkText @@ -3141,7 +3181,7 @@ Lexical category, constructors given in lets_Utt VP -> Utt -
let's sleep
+
let's sleep
mkUtt @@ -3151,7 +3191,7 @@ Lexical category, constructors given in mkUtt Cl -> Utt -
she sleeps
+
she sleeps
mkUtt @@ -3161,12 +3201,12 @@ Lexical category, constructors given in mkUtt QCl -> Utt -
who sleeps
+
who sleeps
mkUtt (ImpForm) -> (Pol) -> Imp -> Utt -
don't be men
+
don't be men
mkUtt @@ -3308,12 +3348,12 @@ Lexical category, constructors given in mkVP VS -> S -> VP -
to know that she sleeps
+
to know that she sleeps
mkVP VQ -> QS -> VP -
to wonder who sleeps
+
to wonder who sleeps
mkVP @@ -3323,22 +3363,22 @@ Lexical category, constructors given in mkVP V2A -> NP -> AP -> VP -
to paint it red
+
to paint it red
mkVP V2S -> NP -> S -> VP -
to answer to him that she sleeps
+
to answer to him that she sleeps
mkVP V2Q -> NP -> QS -> VP -
to ask him who sleeps
+
to ask him who sleeps
mkVP V2V -> NP -> VP -> VP -
to beg him to sleep
+
to beg him to sleep
mkVP @@ -3348,7 +3388,7 @@ Lexical category, constructors given in mkVP A -> NP -> VP -
to be older than he
+
to be older than he
mkVP @@ -3368,7 +3408,7 @@ Lexical category, constructors given in mkVP CN -> VP -
to be an old woman
+
to be an old woman
mkVP @@ -3393,12 +3433,12 @@ Lexical category, constructors given in mkVP VPSlash -> NP -> VP -
to paint it black
+
to paint it black
mkVP VPSlash -> VP -
to paint itself black
+
to paint itself black
mkVP @@ -3423,7 +3463,7 @@ Lexical category, constructors given in reflexiveVP V2 -> VP -
to love itself
+
to love itself
reflexiveVP @@ -3443,17 +3483,17 @@ Lexical category, constructors given in mkVPSlash V2 -> VPSlash -
whom does she see
+
whom does she see
mkVPSlash V3 -> NP -> VPSlash -
to whom does she send it
+
to whom does she send it
mkVPSlash V2A -> AP -> VPSlash -
whom does she paint red
+
whom does she paint red
mkVPSlash @@ -3463,22 +3503,22 @@ Lexical category, constructors given in mkVPSlash V2S -> S -> VPSlash -
to whom does she answer that I sleep
+
to whom does she answer that I sleep
mkVPSlash V2V -> VP -> VPSlash -
whom does she beg to sleep
+
whom does she beg to sleep
mkVPSlash VV -> VPSlash -> VPSlash -
whom does she want to see
+
whom does she want to see
mkVPSlash V2V -> NP -> VPSlash -> VPSlash -
whom does she beg me to see
+
whom does she beg me to see
@@ -3505,12 +3545,12 @@ Lexical category, constructors given in can8know_VV VV -
to be able to sleep
+
to be able to sleep
can_VV VV -
to be able to sleep
+
to be able to sleep
must_VV diff --git a/lib/src/api/Constructors.gf b/lib/src/api/Constructors.gf index 33710247d..719f94165 100644 --- a/lib/src/api/Constructors.gf +++ b/lib/src/api/Constructors.gf @@ -684,6 +684,15 @@ incomplete resource Constructors = open Grammar in { --% they_NP : NP -- they = mkNP they_Pron ; + this_NP : NP -- this + = DetNP (DetQuant this_Quant sgNum) ; --% + that_NP : NP -- that + = DetNP (DetQuant that_Quant sgNum) ; --% + these_NP : NP + = DetNP (DetQuant this_Quant plNum) ; --% + those_NP : NP + = DetNP (DetQuant that_Quant plNum) ; --% + --3 Det, determiners @@ -734,6 +743,15 @@ incomplete resource Constructors = open Grammar in { --% = DetQuant IndefArt NumSg ; --% aPl_Det : Det -- (houses) = DetQuant IndefArt NumPl ; --% + this_Det : Det + = (DetQuant this_Quant sgNum) ; --% + that_Det : Det + = (DetQuant that_Quant sgNum) ; --% + these_Det : Det + = (DetQuant this_Quant plNum) ; --% + those_Det : Det + = (DetQuant that_Quant plNum) ; --% + --3 Quant, quantifiers @@ -1593,16 +1611,6 @@ incomplete resource Constructors = open Grammar in { --% ComplV2A : V2A -> NP -> AP -> VP = \v,np,ap -> ComplSlash (SlashV2A v ap) np ; ComplV3 : V3 -> NP -> NP -> VP = \v,o,d -> ComplSlash (Slash3V3 v d) o ; - that_NP : NP = DetNP (DetQuant that_Quant sgNum) ; - this_NP : NP = DetNP (DetQuant this_Quant sgNum) ; - those_NP : NP = DetNP (DetQuant that_Quant plNum) ; - these_NP : NP = DetNP (DetQuant this_Quant plNum) ; - - that_Det : Det = (DetQuant that_Quant sgNum) ; - this_Det : Det = (DetQuant this_Quant sgNum) ; - those_Det : Det = (DetQuant that_Quant plNum) ; - these_Det : Det = (DetQuant this_Quant plNum) ; - -- new things