Commit 5de11e9d by Ewan Klein

Bugfixes in grammar rules, supplied by Robin Cooper

parent 512cae5b
......@@ -14,7 +14,8 @@
## accomplished by using the InstantiateVarsChart class when parsing.
##
## Author: Edward Loper <edloper@gradient.cis.upenn.edu>,
## Ewan Klein <ewan@inf.ed.ac.uk>
## Ewan Klein <ewan@inf.ed.ac.uk>
## Robin Cooper <robin.cooper@ling.gu.se>
## URL: <http://nltk.sourceforge.net>
## For license information, see LICENSE.TXT
......@@ -24,7 +25,7 @@ S[SEM=[CORE=<?vp(?subj)>, STORE=(?b1+?b2)]] -> NP[SEM=[CORE=?subj, STORE=?b1]] V
VP[SEM=?s] -> IV[SEM=?s]
VP[SEM=[CORE=<?v(?obj)>, STORE=(?b1+?b2)]] -> TV[SEM=[CORE=?v, STORE=?b1]] NP[SEM=[CORE=?obj, STORE=?b2]]
VP[SEM=[CORE=<?v(?obj)>, STORE=(?b1+?b2+?b3)]] -> DTV[SEM=[CORE=?v, STORE=?b1]] NP[SEM=[CORE=?obj, STORE=?b2]] PP[+TO, SEM=[CORE=?pp, STORE=?b3]]
VP[SEM=[CORE=<?v(?pp)(?obj)>, STORE=(?b1+?b2+?b3)]] -> DTV[SEM=[CORE=?v, STORE=?b1]] NP[SEM=[CORE=?obj, STORE=?b2]] PP[+TO, SEM=[CORE=?pp, STORE=?b3]]
NP[SEM=[CORE=<@x>, STORE=((<bo(?det(?n),@x)>)+?b1+?b2)]] -> Det[SEM=[CORE=?det, STORE=?b1]] N[SEM=[CORE=?n, STORE=?b2]]
......@@ -38,11 +39,16 @@ N[SEM=[CORE=<dog>, STORE=(/)]] -> 'dog'
N[SEM=[CORE=<bone>, STORE=(/)]] -> 'bone'
N[SEM=[CORE=<girl>, STORE=(/)]] -> 'girl'
N[SEM=[CORE=<man>, STORE=(/)]] -> 'man'
IV[SEM=[CORE=<\x.smile(x)>, STORE=(/)]] -> 'smiles'
IV[SEM=[CORE=<\x.walk(x)>, STORE=(/)]] -> 'walks'
TV[SEM=[CORE=<\y x.feed(x,y)>, STORE=(/)]] -> 'feeds'
TV[SEM=[CORE=<\y x.chase(x,y)>, STORE=(/)]] -> 'chases'
DTV[SEM=[CORE=<\y x.give(x,y, z)>, STORE=(/)]] -> 'gives'
DTV[SEM=[CORE=<\z y x.give(x,y,z)>, STORE=(/)]] -> 'gives'
NP[SEM=[CORE=<@x>, STORE=(<bo(\P.P(angus),@x)>)]] -> 'Angus'
NP[SEM=[CORE=<@x>, STORE=(<bo(\P.P(cyril),@x)>)]] -> 'Cyril'
P[+TO] -> 'to'
......@@ -4,19 +4,20 @@
## module for Hole Semantics (see Blackburn and Bos).
##
## Author: Dan Garrette <DHGarrette@gmail.com>
## Robin Cooper <robin.cooper@ling.gu.se>
## URL: <http://www.nltk.org>
## For license information, see LICENSE.TXT
% start S
S[sem = <?subj(?vp)>] -> NP[sem=?subj] VP[sem=?vp]
VP[sem=?v] -> IV[sem=?v]
VP[num=?n,sem=<?v(?obj)>] -> TV[num=?n,sem=?v] NP[sem=?obj]
NP[sem=<?det(?n)>] -> Det[sem=?det] N[sem=?n]
S[SEM=<?subj(?vp)>] -> NP[SEM=?subj] VP[SEM=?vp]
VP[SEM=?v] -> IV[SEM=?v]
VP[NUM=?n,SEM=<?v(?obj)>] -> TV[NUM=?n,SEM=?v] NP[SEM=?obj]
NP[SEM=<?det(?n)>] -> Det[SEM=?det] N[SEM=?n]
Det[sem=<\P Q h l.exists h1 l1 l2 l3 x.(ALL(l2,x,l3) & IMP(l3,l1,h1) & LEQ(l,h1) & LEQ(l2,h) & P(x)(h)(l1) & Q(x)(h)(l) & HOLE(h) & HOLE(h1) & LABEL(l) & LABEL(l1) & LABEL(l2) & LABEL(l3))>] -> 'every'
Det[sem=<\P Q h l.exists h1 l1 l2 l3 x.(EXISTS(l2,x,l3) & AND(l3,l1,h1) & LEQ(l,h1) & LEQ(l2,h) & P(x)(h)(l1) & Q(x)(h)(l) & HOLE(h) & HOLE(h1) & LABEL(l) & LABEL(l1) & LABEL(l2) & LABEL(l3))>] -> 'a'
N[sem=<\x h l.(PRED(l,girl,x) & LEQ(l,h) & HOLE(h) & LABEL(l))>] -> 'girl'
N[sem=<\x h l.(PRED(l,dog,x) & LEQ(l,h) & HOLE(h) & LABEL(l))>] -> 'dog'
IV[sem=<\x h l.(PRED(l,bark,x) & LEQ(l,h) & HOLE(h) & LABEL(l))>] -> 'barks'
TV[sem=<\P x.P(\y h l.(PRED(l,chase,y,x) & LEQ(l,h) & HOLE(h) & LABEL(l)))>] -> 'chases'
Det[SEM=<\P Q h l.exists h1 l1 l2 l3 x.(ALL(l2,x,l3) & IMP(l3,l1,h1) & LEQ(l,h1) & LEQ(l2,h) & P(x)(h)(l1) & Q(x)(h)(l) & HOLE(h) & HOLE(h1) & LABEL(l) & LABEL(l1) & LABEL(l2) & LABEL(l3))>] -> 'every'
Det[SEM=<\P Q h l.exists h1 l1 l2 l3 x.(EXISTS(l2,x,l3) & AND(l3,l1,h1) & LEQ(l,h1) & LEQ(l2,h) & P(x)(h)(l1) & Q(x)(h)(l) & HOLE(h) & HOLE(h1) & LABEL(l) & LABEL(l1) & LABEL(l2) & LABEL(l3))>] -> 'a'
N[SEM=<\x h l.(PRED(l,girl,x) & LEQ(l,h) & HOLE(h) & LABEL(l))>] -> 'girl'
N[SEM=<\x h l.(PRED(l,dog,x) & LEQ(l,h) & HOLE(h) & LABEL(l))>] -> 'dog'
IV[SEM=<\x h l.(PRED(l,bark,x) & LEQ(l,h) & HOLE(h) & LABEL(l))>] -> 'barks'
TV[SEM=<\P x.P(\y h l.(PRED(l,chase,x,y) & LEQ(l,h) & HOLE(h) & LABEL(l)))>] -> 'chases'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment