<div dir="auto"><div>Hi Norbert and Kaarel,</div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto">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. </div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto">Marco</div><div dir="auto"><br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Sun, 15 Dec 2019, 16:35 Norbert E. Fuchs, <<a href="mailto:fuchs@ifi.uzh.ch">fuchs@ifi.uzh.ch</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all<br>
<br>
I had another look at Marco's examples, and came to the following conclusions.<br>
<br>
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.<br>
<br>
Is the project Alpha late?<br>
   QUESTION<br>
   [A,B]<br>
   object(B,project,countable,na,eq,1)-1/3<br>
   predicate(A,be,B,named(Alpha))-1/1<br>
   modifier_adv(A,late,pos)-1/5<br>
<br>
<br>
Is the project late Alpha?<br>
   QUESTION<br>
   [A,B]<br>
   object(B,project,countable,na,eq,1)-1/3<br>
   modifier_adv(A,late,pos)-1/4<br>
   predicate(A,be,B,named(Alpha))-1/1<br>
<br>
Thus Kaarel is right, the sentence is correct ACE, but does probably not express what Marco wanted to say.<br>
<br>
Replacing the adverb "late" by "eagerly" we get the result where now "eagerly" modifies "is".<br>
<br>
Is the project eagerly Alpha?<br>
   QUESTION<br>
   [A,B]<br>
   object(B,project,countable,na,eq,1)-1/3<br>
   modifier_adv(A,eagerly,pos)-1/4<br>
   predicate(A,be,B,named(Alpha))-1/1<br>
<br>
<br>
If I am right about Marco's intention then a possible formulation is<br>
<br>
Is the project A27 late?<br>
   QUESTION<br>
   [A,B,C]<br>
   object(C,project,countable,na,eq,1)-1/3<br>
   property(A,late,pos)-1/5<br>
   predicate(B,be,C,A)-1/1<br>
<br>
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. <br>
<br>
By the way, if you want to introduce the name "Alpha" for the project then a possible formulation is<br>
<br>
The name of a project is Alpha. Is the project late?<br>
<br>
Marco, I would be interested in your comments, especially if my interpretation of your question coincides with the one you intended.<br>
<br>
Best regards.<br>
<br>
   --- nef<br>
<br>
<br>
<br>
<br>
> On 14 Dec 2019, at 21:32 , Kaarel Kaljurand <<a href="mailto:kaljurand@gmail.com" target="_blank" rel="noreferrer">kaljurand@gmail.com</a>> wrote:<br>
> <br>
> Hi Norbert,<br>
> <br>
> I didn't try to analyze the intended meaning of the sentences. What<br>
> I'm saying is that<br>
> <br>
> - "Is the project Alpha late?" is an ACE sentence and is correctly<br>
> parsed by APE.<br>
> - "The project Alpha is late." is not an ACE sentence and APE<br>
> generates a correct error messages (although, as with any error<br>
> messages, more feedback could be offered).<br>
> <br>
> By "is (not) an ACE sentence" a certain user lexicon is assumed, e.g.<br>
> if "late" was listed in the lexicon (only) as e.g. a ditransitive verb<br>
> then "Is the project Alpha late?" would not be correct.<br>
> <br>
> @Marco, my recommendation is to disable APE's built-in lexicon and<br>
> only include your domain lexicon. E.g. if you remove all adverbs<br>
> (because they are maybe not needed in your modelling) then you would<br>
> avoid certain unexpected parsing results, e.g. APE+Clex does not<br>
> successfully parse "Is the project Alpha beautiful?" because<br>
> "beautiful" is not an adverb in Clex.<br>
> <br>
> Best,<br>
> Kaarel<br>
> <br>
> On Sat, Dec 14, 2019 at 6:43 PM Norbert E. Fuchs <<a href="mailto:fuchs@ifi.uzh.ch" target="_blank" rel="noreferrer">fuchs@ifi.uzh.ch</a>> wrote:<br>
>> <br>
>> Kaarel<br>
>> <br>
>> 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.<br>
>> <br>
>>   --- nef<br>
>> <br>
>>> On 14 Dec 2019, at 18:00 , Kaarel Kaljurand <<a href="mailto:kaljurand@gmail.com" target="_blank" rel="noreferrer">kaljurand@gmail.com</a>> wrote:<br>
>>> <br>
>>> Hi,<br>
>>> <br>
>>> I think the parser is correct (i.e. consistent with the ACE spec)<br>
>>> here, but the of course the DRS might not represent what the normal<br>
>>> English meaning of the input sentence is. Notice that "late" is an<br>
>>> adverb that modifies the copula verb "is". Consider e.g.:<br>
>>> <br>
>>> Every project is Alpha initially. There is a project. Is it Alpha late?<br>
>>> <br>
>>> [A]<br>
>>>  [B]<br>
>>>  object(B,project,countable,na,eq,1)-1/2<br>
>>>  =><br>
>>>  [C]<br>
>>>  predicate(C,be,B,named(Alpha))-1/3<br>
>>>  modifier_adv(C,initially,pos)-1/5<br>
>>> object(A,project,countable,na,eq,1)-2/4<br>
>>>  QUESTION<br>
>>>  [D]<br>
>>>  predicate(D,be,A,named(Alpha))-3/1<br>
>>>  modifier_adv(D,late,pos)-3/4<br>
>>> <br>
>>> Best,<br>
>>> Kaarel<br>
>>> <br>
>>> On Sat, Dec 14, 2019 at 1:49 PM Norbert E. Fuchs <<a href="mailto:fuchs@ifi.uzh.ch" target="_blank" rel="noreferrer">fuchs@ifi.uzh.ch</a>> wrote:<br>
>>>> <br>
>>>> <br>
>>>> <br>
>>>>> On 14 Dec 2019, at 12:48 , Marco Zanchi <<a href="mailto:mzanchi@gmail.com" target="_blank" rel="noreferrer">mzanchi@gmail.com</a>> wrote:<br>
>>>>> <br>
>>>>> Hi there,<br>
>>>>> <br>
>>>>> 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:<br>
>>>>> <br>
>>>>> Is the project Alpha late?<br>
>>>>> <br>
>>>>> And this parses well:<br>
>>>>> <br>
>>>>> <DRS domain=""><br>
>>>>> <Question><br>
>>>>>   <DRS domain="A B"><br>
>>>>>     <object<br>
>>>>> ref="B"<br>
>>>>> noun="project"<br>
>>>>> struct="countable"<br>
>>>>> unit="na"<br>
>>>>> numrel="eq"<br>
>>>>> num="1"<br>
>>>>> sentid="1"<br>
>>>>> tokid="3"/><br>
>>>>>     <predicate<br>
>>>>> ref="A"<br>
>>>>> verb="be"<br>
>>>>> subj="B"<br>
>>>>> obj="named('Alpha')"<br>
>>>>> sentid="1"<br>
>>>>> tokid="1"/><br>
>>>>>     <modifier_adv ref="A" adverb="late" degree="pos" sentid="1" tokid="5"/><br>
>>>>>   </DRS><br>
>>>>> </Question><br>
>>>>> </DRS><br>
>>>>> <br>
>>>>> But if I try the equivalent affirmation:<br>
>>>>> <br>
>>>>> The project Alpha is late.<br>
>>>>> <br>
>>>>> then I get a parsing error.<br>
>>>>> 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.<br>
>>>>> <br>
>>>>> Has anyone encountered anything of the sort?<br>
>>>>> _______________________________________________<br>
>>>>> attempto mailing list<br>
>>>>> <a href="mailto:attempto@lists.ifi.uzh.ch" target="_blank" rel="noreferrer">attempto@lists.ifi.uzh.ch</a><br>
>>>>> <a href="https://lists.ifi.uzh.ch/listinfo/attempto" rel="noreferrer noreferrer" target="_blank">https://lists.ifi.uzh.ch/listinfo/attempto</a><br>
>>>> <br>
>>>> <br>
>>>> Marco<br>
>>>> <br>
>>>> There is a grammar error occurring in both of your examples. Namely<br>
>>>> <br>
>>>>       Variables can be introduced as noun phrase apposition, and can then be used as noun phrases.<br>
>>>>       Variable names consist of a single upper case letter, optionally followed by an integer.<br>
>>>> <br>
>>>> Thus your noun phrase "project Alpha" violates this construction rule since "Alpha" is not a correct variable.<br>
>>>> <br>
>>>> 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<br>
>>>> <br>
>>>> []<br>
>>>>  QUESTION<br>
>>>>  [A,B]<br>
>>>>  object(B,project,countable,na,eq,1)-1/3<br>
>>>>  predicate(A,be,B,named(Alpha))-1/1<br>
>>>>  modifier_adv(A,late,pos)-1/5<br>
>>>> <br>
>>>> that does nor reflect the question correctly. Again, the variable "Alpha" should trigger an error message.<br>
>>>> <br>
>>>> Best regards.<br>
>>>> <br>
>>>> Norbert E. Fuchs<br>
>>>> Institute of Computational Linguistics<br>
>>>> University of Zurich<br>
>>>> <br>
>>>> <br>
>>>> <br>
>>>> <br>
>>>> _______________________________________________<br>
>>>> attempto mailing list<br>
>>>> <a href="mailto:attempto@lists.ifi.uzh.ch" target="_blank" rel="noreferrer">attempto@lists.ifi.uzh.ch</a><br>
>>>> <a href="https://lists.ifi.uzh.ch/listinfo/attempto" rel="noreferrer noreferrer" target="_blank">https://lists.ifi.uzh.ch/listinfo/attempto</a><br>
>> <br>
<br>
</blockquote></div></div></div>