what is nlg n.
Skip this Video
Loading SlideShow in 5 Seconds..
What is NLG? PowerPoint Presentation
Download Presentation
What is NLG?

What is NLG?

178 Views Download Presentation
Download Presentation

What is NLG?

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. What is NLG? Input • Formal representation of some information (linguistic or non-linguistic) Output • Single sentences or texts (reports, explanations, instructions, etc.) Resources drawn upon • Context of situation • World and domain knowledge • Domain communication knowledge • Linguistic knowledge

  2. NLG in Text Summarization On Monday, GreenChip Solutions made an acquisition offer to BuyOut Inc., a St. Louis-based plastic tree manufacturer that had tremendous success in equipping American households with pink plastic oak trees. Generation ( ... ( ... ) ( ... )) Analysis GreenChip offered to acquire the plastic tree manufacturer BuyOut.

  3. NLG in Machine Translation SL-Text TL-Text Analysis Generation Transfer Interlingua

  4. NLG in Dialogue Systems Speech recog. When does the train leave? (.. (...) (...)) Analysis Dialogue manager Generation “At eleven p.m., from platform four” (.. (...) (...)) Speech synth.

  5. NLG as a self-contained task (... (...) (....)) Data/knowledge Base Texts Intermed. Repr. 1 Intermed. Repr. 2

  6. NLG Tasks • Content Determination • Document Structure Planning • Sentence (Micro) Planning • Lexicalization • Referring Expression Determination • Aggregation • Syntactic Structure Determination • Surface Realization

  7. Content Determination Strategies • Data driven strategy • Document structure driven strategies • Text plan (schema) driven strategy • Discourse relation driven strategy • Combined (data and structure driven) strategy

  8. Data Driven Content Determination Based on: • Formal representation of data • Context-dependent and domain-specific content selection rules Strategy: • Determine what data to communicate in the text according to messages or selection rules

  9. Data Driven Content Determination (an Example, Input data) <station>Stuttgart-Mitte</station> <substance>ozone </substance> <mseries> <meas> <time> 06:00 </time> <value> 20 </value> </meas> <meas> <time> 06:30 </time> <value> 33 </value> </mseries>

  10. Data Driven Content Determination (an Example, Selection Rules) IF (hourly average value of substance X > 25) THENselect substance X for realization IF (value at x:30) > 1.1(value at x:00) AND (value at x:00 > 100) THEN select value at x:00 for realization AND select value at x:30 for realization ELSE select average value of x:00 and x:30

  11. Document structure driven content determination Basic idea: When generating a text we must ensure that information elements in the text are related to each other so as to achieve that the text is coherent. So why not select the content according to a coherent plan or following rhetorical relations that must be recognizable between data elements? Two common approaches: 1.Text plan (schema) driven strategy 2. Discourse relation driven strategy

  12. Schemata Introduced by K. McKeown (1985) (also known as Generic Structure Potential) Observations: • Specific text types often reveal typical structures • A structure gives rise to a recursive document plan, a schema, which consists of less complex subschemata or elementary elements. • A schema ensures the coherence of the text that is built according to it • Schemata can be compiled in terms of text grammars

  13. Schema Example (NextDayGlobalWeatherForecastSchema: CloudInfo PrecipitationInfo CurrentPrecipitation PrecipitationProgression WindInfo TemperatureInfo EarlyTemperature HighestTemperature)

  14. Application of Schemata SubstanceConcentrationSchema: (CurrentConcentration <cc-sruleset> ReferenceEvaluation RefConcentration <rc-sruleset> CurrentRefCompare <crc-sruleset> ConcentrIntervalAssociation <cia-sruleset> CompThreshold <ct-sruleset> LegalInfo <li-sruleset1> RegionEvaluation LowestConcentr <lc-sruleset1> HighestConcentr <hc-sruleset1>)

  15. Text Structure Driven Content Determination (Example, sel.rules) <cc-sruleset> ((measure –time-> timepoint); (timepoint –hour-> ?h; ?h := (get NOW INPUT)) (measure –substance-> ?s; ?s := (get `substance INPUT)) (measure –value-> ?v; ?v := (get `value INPUT)) (measure –location-> ?l; ?l := (get `location INPUT)) ...)

  16. Evaluation of Schema Based Content Determination Pros: • Relatively easy to establish for a well-restricted domain • The selected information elements form a coherent text plan which adequately reflects the structure of the texts of the domain • Computationally efficient Cons: • Domain-specific • Hardly allow for variation

  17. Discourse Relation Driven Content Determination Based on: • Formal representation of underlying information elements • Discourse relations between information elements • Rules for navigation along the discourse relations • Heuristics for relation sequences for a given text type Strategy: • Collect the data or information elements travelling along the discourse relations and using the heuristics

  18. Rhetorical Structure Theory Introduced by W. Mann & S. Thompson (1987) Observations: • Between text elements (sentences, paragraphs, ...) „rhetorical relations“ hold. • Rhetorical relations (besides other elements) make the text coherent. • Rhetorical relations can be classified with respect to their function. • For a specific domain, a sequence of rhetorical relations in a text can be precompiled.

  19. RST-relation example (1) 1. Heavy rain and thunderstorms in North Spain and on the Balearic Islands. Symmetric (multiple nuclei) Relation: CONTRAST 2. In other parts of Spain, still hot, dry weather with temperatures up to 35 degrees Celcius.

  20. RST-relation example (2) 2. In Cadiz, the thermometer might rise as high as 40 degrees. Asymmetric (nucleus-satellite) Relation: ELABORATION 1. In other parts of Spain, still hot, dry weather with temperatures up to 35 degrees Celcius.

  21. RST-based Content Determination • Motto: choosing what to say and deciding how to structure it cannot be divided • Text planner by Moore and Paris 1993: Map communicative goals via linguistic goals to language • Each time alternative strategies for a (sub-) goal are considered, new content can be selected • Example: When the goal is to convince the reader of proposition P, and the system reckons the reader is unlikely to believe P, check the knowledge base for evidence supporting P, and verbalize it

  22. RST-based Content Determination (2) • Model of mental states and communicative goals, e.g.: • (know ?agent (ref ?description)) • (bel ?agent (?predicate ?e1 ?e2)) • Example: plan operator for MOTIVATION from Moore/Paris: • EFFECT: (MOTIVATION ?act ?goal) • CONSTRAINTS: (AND (STEP ?act ?goal) • (GOAL ?hearer ?goal)) • NUCLEUS: (BEL ?hearer (STEP ?act ?goal)) • SATELLITES: NIL • Moore/Paris text planner works by top-down hierarchical expansion; alternative: bottom-up planning, e.g. (Marcu 1997)

  23. Evaluation of RST-based Content Determination Pros: • The selected information elements form a coherent text plan • Flexible production of text plans of variable size • Allows for explicit reasoning about the reader‘s beliefs Cons: • Usually, an information element in the data/knowledge base is involved in discourse relations between several other information elements: constraints for selecting one path must be available • Formalizing (all) RST relations is difficult • Needs a sophisticated planning mechanism • Computationally expensive

  24. Sentence (Micro) Planning Goal: To map a text plan into a sequence of sentence or phrase plans (with lexical items already determined) Tasks: • Lexicalization • Referring Expression Determination • Aggregation • Syntactic Structure Determination

  25. Lexicalization (1) Lexicalization is the process of mapping semantic entities onto lexical items. • Aspects of lexicalization: • Single open-class words (nouns, verbs, adjectives, adverbs) • Function words (prepositions) that belong to the subcategorization frames of open-class words • Discourse markers • Idiosyncratic word combinations (collocations)

  26. Lexicalization (2) Lexicalization is guided by: • Semantics of the entities to be mapped • Communicative (textual) constraints of the domain and previous discourse • Pragmatics • Basic-level preferences • Argumentative intent • User model: expertise, vocabulary

  27. Lexicalization (3): Stylistic Features • Formality: motion picture - movie - flick • Euphemism: washroom; ethnic cleansing • Slant: gentleman - man - jerk • Archaic: apothecary; albeit • Floridity: house - habitation • Abstractness: unemployed - out of work • Force: big - monstrous

  28. Lexicalization Variations, Examples • The temperature dropped from 30 on Tuesday to 15 degrees C on Wednesday. vs. With 23 degrees C, the temperature on Wednesday was lower than on Tuesday. On Tuesday 30 degrees were measured. vs. On Tuesday, the thermometer read 30 degrees C. On Wednesday, it was much cooler.

  29. Lexicalization Strategies • Constrain source entities until only one lexical option is available • Match parts of the source structure with parts of lexical items • If source items are indexed or labeled with lexical items: choose one according to constraints that are either explicitly available or are derived from the context

  30. Lexicalization Strategies (Constraining source entities) (eat :agent Freddy) IF :agent IS `human´ THEN essen ELSE fressen IF :agent = :patient AND :agent IS `human´ THEN „commit suicide“ ELSE kill (cause :causer Freddy :causee Freddy :caused: die)

  31. Example from MOOSE (Stede 1999): Lexicalization Strategies (Matching parts) tom1 CAUSER OBJECT pour1 coolant1 PATH DESTINATION path1 radiator1 DIRECTION “into” Tom poured coolant into the radiator. Tom schüttete Kühlmittel in den Kühler.

  32. Lexicalization Strategies (Equating source and lexical entities) FN (Reiter) Animal Water Animal Mammal Fish Cetacean Shark Dangerous Fish Dolphin Tiger Shark Sand Shark

  33. Lexicalization Strategies (Indexing) `lecture´ => LECTURE • Information available in the lexicon: TALK, PRESENTATION, ... [to] lecture give [ART ~] deliver [ART ~] attend [ART ~] follow [ART ~] prepare [ART ~] ... • Also (possibly) available: Paraphrasing rules

  34. Aggregation Aggregation is the process of entity grouping at various levels of processing with the goal to avoid redundancy. Types of aggregation: • Conceptual aggregation • Lexical aggregation • Syntactic aggregation

  35. Aggregation (Some Examples, 1) Conceptual aggregation: 1.Heavy rain is expected in Zuffenhausen. 2.Heavy rain is expected in Cannstatt 3. Heavy rain is expected in Vaihingen 1.-3. Heavy rain is expected in Metropolitan Stuttgart. Lexical aggregation: 1. From 9 am to 11 am the ozone concentration fell. 2. Then the ozone concentration rose. 3. Then the ozone concentration fell. 4. Then the ozone concentration rose 1.-4. From 9 pm on the ozone concentration varied.

  36. Aggregation (Some Examples, 2) Syntactic aggregation: • Referential aggregation 1.The employment rate among women fell. 2.The employment rate among men rose. 1.+2. The employment rate among women fell while that among men rose. • Elision 1. The employment rate among women rose. 2. The employment rate among men rose. 1.+2. The employment rate rose.

  37. Aggregation, Rule Examples (x / process :agent ?A ...) AND (x / process :agent ?B ...) (x / process :agent (c /conj :arg (?A ?B)) ...)

  38. Choice of Referring Expressions The process of determining how to identify entities known from the extralinguistic context and entities introduced in the previous discourse. Types of referring expressions: • Noun Definiteness/Deixis • Pronominalization • Elision • Direct lexical references • Indirect lexical references

  39. Referring Expressions Examples • John saw a small boy. The boy was crying. • John saw a small boy. He was crying ... • John saw a small boy. The poor kid was crying • The comments are not restricted to classic AI, but Æ are appropriately applied to theoretical linguistics as well. • Today‘s lecture is on Agent Technology. The lecturer is a visiting professor from the UCLA.

  40. Referring Expressions , Rule Example IF (X is denotation of a transformation AND Prop.focus mentioned in last sentence AND Resultative Noun (RN) available for X) THEN IF (RN unique) THEN CHOOSE RN ELSE ... Put the batter into the oven. Remove the cake in two hours.

  41. Syntacticization (1) Syntacticization is the process of choosing the most appropriate syntactic construction for a message. Options to be chosen from: • Sequence of sentences vs. Coordination vs. Subordination: The Black Forest station is located in the woods. At this station, an ozone concentration of 259 mg/m3 has been measured. vs. Atthe Black Forest station, which is located in the woods, an ozone concentration of 259 mg/m3 has been measured.

  42. Syntacticization (2) • Sentence vs. Nominal Phrase: Tomorrow, it is cloudy with sunny periods and patchy drizzle ending i n the afternoon. vs. Tomorrow, clouds with sunny periods and patchy drizzle till the afternoon.

  43. Interdependency in Microplanning Problematic: • Nearly all microplanning tasks are intertwined with each other, i.e., the realization of one depends on the realization of the other and vice versa. • Theoretically still unclear which phenomenon belongs to which task. • Theoretically still not entirely clear whether to treat microplanning as a set of different tasks.

  44. Interdependency in Microplanning • Today‘s lecture is on Agent Technology. The lecturer is a visiting professor from the UCLA. • The topic of today‘s lecture is Agent Technology. It is given by a visiting professor from the UCLA. • A visiting professor from the UCLA gives today a lecture on Agent Technology. • Today‘s lecture, which is on Agent Technology, is given by a visiting professor from the UCLA.

  45. Surface realization (1) • Goal: • To realize a sentence/phrase plan as a sentence/phrase at the surface • Tasks: • Syntactic realization • Morphologization

  46. Surface Realization Input (1) • (c / creative-material-action • :tense past • :lex construct-past • :passivization-q passivization • :actee (h / object • :lex house • :multiplicity-q unitary • :singularity-q singular • :identifiability-q identifiable) • :relations (i / in • :range (l / two-d-location • :lex forest • :mult…-q unitary • :singularity-q singular • :ident…-q identifiable)))

  47. Surface Realization Input (2) • (construct • :tense past • :voice passive • -subjectival-> (house • :number singular • :article def) • -prep.objectival-> (in • -objectival-> (forest • :number singular • :article def)))

  48. Modularization of generation tasks Content Selection + Text Structuring: Text Planner Microplanning: Sentence Planner + Grammar Surface Realization: Grammar OR Content Selection + Text Structuring: Text Planner Lexicalization: Lex. Chooser Syntacticization + Surface Real.:Grammar

  49. Modularization of generation tasks (cont.) OR Content Selection + Text Structuring: (Text) Planner Lexicalization: (Text) Planner Syntacticization: (Text) Planner Surface Real.:Grammar OR All tasks dealt with in one module

  50. Architecture Issues • Main Types of NLG-System architectures: • Pipeline Architecture • Iterative Architecture • (Quasi or partially) Parallel Architectures • Communication of separate modules via a common information space (e.g. blackboard) • Incremental providing of information by individual modules or of the input (interleaved architecture) • No separate modules (integrated architecture)