Professional Documents
Culture Documents
Computing All Quantifier Scopes With CCG
Computing All Quantifier Scopes With CCG
Computing All Quantifier Scopes With CCG
33
Proceedings of the 14th International Conference on Computational Semantics, pages 33–37
June 17–18, 2021. ©2021 Association for Computational Linguistics
Every farmer owns a donkey Every farmer owns a donkey
S/(S\NP) (S\NP)/NP S\(S/NP) S/(S\NP) (S\NP)/NP S\(S/NP)
λ a. ∀b [ f armer0 (b) ⇒ (a b)] λ a. λ b. own0 (b, a) λ a. a(skolem donkey0 ) λ a. ∀b [ f armer0 (b) ⇒ (a b)] λ a. λ b. own0 (b, a) λ a. a(skolem donkey0 )
>B ....................... >B
S/NP : λ a. ∀b [ f armer0 (b) ⇒ own0 (b, a)]
{}
S\(S/NP) : λ a. a skdonkey0 S/NP : λ a. ∀b [ f armer0 (b) ⇒ own0 (b, a)]
<
h
{}
i < S: ∀b [ f armer0 (b) ⇒ own0 (b, skolem donkey0 )]
S : ∀b f armer0 (b) ⇒ own0 (b, skdonkey0 ) . . . . . . . . . . . . . . . . . . . . . h. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .i. . . . . . . . . . . . . . . .
{b}
S : ∀b f armer0 (b) ⇒ own0 (b, skdonkey0 )
(a) Wide reading.
(b) Narrow reading.
34
same noun phrase and combine their arguments {}trrl {a}t
gi+1 . If we take again skapple0 as an example
in order i.e. first arguments of both Skolems go we can say that the argument {} corresponds to
together and second arguments of both Skolems specialization of Skolem function for nodes trrl,
go together. While this solves the example in Fig- trr and tr.
ure 3, it does not work on that in Figure 4 where we Additional important point is that we know for
coordinate one universal and one existential quanti- certain that g1 is the address of the leaf of the tree
fier. Here there is no clear correspondence between because that is the first point in the derivation where
arguments of two Skolem functions: one of them the specification can be done. This is important
has two different arguments ({} and {a}) while the because in the cases of coordination the logical
other one has only one possible argument ({}). Of formula can have copies of the Skolem term that
course, in principle the difference in the number of comes from the same noun phrase. We can use
possible combinations could be significantly larger the Gorn address of the leaf to identify the Skolem
and it may not be clear how to combine them. To terms that originate in the same noun phrase. Steed-
solve this problem we need a more principled so- man (2011) uses a special index to keep track of
lution that directly reflects the mechanism of the this information, but that index is not necessary
non-packed derivations. in our representation due to the existance of Gorn
addresses.
4 Proposed Solution Now we can define unpacking of the new version
The packed representation can be seen as a dynamic of the packed representation. We will illustrate it
programming approach to computing all possible with the example packed formula from the top node
trrl {a}t
h i
orders of specifications of Skolem terms. How- of Figure 4a: ∀a man (a) ⇒ eat a, sk{}
0 0
apple 0 ∧
{}tlrrl {}trrl
ever, the packed representation of Steedman (2011) eat0 skwoman0 , skapple0
that we considered so far is incomplete: from a
given packed representation we cannot reconstruct step 1 Group Skolem terms by the NP they belong
the non-packed representations that are encoded to. For that we can use the first Gorn address
in it. That is caused by the missing information that specifies the leaf node. In the example
of the location in the tree where the specification {}tlrrl
that would give {skwoman0 } for the first NP and
was done. We extend the packed representation {}trrl {a}t {}trrl
with this information: whenever a new argument {skapple0 , skapple0 } for the second.
combination is added, together with it we add the
step 2 For each group of the Skolems extract the
Gorntrrl address of the current node. For instance
{} {a}t unique Gorn addresses where specification
skapple0 from Figure 4a signifies that there are
changes. In this example that would be {tlrrl}
two possible arguments for this Skolem function:
for the first noun phrase and {trrl,t} for the
an empty argument list specified at Gorn address
second.
trrrl (top → right → right → right → left) and a
non-empty argument {a} at address t (top). We step 3 Compute the Cartesian product of the sets
know that all the Gorn addresses for a given Skolem of Gorn addresses. That will give all possible
function will be on a single path from the root of combinations of specification points. Each
the tree to the determiner that introduced it into combination will correspond to one possible
derivation. This means that, for a given function, reading of the sentence. In the example that
we can sort all addresses by their height in the tree. will give {(tlrrl,trrl), (tlrrl,t)}.
Assume we have a Skolem function with k possi-
ble argument sets e1 , e2 , . . . , ek sorted by the height step 4 To transform each entry to a reading we fil-
of their Gorn addresses g1 , g2 , . . . , gk such that gk ter the Skolem arguments by the Gorn address.
is closest to the root of the tree. We can say that Let us consider how we extract the reading
every argument set ei corresponds to the special- for entry (tlrrl,t). Filtering arguments for the
izations done on any node g for which it holds {}tlrrl
first noun phrase Skolem term {skwoman0 } with
gi ≤ g < gi+1 .2 In other words g can be any node tlrrl is easy because there is only one entry
between gi and gi+1 , including gi but excluding that matches it exactly. Filtering arguments
2 For simplicity, when g 6= t we can consider g
k k+1 = t in
for the second noun phrase is more interesting
order to have a complete coverage to the root of the tree. because there are two copies of it. We need to
35
Every man and every woman eat an apple
NP↑ /N N conj NP↑ /N N (S\NP)/NP NP↑ /N N
{}trrl
λ a. λ b. ∀c [(a c) ⇒ (b c)] man0 and0 λ a. λ b. ∀c [(a c) ⇒ (b c)] woman0 λ a. λ b. eat0 (b, a) λ a. λ b. b ska apple0
> > >
NP↑ NP↑ NP↑
{}trrl
λ a. ∀b [man0 (b) ⇒ (a b)] λ a. ∀b [woman0 (b) ⇒ (a b)] λ a. a skapple0
>Φ >
NP↑ \NP↑ S\NP
{}trrl
λ a. λ b. (a b) ∧ ∀c [woman0 (c) ⇒ (b c)] λ a. eat0 a, skapple0
<
NP↑
λ a. ∀b [man0 (b) ⇒ (a b)] ∧ ∀c [woman0 (c) ⇒ (a c)]
<
i S h
{}trrl {a}t {}trrl {b}t
h i
∀a man0 (a) ⇒ eat0 a, skapple0 ∧ ∀b woman0 (b) ⇒ eat0 b, skapple0
{}trrl {}trrl
h i h i
∀a man0 (a) ⇒ eat0 a, skapple0 ∧ ∀b woman0 (b) ⇒ eat0 b, skapple0
{a}t {b}t
h i h i
∀a man0 (a) ⇒ eat0 a, skapple0 ∧ ∀b woman0 (b) ⇒ eat0 b, skapple0
(b) Readings.
select for specification on node t. In the first existing result and we also encode exactly at which
{}trrl {a}t places in the tree this happens.
copy skapple0 we just select argument {a}
since it corresponds to node t. In the second Here we have described how to get all possible
{}trrl readings from a single CCG derivation. However,
copy skapple0 we select for {} because it covers
all nodes from trrl to the root including t. in some cases there can be alternative CCG deriva-
tions that can provide additional readings. To get
5 Conclusion those readings we can apply the same method on
all alternative derivations either by chart parsing,
This approach is really just a full dynamic pro- as described in (Steedman, 2011), or by recover-
gramming representation of the unpacked repre- ing alternative derivations with the tree-rotation
sentations that could easily be extracted from this operation (Niv, 1994; Stanojević and Steedman,
representation. We do not have to explicitly encode 2019)
all the nodes where specification happens, but only Evang and Bos (2013) show that there is a strong
for the places where that specification changes the preference for subject to take scope over object.
36
Our representation of Skolem terms could be ex- American Chapter of the Association for Computa-
tended to encode the information of the type of tional Linguistics: Human Language Technologies,
Volume 1 (Long and Short Papers), pages 228–239,
noun phrase they originate from. With this ex-
Minneapolis, Minnesota. Association for Computa-
tension we could rank the extracted readings by tional Linguistics.
subject > object preference.
The implementation of our approach is Mark Steedman. 1999. Alternating Quantifier Scope
in CCG. In Proceedings of the 37th Annual Meet-
available at https://github.com/stanojevic/ ing of the Association for Computational Linguistics
CCG-Quantifiers. on Computational Linguistics, ACL ’99, pages 301–
308, USA. Association for Computational Linguis-
Acknowledgments tics.
This work was supported by ERC H2020 Advanced Mark Steedman. 2011. Taking Scope: The Natural Se-
Fellowship GA 742137 SEMANTAX grant. mantics of Quantifiers. The MIT Press.
References
Robin Cooper. 1983. Quantification and Syntactic The-
ory. Reidel, Dordrecht.
37