1 / 18

Natural Language Generation: Discourse Planning

Natural Language Generation: Discourse Planning. Paul Gallagher 28 April 2005 (Material adapted from Ch. 20 of Jurafsky and Martin unless otherwise noted). Introduction. Programs that generate natural language are very common “Hello, world” (Kernighan and Ritchie)

ull
Download Presentation

Natural Language Generation: Discourse Planning

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. Natural Language Generation: Discourse Planning Paul Gallagher 28 April 2005 (Material adapted from Ch. 20 of Jurafsky and Martin unless otherwise noted)

  2. Introduction • Programs that generate natural language are very common • “Hello, world” (Kernighan and Ritchie) • Template filling and mail merge • Simple, but inflexible!

  3. Introduction • What do we really mean when we say “Natural Language Generation”? • “the process of constructing natural language outputs from non-linguistic inputs” (Jurafsky and Martin, p. 765) • Map from meaning to text (the inverse of natural language understanding)

  4. Introduction • Contrast with NLU • In NLU, focus is hypothesis management • In NLG, focus is choice • Characteristics of an NLG system • Produce an appropriate range of forms • Choose among forms based on internal meaning and context

  5. Introduction • What kinds of choices? • Content selection • Lexical selection • Sentence structure • Aggregation • Referring expressions • Discourse structure

  6. Introduction • NLG Examples • Generate textual weather forecasts from weather maps • Summarize statistical data from database or spreadsheet • Explain medical information • Authoring aids (Reiter and Dale)

  7. Discourse Planner Text Plan Knowledge Base + Communicative Goal Meaning An NLG Reference Architecture Map Sentence Planning Sentence Plans Linguistic Realization Natural Language Text Text Adapted from Dale & Reiter. “Building Applied Natural Language Generation Systems”

  8. Discourse Planner • “Discourse planning…[imposes] ordering and structure over the set of messages to be conveyed.” (Reiter and Dale) • Push or Pull? The planner selects or receives its content from the knowledge base. (McDonald) • Outputs a tree structure defining order and rhetorical structure. (Reiter and Dale)

  9. Text Schemata • Observation: Many texts follows consistent structural patterns • Example: Instructions • For each step: • Mention preconditions • Describe the step • Describe sub-steps • Mention side-effects

  10. Text Schemata Knowledge base representation of a saving procedure (Jurafsky and Martin. Fig. 20.5)

  11. Text Schemata A schema from representing procedures. Implemented as an augmented transition network (ATN). Jurafsky and Martin. Fig 20.6

  12. Text Schemata • Sample output of the example:Save the document: First, choose the save option from the file menu. This causes the system to display the Save-As dialog box. Next choose the destination folder and type the filename. Finally, press the save button. This causes the system to save the document.

  13. Rhetorical Relations • Text schemata still not very flexible • Schema is essentially a hard-coded text plan. • There is an underlying structure to language which we can take advantage of to develop richer expressions: Rhetorical Structure Theory

  14. Rhetorical Relations I love to collect classic automobiles. My favorite car is my 1899 Duryea. However, I prefer to drive my 1999 Toyota. nucleus Elaboration satellite Contrast satellite

  15. Rhetorical Relations • How do we apply RST to a discourse planner? • Post a high-level goal to the planner (e.g., “Make the hearer competent to save a document”) • Create plan operators which expand goals into sub-goals, creating a rhetorical structure tree.

  16. Name: Expand Purpose Effect: (COMPETENT hearer (DO-ACTION ?action)) Constraints: (AND (c-get-all-substeps ?action ?sub-actions) (NOT singular-list? ?sub-actions)) Nucleus: (COMPETENT hearer (DO-SEQUENCE ?sub-actions)) Satellites: (((RST-PURPOSE (INFORM s hearer (DO ?action))) *required*)) Name: Expand Sub-Actions Effect: (COMPETENT hearer (DO-SEQUENCE ?actions)) Constraints: NIL Nucleus: (foreach ?actions (RST-SEQUENCE (COMPETENT hearer (DO-ACTION ?actions)))) Satellites: NIL Rhetorical Relations Jurafsky and Martin, pp. 786 and 788

  17. Rhetorical Relations The full rhetorical structure for the example text. Jurafsky and Martin. Fig. 20.7.

  18. References • Jurafsky, D. & Martin, J. H. (2000). Speech and and Language Processing. • Reiter, E. and Dale, R. (1997). “Building Applied Natural Language Systems. • McDonald, D. D. “Natural Language Generation”. (Appeared in Handbook of Natural Language Generation, edited by Dale, R., Moisl, H., and Somers, H.)

More Related