Skip to content

Commit 7541d02

Browse files
committed
Do not allow there is every-/no-
This greately improves precision.
1 parent 0dae584 commit 7541d02

File tree

3 files changed

+29
-19
lines changed

3 files changed

+29
-19
lines changed

grammars/acewiki_aceowl/Attempto.gf

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ cat A ;
1313
cat A2 ;
1414
cat AP ;
1515
cat RS ;
16-
cat Pron ; cat IndefPron ;
16+
cat Pron ; IndefPron ; IndefTherePron ;
1717
cat Prep ;
1818
cat S ; cat SimpleS ;
1919
cat VP ;
@@ -44,22 +44,23 @@ fun everyNP : VarCN -> NP ;
4444

4545
fun pnNP : PN -> NP ;
4646

47-
-- [JJC]
48-
fun somebody_IPron : IndefPron ;
49-
fun something_IPron : IndefPron ;
47+
-- [JJC] [KK]
48+
-- - ACE and AceWiki do not allow 'there is every-'
49+
-- - AceWiki does not allow 'there is no-' (but ACE does)
50+
-- - ACE and AceWiki allow 'there is some-'
51+
fun somebody_IPron : IndefTherePron ;
52+
fun something_IPron : IndefTherePron ;
5053
fun everybody_IPron : IndefPron ;
5154
fun everything_IPron : IndefPron ;
5255
fun nobody_IPron : IndefPron ;
5356
fun nothing_IPron : IndefPron ;
5457

55-
-- [JJC]
56-
-- [KK] TODO: Currently indefinite pronouns can be used with 'there is/are' but
57-
-- the reality is more complex:
58-
-- - ACE and AceWiki do not allow 'there is every-'
59-
-- - AceWiki does not allow 'there is no-' (but ACE does)
60-
-- - ACE and AceWiki allow 'there is some-'
61-
fun indefPronNP : IndefPron -> ThereNP ;
62-
fun indefPronVarNP : IndefPron -> Var -> ThereNP ;
58+
-- [JJC] [KK]
59+
fun indefTherePronNP : IndefTherePron -> ThereNP ;
60+
fun indefPronNP : IndefPron -> NP ;
61+
62+
fun indefTherePronVarNP : IndefTherePron -> Var -> ThereNP ;
63+
fun indefPronVarNP : IndefPron -> Var -> NP ;
6364

6465
fun at_leastNP : Card -> VarCN -> ThereNP ;
6566
fun at_mostNP : Card -> VarCN -> ThereNP ;
@@ -164,8 +165,8 @@ fun neg_slash_ipQS : IP -> NP -> V2 -> QS ;
164165
--fun vpq_QS : NP -> IP -> QS ; -- "Mary is who ?"
165166
--fun vpq_QS : NP -> V2 -> IP -> QS ; -- "Mary asks who ?"
166167

167-
fun is_NPQ : IndefPron -> IP -> NPQ ; -- "somebody who is who"
168-
fun v2_NPQ : IndefPron -> V2 -> IP -> NPQ ; -- "somebody who asks who"
168+
fun is_ThereNPQ : IndefTherePron -> IP -> NPQ ; -- "somebody who is who"
169+
fun v2_ThereNPQ : IndefTherePron -> V2 -> IP -> NPQ ; -- "somebody who asks who"
169170
fun is_vpq_QS : NP -> NPQ -> QS ; -- "Mary is somebody who is/asks who ?"
170171
fun v2_vpq_QS : NP -> V2 -> NPQ -> QS ; -- "Mary asks somebody who is/asks who ?"
171172

grammars/acewiki_aceowl/AttemptoAce.gf

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--# -path=.:present
22

3-
concrete AttemptoAce of Attempto = SymbolsC [Term], NumeralAce ** AttemptoI - [slash_ipQS, neg_slash_ipQS, apposVarCN, indefPronVarNP] with
3+
concrete AttemptoAce of Attempto = SymbolsC [Term], NumeralAce ** AttemptoI - [slash_ipQS, neg_slash_ipQS, apposVarCN, indefTherePronVarNP, indefPronVarNP] with
44
(Syntax = SyntaxAce),
55
(Symbolic = SymbolicAce),
66
(LexAttempto = LexAttemptoAce) ** open SyntaxAce, ExtraAce, ResAce, SentenceAce, Precedence in {
@@ -25,8 +25,9 @@ concrete AttemptoAce of Attempto = SymbolsC [Term], NumeralAce ** AttemptoI - [s
2525
} ;
2626

2727
-- Using IP in a VP to form a QS [JJC]
28-
lin is_NPQ somebody who = Syntax.mkNP (thereNP_as_NP (indefPronNP somebody)) (predRS AttemptoAce.which_RP (npVP (ip2np who somebody.a))) ; -- "somebody who is who"
29-
lin v2_NPQ somebody v2 who = Syntax.mkNP (thereNP_as_NP (indefPronNP somebody)) (predRS AttemptoAce.which_RP (v2VP v2 (ip2np who somebody.a))) ; -- "somebody who asks who"
28+
lin is_ThereNPQ somebody who = Syntax.mkNP (thereNP_as_NP (indefTherePronNP somebody)) (predRS AttemptoAce.which_RP (npVP (ip2np who somebody.a))) ; -- "somebody who is who"
29+
lin v2_ThereNPQ somebody v2 who = Syntax.mkNP (thereNP_as_NP (indefTherePronNP somebody)) (predRS AttemptoAce.which_RP (v2VP v2 (ip2np who somebody.a))) ; -- "somebody who asks who"
30+
3031
lin is_vpq_QS np npq = lin QS { -- "Mary is somebody who is/asks who ?"
3132
s = \\qf => (mkCl np npq).s ! Pres ! Simul ! CPos ! ODir
3233
} ;
@@ -42,13 +43,19 @@ concrete AttemptoAce of Attempto = SymbolsC [Term], NumeralAce ** AttemptoI - [s
4243
lin Y_Var = {s = regGenitiveS "Y"} ;
4344
oper NomVar : {s : Case => Str} -> Str = \v -> v.s ! Nom ;
4445

45-
-- "somebody X" etc [JJC]
46+
-- "everybody X" etc [JJC]
4647
lin indefPronVarNP pr v = lin NP {
4748
s = \\c => pr.s ! NCase Nom ++ v.s ! (npcase2case c) ; -- with genitive "somebody X's"
4849
-- s = \\c => pr.s ! NCase Nom ++ v.s ! (npcase2case (NCase Nom)) ; -- no inflection for genitive
4950
a = pr.a
5051
};
5152

53+
-- "somebody X" and "something X" [KK]
54+
lin indefTherePronVarNP pr v = lin NP {
55+
s = \\c => pr.s ! NCase Nom ++ v.s ! (npcase2case c) ; -- with genitive "somebody X's"
56+
a = pr.a
57+
};
58+
5259
-- We override this because of the linearisation of Var [JJC]
5360
lin apposVarCN cn v = mkCN cn (symb (NomVar v)) ;
5461

grammars/acewiki_aceowl/AttemptoI.gf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ lincat A = Syntax.A ;
1414
lincat A2 = Syntax.A2 ;
1515
lincat AP = Syntax.AP ;
1616
lincat RS = Syntax.RS ;
17-
lincat Pron = Syntax.Pron ; lincat IndefPron = Syntax.NP ;
17+
lincat Pron = Syntax.Pron ; IndefPron = Syntax.NP ; IndefTherePron = Syntax.NP ;
1818
lincat Prep = Syntax.Prep ;
1919
lincat S = Syntax.S ; lincat SimpleS = Syntax.S ;
2020
lincat VP = Syntax.VP ;
@@ -51,7 +51,9 @@ lin nobody_IPron = Syntax.nobody_NP ;
5151
lin nothing_IPron = Syntax.nothing_NP ;
5252

5353
-- [JJC]
54+
lin indefTherePronNP pr = pr;
5455
lin indefPronNP pr = pr;
56+
lin indefTherePronVarNP pr var = symb var ; -- Default ignores pronoun! This sould be overridden [JJC]
5557
lin indefPronVarNP pr var = symb var ; -- Default ignores pronoun! This sould be overridden [JJC]
5658

5759
lin at_leastNP ca = Syntax.mkNP (Syntax.mkCard at_least_AdN ca) ;

0 commit comments

Comments
 (0)