1 / 35

A short introduction to Natural Language Generation

A short introduction to Natural Language Generation. Kees van Deemter Computing Science University of Aberdeen. These introductory slides. ... owe much to earlier slides by Chris Mellish. First: NLG from a practical perspective. Goal (usually):

nadda
Télécharger la présentation

A short introduction to Natural Language Generation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A short introduction to Natural Language Generation Kees van Deemter Computing Science University of Aberdeen

  2. These introductory slides ... owe much to earlier slides by Chris Mellish

  3. First: NLG from a practical perspective • Goal (usually): • computer software which produces understandable and appropriate texts in some human language • Input: • some non-linguistic representation of information (e.g., tables in database, logical formulas, JAVA code, ...) • Output: • documents, reports, explanations, help messages, ... • Knowledge sources required: • knowledge of language and of the domain; maybe of the intended audience as well

  4. Natural Language Understanding Natural Language Generation Speech Recognition Speech Synthesis Language Technology Meaning Text Text Speech Speech

  5. Example System: FoG • Function: • Produces textual weather reports in English and French • Input: • Graphical/numerical weather depiction • User: • Environment Canada (Canadian Weather Service) • Developer: • CoGenTex. [Kitteridge, Goldberg and Driedger 1994.] • Status: • Fielded, in operational use since 1992

  6. FoG: Input

  7. FoG: Output    

  8. Example System: STOP • Function: • Produce personalised stop-smoking leaflets • Input: • Questionnaire about smoking status, beliefs, etc • Target user: • NHS • Developer: • Aberdeen University (CS, Medicine, GP Depts)[Reiter & Robertson 1999] • See http://www.csd.abdn.ac.uk/research/stop/onlineQ.htm • Status: • Clinical trial suggested not effective

  9. STOP: Input

  10. STOP: Output Dear Ms Cameron Thank you for taking the trouble to return the smoking questionnaire that we sent you. It appears from your answers that although you're not planning to stop smoking in the near future, you would like to stop if it was easy. You think it would be difficult to stop because smoking helps you cope with stress, it is something to do when you are bored, and smoking stops you putting on weight. However, you have reasons to be confident of success if you did try to stop, and there are ways of coping with the difficulties.

  11. Example System: Dial Your Disc (DYD) • Function: • Context-sensitive descriptions of Mozart’s instrumental music • Input: • Music database + history of interaction • Target user: • Music industry, customers for music-on-demand • Developer: • Philips Electronics (Nat Lab – IPO, Eindhoven; 1993-6)[Van Deemter & Odijk 1995] • Status: • Not deployed; methods reused in GOALGETTER and other systems

  12. Example System: Dial Your Disc (DYD) • User composes a home-made CD. A number of tracks are on the CD already. • Speech (with keyword spotting) tells system what type of music the user would like to add to the CD • E.g., “I’d like some piano music”. “I’m interested in solo performances”.  “piano”, “solo” • System chooses one composition with solo piano (at random). The music starts. After a while, a text is spoken (while the music is turned down). • Previous descriptions are taken into account. For example, the second time a piano sonata is selected, the following text may be generated: • (Many choices were randomised, so you would seldom get the same monologue twice)

  13. Example System: Dial Your Disc (DYD) Example of approximate output, in its most elaborate form: “The following+ composition+, from which you are going to hear a fragment+ of part three+, was written+ by Mozart in the beginning+ of seventeen+ seventy+ five+, in Munich+. The work is also+ a sonata+ in f+, like the preceding+ composition, but now+ for piano+. The KV+ number of this work is K. two+ eight+ zero+. This sonata+ consists of three+ parts+: allegro assai+, adagio+, and presto+. The presto lasts two+ minutes+ forty+ five+ seconds+. This presto is located on track six+ of first+ CD+ of volume seventeen+. The piano+ is played by Mitsuko Uchida+. The recording+ of the sonata+ was made+ in the Henry Wood+ Hall in London+, England, in the eighties+. The quality+ of its recording is DDD+. The following+ is a fragment+ of the third+ part+.” [A fragment follows] Each “+” marks a pitch accent on the preceding word

  14. Example System: ILEX • Function: • Context-sensitive descriptions of museum artefacts • Input: • Museum database + history of interaction • Target user: • National Museums of Scotland • Developer: • Edinburgh University [R.Dale et al. 1998; Oberlander et al. 1998] • See http://www.hcrc.ed.ac.uk/ilex/systemintro.html • Status: • Commercial application under investigation

  15. When to use NLG? NLG is better than having people write texts when: • There are many potential documents to be written, differing according to the context (user, situation, language) • There are some general principles behind document design.

  16. Why is NLG hard? • NLG involves making many choices, e.g. which content to include, what order to say it in, what words and syntactic constructions to use. • Linguistics does not yet provide us with a ready-made, precise theory about how to make such choices to produce coherent text

  17. Why is NLG hard? • The choices to be made interact with one another in complex ways • Many results of choices (e.g. length and readability of the text) are only visible at the end of the process

  18. Choices The Serbian Prime Minister, Zoran Djindjic, has beenassassinated in the capital, Belgrade. The pro-reform, pro-Western leader was shot in the stomach and in the back outside government offices at around 1300 (1200 gmt), and died of his wounds in hospital. (BBC news, UK edition, 12/3/03)

  19. Tasks and architecture • Most practical NLG systems use a fixed order in which these generation tasks are performed • After Reiter 1994, we often speak of the NLG pipeline • Different systems use slightly different orderings.

  20. Document Planning Surface Realisation Tasks and Architecture in NLG Content Determination Document Structuring Aggregation Lexicalisation Generation of Referring Expressions Linguistic Realisation Physical Realisation Micro-planning

  21. Example: Noun Phrase design • A noun phrase can convey an arbitrary amount of information: • Someone vs a designervs an old designervs an old designer with red hair … • How much information should we “pack into” a given NP?

  22. Some Issues to Consider • Telling the reader what they need to know (e.g., who you’re talking about, and what’s worth knowing about them) • Clarity and readability of the NP; other effects on the reader (e.g., via politeness) • Successful use of pronouns and abbreviated references

  23. Example Content (NB we assume that words, basic syntax etc have been chosen) This T-shirt was made by James Sportler . Sportler is a famous British designer. He drives an ancient pink Jaguar. He works in London with Thomas Wendsop. Wendsop won the first prize in the FWJG awards. Can/should we add more to the NP?

  24. One possible addition This T-shirt was made by James Sportler, who works in London with Thomas Wendsop . Sportler is a famous British designer. He drives an ancient pink Jaguar. Wendsop won the first prize in the FWJG awards. • Facts about Wendsop are now separated from one another (focus). • Wendsop now has greater prominence in the text (ordering)

  25. Another possible addition This T-shirt was made by James Sportler, a famous British designer who works in London with Thomas Wendsop, who won the first prize in the FWJG awards . Sportler drives an ancient pink Jaguar. • The NP is now very complex (readability) • “He” now doesn’t seem to work in the second sentence (pronouns)

  26. Another possible addition This T-shirt was made by James Sportler, a famous British designer . He drives an ancient pink Jaguar. He works in London with Thomas Wendsop. Wendsop won the first prize in the FWJG awards. • Possibly the best solution, but why?

  27. NLG Beyond Words • Plain text • words and punctuation • Printed documents (eg newspapers) • need to consider typography, layout, graphics • Online documents (eg Web pages) • need to consider hypertext links • Speech (eg radio broadcasts, telephone) • need to consider prosody • Visual presentation (eg Embodied Conversational Agents) • need to consider animation, facial expressions too

  28. Plain Text When time is limited, travel by limousine, unless cost is also limited, in which case go by train. When only cost is limited a bicycle should be used for journeys of less than 10 kilometers, and a bus for longer journeys. Taxis are recommended when there are no constraints on time or cost, unless the distance to be travelled exceeds 10 kilometers. For journeys longer than 10 kilometers, when time and cost are not important, journeys should be made by hire car.

  29. With Typography and Layout When only time is limited: travel by Limousine When only cost is limited: travel by Bus if journey more than 10 kilometers travel by Bicycle if journey less than 10 kilometers When both time and cost are limited: travel by Train When time and cost are not limited: travel by Hire Car if journey more than 10 kilometers travel by Taxi if journey less than 10 kilometers

  30. Plain Text (e.g. Andre and Rist 2000) Text and Graphics • Push the code switch S-4 to the right. The code switch is located in front of the transformer.

  31. Embodied Conversational Agents (ECAs) • Until recently, textual aspects of ECAs were largely canned • Recent systems use NLG • Example: NECA e-Showroom system for car sales. Input to NLG includes: • facts about the car • agent’s interests • interaction history

  32. Second perspective: NLG as a branch of linguistics • The choices made by an NLG system involve the mapping between words and things/ideas. • Surely, this is linguistic territory! • If linguists cannot say how the different stories about James Sportler differ, then who can? • An NLG program might be seen as a model of language production (in terms of its output; the human production process may be very different) • This course is neutral between the practical and the theoretical perspective, but I am mostly interested in contributions to (linguistic) theory.

  33. Conclusions • NLG is the (somewhat less investigated) twin brother of NL Understanding • Just like the interpretive perspective (of NLU), the generative perspective (of NLG) poses deep theoretical problems about language and communication • NLG has great potential for applications • In applications and theory alike, NLG and NLU are sometimes difficult to separate

  34. Hidden agenda • Highlight open questions • Get more people to work on Natural Language Generation (NLG)

More Related