3

I'd like to give something like this:

# John # eat + past # apple

and get back the grammatically correct sentence:

John ate an apple.

Which software can I use for such generation?

5
  • What string of words would produce "John ate the apple"?
    – kaleissin
    Commented Mar 5, 2014 at 18:23
  • Your requirements seem to be too specialized. Perhaps you should look at inf.ed.ac.uk/teaching/courses/nlg to figure out how you can adapt your data to an existing NLG system.
    – prash
    Commented Mar 6, 2014 at 0:37
  • Would be almost trivial to create a Prolog program to generate such simple, valid sentences - even after taking into account person and number as Dror correctly points out. It'd rapidly become gargantuanly monstrous should you want more complexity and "realism" in phrases. How simple/complex do you need the sentences to be? What are you planning to use it for?
    – Joe Pineda
    Commented Mar 6, 2014 at 5:38
  • 1
    kaleissin: "... # apple + def" //// prash: thanks for the link and the keyword "natural language generation". //// joe-pineda: programming is fun, but I'd like to reuse already existing work. The book "Machine Translation, a view from the Lexicon" bei Dorr desctibes their generation from interlingua to English, German and Spanish. So, at least one such system exists, and I'd like to find others, especially open-source. At the moment, I'm thinking about generating texts which would conform to simplified technical english (ASD STE100). But obviously, more power is always better.
    – olpa
    Commented Mar 6, 2014 at 14:09
  • The method you're describing here is far too simple to be regarded as NLP (natural language processing). Even famous software such as ELIZA don't really go beyond this. State of the art might be something like what Watson uses. I recall reading that unlike parsing and translating, generating natural language is not yet very thoroughly studied. Commented Mar 9, 2014 at 9:06

2 Answers 2

4

The example you give displays three grammatical aspects to deal with. First, the subject should agree with the verb by person and number, which is relevant in present tense: “John eats” and not “John eat”. Second, you need to construct the verb phrase correctly according to the required tense/aspect/voice, i.e., present-perfect-progressive will be “John has been eating an apple”. And third, you have to identify that “apple” is a count-singular noun and therefore it requires a determiner.

More grammatical rules may be relevant for other patterns you might want to support.

I’m not aware of any software that does exactly what you describe. However, in Contextors we use an internal tool for the first two aspects above.

4
  • 2
    Not related to the original question, just remark. I tried an example from Chomsky, "Syntactic Structures", 9.2.7 in your Voice Conjugator. Original sentence: "Everyone in the room knows at least two languages." Result: "At least two languages are known by everyone in the room." Consider one person knows only French and German, and another one only Spanish and Italian. The original sentence is true, converted -- false.
    – olpa
    Commented Mar 6, 2014 at 14:22
  • 1
    @olpa, it was you! ;-) You are right. This sentence doesn’t have a counterpart with the same meaning in the passive and we plan to alert about it in the future. The Voice Conjugator does support the replacement of negative & negative-polarity items as in “she has never been kissed by anyone“. It is described in this article, which covers shortly your example as well and might be relevant to your question. Commented Mar 6, 2014 at 20:48
  • I meant that the article includes examples like the one you give (not this exact one). Commented Mar 6, 2014 at 21:29
  • @DrorYashpe: the link is broken. Commented Feb 18, 2020 at 8:32
1

I've purchased the book "Building natural language generation systems" by Ehud Reiter and Robert Dale, isbn 978-780521-024518. The book is old (issued in 2000), but enough to get the basics and the keywords for further search. The keywords:

  • surface realisation
  • linguistic realisation
  • systemic functional grammar
  • functional unification grammar
  • meaning-text theory
  • deep syntactic structure

Several systems are briefly described:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.