[Attempto] Parsing questions and affirmations

Marco Zanchi mzanchi at gmail.com
Sun Dec 15 11:10:27 CET 2019


Hi Norbert and Kaarel,

You are correct, my intention is to identify a project by its name. I ran a
few experiments and can understand a little better now how to formulate
something that will parse well. Your suggestion of splitting into two
sentences linked by a variable seem to be the best way.

I want to use a controlled English to enter data and query a graph
database, so I am writing an interface from DRS to Gremlin.

I have encountered other difficulties, like when entering commands the
parser expects always the form "<proper name>, <command>!" For example:
"John, create a project!". So I added a shortcut where the user enters :c
before the command, and the middleware fills in the gap. Not ideal, but I
don't feel brave enough to learn Prolog, yet.

Marco


On Sun, 15 Dec 2019, 16:35 Norbert E. Fuchs, <fuchs at ifi.uzh.ch> wrote:

> Hi all
>
> I had another look at Marco's examples, and came to the following
> conclusions.
>
> Again from Marco's second sentence "The project Alpha is late." I assume
> that in "Is the project Alpha late?" Marco wants to know if the project
> called "Alpha" is late. However, the ACE parsing engine APE interprets this
> question differently, namely as "Is the project Alpha?" modifying the
> copula "is" with the adverb "late". This can be seen in the following two
> cases where the adverb appears in two different, grammatically allowed
> positions.
>
> Is the project Alpha late?
>    QUESTION
>    [A,B]
>    object(B,project,countable,na,eq,1)-1/3
>    predicate(A,be,B,named(Alpha))-1/1
>    modifier_adv(A,late,pos)-1/5
>
>
> Is the project late Alpha?
>    QUESTION
>    [A,B]
>    object(B,project,countable,na,eq,1)-1/3
>    modifier_adv(A,late,pos)-1/4
>    predicate(A,be,B,named(Alpha))-1/1
>
> Thus Kaarel is right, the sentence is correct ACE, but does probably not
> express what Marco wanted to say.
>
> Replacing the adverb "late" by "eagerly" we get the result where now
> "eagerly" modifies "is".
>
> Is the project eagerly Alpha?
>    QUESTION
>    [A,B]
>    object(B,project,countable,na,eq,1)-1/3
>    modifier_adv(A,eagerly,pos)-1/4
>    predicate(A,be,B,named(Alpha))-1/1
>
>
> If I am right about Marco's intention then a possible formulation is
>
> Is the project A27 late?
>    QUESTION
>    [A,B,C]
>    object(C,project,countable,na,eq,1)-1/3
>    property(A,late,pos)-1/5
>    predicate(B,be,C,A)-1/1
>
> where I replaced "Alpha" by the variable "A27" that is absorbed by the
> parser and does not name the project. Now you get an interpretation asking
> for the lateness of the project since "late" is no longer interpreted as an
> adverb modifying "is", but as a predicative adjective.
>
> By the way, if you want to introduce the name "Alpha" for the project then
> a possible formulation is
>
> The name of a project is Alpha. Is the project late?
>
> Marco, I would be interested in your comments, especially if my
> interpretation of your question coincides with the one you intended.
>
> Best regards.
>
>    --- nef
>
>
>
>
> > On 14 Dec 2019, at 21:32 , Kaarel Kaljurand <kaljurand at gmail.com> wrote:
> >
> > Hi Norbert,
> >
> > I didn't try to analyze the intended meaning of the sentences. What
> > I'm saying is that
> >
> > - "Is the project Alpha late?" is an ACE sentence and is correctly
> > parsed by APE.
> > - "The project Alpha is late." is not an ACE sentence and APE
> > generates a correct error messages (although, as with any error
> > messages, more feedback could be offered).
> >
> > By "is (not) an ACE sentence" a certain user lexicon is assumed, e.g.
> > if "late" was listed in the lexicon (only) as e.g. a ditransitive verb
> > then "Is the project Alpha late?" would not be correct.
> >
> > @Marco, my recommendation is to disable APE's built-in lexicon and
> > only include your domain lexicon. E.g. if you remove all adverbs
> > (because they are maybe not needed in your modelling) then you would
> > avoid certain unexpected parsing results, e.g. APE+Clex does not
> > successfully parse "Is the project Alpha beautiful?" because
> > "beautiful" is not an adverb in Clex.
> >
> > Best,
> > Kaarel
> >
> > On Sat, Dec 14, 2019 at 6:43 PM Norbert E. Fuchs <fuchs at ifi.uzh.ch>
> wrote:
> >>
> >> Kaarel
> >>
> >> I believe that you are mistaken. From the second sentence "The project
> Alpha is late." you can see that Marco wants the project to be named Alpha,
> and does not want to express that the project is "Alpha late" – whatever
> that means.
> >>
> >>   --- nef
> >>
> >>> On 14 Dec 2019, at 18:00 , Kaarel Kaljurand <kaljurand at gmail.com>
> wrote:
> >>>
> >>> Hi,
> >>>
> >>> I think the parser is correct (i.e. consistent with the ACE spec)
> >>> here, but the of course the DRS might not represent what the normal
> >>> English meaning of the input sentence is. Notice that "late" is an
> >>> adverb that modifies the copula verb "is". Consider e.g.:
> >>>
> >>> Every project is Alpha initially. There is a project. Is it Alpha late?
> >>>
> >>> [A]
> >>>  [B]
> >>>  object(B,project,countable,na,eq,1)-1/2
> >>>  =>
> >>>  [C]
> >>>  predicate(C,be,B,named(Alpha))-1/3
> >>>  modifier_adv(C,initially,pos)-1/5
> >>> object(A,project,countable,na,eq,1)-2/4
> >>>  QUESTION
> >>>  [D]
> >>>  predicate(D,be,A,named(Alpha))-3/1
> >>>  modifier_adv(D,late,pos)-3/4
> >>>
> >>> Best,
> >>> Kaarel
> >>>
> >>> On Sat, Dec 14, 2019 at 1:49 PM Norbert E. Fuchs <fuchs at ifi.uzh.ch>
> wrote:
> >>>>
> >>>>
> >>>>
> >>>>> On 14 Dec 2019, at 12:48 , Marco Zanchi <mzanchi at gmail.com> wrote:
> >>>>>
> >>>>> Hi there,
> >>>>>
> >>>>> I have been playing with the parser recently and noticed a strange
> behaviour, not sure if it is down to the language definition or not. I can
> ask a question:
> >>>>>
> >>>>> Is the project Alpha late?
> >>>>>
> >>>>> And this parses well:
> >>>>>
> >>>>> <DRS domain="">
> >>>>> <Question>
> >>>>>   <DRS domain="A B">
> >>>>>     <object
> >>>>> ref="B"
> >>>>> noun="project"
> >>>>> struct="countable"
> >>>>> unit="na"
> >>>>> numrel="eq"
> >>>>> num="1"
> >>>>> sentid="1"
> >>>>> tokid="3"/>
> >>>>>     <predicate
> >>>>> ref="A"
> >>>>> verb="be"
> >>>>> subj="B"
> >>>>> obj="named('Alpha')"
> >>>>> sentid="1"
> >>>>> tokid="1"/>
> >>>>>     <modifier_adv ref="A" adverb="late" degree="pos" sentid="1"
> tokid="5"/>
> >>>>>   </DRS>
> >>>>> </Question>
> >>>>> </DRS>
> >>>>>
> >>>>> But if I try the equivalent affirmation:
> >>>>>
> >>>>> The project Alpha is late.
> >>>>>
> >>>>> then I get a parsing error.
> >>>>> ERROR: [sentence] at 1-4: 'The project Alpha <> is late.'. This is
> the first sentence that was not ACE. The sign <> indicates the position
> where parsing failed.
> >>>>>
> >>>>> Has anyone encountered anything of the sort?
> >>>>> _______________________________________________
> >>>>> attempto mailing list
> >>>>> attempto at lists.ifi.uzh.ch
> >>>>> https://lists.ifi.uzh.ch/listinfo/attempto
> >>>>
> >>>>
> >>>> Marco
> >>>>
> >>>> There is a grammar error occurring in both of your examples. Namely
> >>>>
> >>>>       Variables can be introduced as noun phrase apposition, and can
> then be used as noun phrases.
> >>>>       Variable names consist of a single upper case letter,
> optionally followed by an integer.
> >>>>
> >>>> Thus your noun phrase "project Alpha" violates this construction rule
> since "Alpha" is not a correct variable.
> >>>>
> >>>> However, your first example "Is the project Alpha late?" points to a
> bug of the parser APE since - though being translated – it is translated
> wrongly as the DRS
> >>>>
> >>>> []
> >>>>  QUESTION
> >>>>  [A,B]
> >>>>  object(B,project,countable,na,eq,1)-1/3
> >>>>  predicate(A,be,B,named(Alpha))-1/1
> >>>>  modifier_adv(A,late,pos)-1/5
> >>>>
> >>>> that does nor reflect the question correctly. Again, the variable
> "Alpha" should trigger an error message.
> >>>>
> >>>> Best regards.
> >>>>
> >>>> Norbert E. Fuchs
> >>>> Institute of Computational Linguistics
> >>>> University of Zurich
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> attempto mailing list
> >>>> attempto at lists.ifi.uzh.ch
> >>>> https://lists.ifi.uzh.ch/listinfo/attempto
> >>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ifi.uzh.ch/pipermail/attempto/attachments/20191215/76ca98f7/attachment-0001.html>


More information about the attempto mailing list