[Attempto] Temporal coordination/rewriting to fit ACE

Norbert E. Fuchs fuchs at ifi.uzh.ch
Mon Oct 12 12:07:06 CEST 2020



> On 11 Oct 2020, at 18:59 , Halley Young <halleyy at seas.upenn.edu> wrote:
> 
> Hello,
> 
> I have been experimenting with using attempto controlled english as an interface for a music generation tool (for which specifications are written in Datalog).  The APE interface for attempto statements to Prolog has been incredibly helpful, and it's been surprisingly easy to write simple statements in ACE and then have them included in the datalog specification.
> 
> However - one thing I'm not really sure how to do with ACE that's crucial for musical specifications is temporal coordination.  For instance, the following sentences parse in APE:
> 
> "The theme for the flute should be lyrical."
> "The motion in the clarinet and the motion in the violin should be parallel."
> 
> However, I'm interested in particular for this domain in temporal subordination - for instance:
> 
> "[Until/While/Whenever] the movement in the clarinet and the movement in the violin is parallel, the theme for the flute should be lyrical."
> 
> This seems like a pretty basic requirement for my use case.  How would you approach it using ACE?
> 
> My first thought was that whenever I parse a sentence using a constituency parser and it divides into a "While X, Y" statement, I would rewrite it before sending it to the parser as "There is some time that X.  If X then Y."  Is there a better way to think about this?  And if rewriting like this is the right way to go about it, are there existing tools for performing such rewriting in an elegant way?
> 
> 
> Many thanks,
> -- 
> Halley Young
> http://www.seas.upenn.edu/~halleyy/

Good morning Halley

Your message surprised me a lot because I never thought of the combination ACE – music. This seems to be an attractive application of controlled natural languages. I am interested in your results. 

So may be others. Please consider submitting a paper to the Seventh International Workshop on Controlled Natural Language CNL 2020 (http://www.sigcnl.org/cnl2020.html) that actually will take place a year later in September 2021 because of Corona.

> "The theme for the flute should be lyrical."
> "The motion in the clarinet and the motion in the violin should be parallel."

ACE provides modality with modal auxiliaries for possibility (can/cannot/can not/can't), necessity (must/have to/does not have to), recommendation (should/should not/shouldn't), and admissibility (may/may not). We introduced recommendation and admissibility in the context of a project with Yale University to express Clinical Practice Guidelines that use all four modalities to clearly advise clinicians. But there are restrictions since – other than possibility and necessity – recommendation and admissibility cannot be expressed in first-order logic (cf. https://en.wikipedia.org/wiki/Standard_translation). 

> "[Until/While/Whenever] the movement in the clarinet and the movement in the violin is parallel, the theme for the flute should be lyrical."
> 
> This seems like a pretty basic requirement for my use case.  How would you approach it using ACE?
> 
> My first thought was that whenever I parse a sentence using a constituency parser and it divides into a "While X, Y" statement, I would rewrite it before sending it to the parser as "There is some time that X.  If X then Y."  Is there a better way to think about this?  And if rewriting like this is the right way to go about it, are there existing tools for performing such rewriting in an elegant way?

During the development of ACE we several times considered introducing the temporal conjunctions "before", "after", "until", "while", but we never did. One reason could have been that ACE offers the prepositions "at", "before", "after", "until", "during", ... that directly or indirectly can express the temporal conjunctions. 

Here are some simple examples using the prepositions:

John sleeps at 12. (The measurement noun "o'clock" is not in the lexicon but could be added.)
John sleeps until the morning.
John sleeps during the night.

Here are some examples using prepositions to simulate the temporal conjunctions:

English: Before John sleeps he recalls the events of the day. 
ACE 1: John recalls the events of the day at a time T1 and sleeps at a time T2 and T1 occurs before T2.
ACE 2: John recalls the events of the day at a time T1 and sleeps at a time T2 and T2 occurs after T1.
ACE 3: John recalls the events of the day at a time T1 and sleeps at a time T2 and T1 < T2.

English: While John sleeps he dreams.
ACE 1: John sleeps and he dreams.
ACE 2: John sleeps at a time T and he dreams at the time T.

Thus instead of creating a preprocessor (*) that translates the temporal conjunctions into forms accepted by APE you could try to express the temporal situations directly with the help of prepositions.
(*) As far as I know there is none.

One further comment:
Your suggestion to replace "While X, Y" by "There is some time that X. If X then Y." changes the semantics of the sentence as can be seen in 

While John sleeps he dreams. -> There is a time T that John sleeps. If John sleeps then he dreams.

1. "There is a time T that John sleeps." has the meaning "John sleeps a time.", i.e. the intransitive verb "sleep" became transitive. So this should better be "There is a time T at which John sleeps."
2. In "If John sleeps then he dreams." the temporal concurrency of the two states "sleep" and "dream" is replaced by a conditional dependency.

I do hope that you find my comments helpful. Let me know if you have further questions.

Best regards.

Norbert E. Fuchs
Department of Computational Linguistics
University of Zurich







More information about the attempto mailing list