330 likes | 592 Views
CSA3050: Natural Language Generation. What is Natural Language Generation? When is NLG an Appropriate Technology? NLG System Architectures. Acknowledgements & Resources. Ehud Reiter and Robert Dale, Building Natural Language Generation Systems , Cambridge:2000.
E N D
CSA3050: Natural Language Generation What is Natural Language Generation? When is NLG an Appropriate Technology? NLG System Architectures CSA3050: Natural Language Generation
Acknowledgements & Resources • Ehud Reiter and Robert Dale, Building Natural Language Generation Systems, Cambridge:2000. • SIGGEN's resource page www.dynamicmultimedia.com.au/siggen/ • Dale & Reiter's ANLP-97 Tutorial on Building Applied Natural Language Generation Systems CSA3050: Natural Language Generation
Natural Language Generation Natural Language Understanding Text Text NLP = NLU + NLG Meaning CSA3050: Natural Language Generation
What is NLG? • NLG "is the process of deliberately constructing a natural language text in order to meet specified communicative goals". [McDonald 1992] • Goal: design of computer software which produces understandable NL utterances. • Input: some underlying non-linguistic representation of information • Output: documents, reports, explanations, help messages, and other kinds of texts CSA3050: Natural Language Generation
Why Use NLG? • Important information is often stored on computers in ways which are not comprehensible to the end user: • NLG systems can present this information to users in an accessible way. • When output is so variable that is difficult to capture by means of canned text. CSA3050: Natural Language Generation
Are NLG and NLU Mirror Images? • Both Require Knowledge • knowledge of language • knowledge of the domain • Can we use same knowledge to drive NLG and NLU? • Reversible grammars CSA3050: Natural Language Generation
Reversible Grammars are Possible s --> np, vp. np --> n. vp --> v, np. n --> [john]. n --> [mary]. v --> [loves]. v --> [hits]. CSA3050: Natural Language Generation
Reversible Grammar - Output 1 ?- s([john,loves,mary],[]). Yes 2 ?- s(X,[]). X = [john, loves, john] ; X = [john, loves, mary] ; X = [john, hits, john] ; X = [john, hits, mary] ; X = [mary, loves, john] ; X = [mary, loves, mary] ; X = [mary, hits, john] ; X = [mary, hits, mary] ; No CSA3050: Natural Language Generation
NLU Management of choices about interpretation. Handling ill-formed input. NLG Management of choices about realisation, given that you know what you want to say. Stylistically appropriate output. Creating understandable output. But NLU and NLG AddressFundamentally Different Problems CSA3050: Natural Language Generation
Deciding what to say involves consideration of .... • what the content of an utterance should be • what information should be omitted; • how to organise that content in a coherent discourse; • what tone or degree of formality should be adopted; • how the material should be broken down into sentences or clauses; • what syntactic constructions should be used; • how entities should be described; • word choice. CSA3050: Natural Language Generation
Examples of Choices "This course is being taught by Mike Rosner. It is an introduction to natural language generation". • lecturers name and course title. • style of name • two sentences rather than one. • passive rather than active for first sentence • being taught rather than being given • pronoun it in the second sentence CSA3050: Natural Language Generation
Criteria of Understandability/Quality • Clear meaning, good grammar, terminology and sentence structure. • Clear meaning but bad grammar, bad terminology, or bad sentence structure. • Meaning graspable but ambiguities due to bad terminology or bad sentence structure • Meaning unclear but inferrable • Meaning absolutely unclear CSA3050: Natural Language Generation
Examples of Understandability/Quality • The US unilaterally reduced China's textile export quotas. • US cutted china export ration lonely. • A chinese ration US cut it down. • Cause states go quotas to reduced. • alone cut it up rations alone CSA3050: Natural Language Generation
When are NLG Techniques Desirable? • Necessary source data available in a computationally tractable form. • Much variation in output is required. • Automation justified on the basis of volume, speed requirements or consistency requirements. • Text is the right medium. CSA3050: Natural Language Generation
Alternatives to/Variations of Natural Language Generation • Alternatives • Fixed Templates • Templates with Variables • Graphics. • Manual NLG • Variations • Multi-Modal • Dialogue CSA3050: Natural Language Generation
Choice of Text v. Graphics • No hard and fast rules. • Examination of existing conventions in a given area of application is useful. • Can depend on type of subject matter, e.g. • Information about physical location often better conveyed by graphics. • Information about abstract concepts better conveyed by text. • Expertise and language abilities of user. CSA3050: Natural Language Generation
WIP: Knowledge Based Presentation of Information • WIP (Wahlster et al c.1990) • Multimodal • Presentation system that is able to generate a variety of multimedia documents • Input consisting of a formal description of the communicative intent of a planned presentation. • generation process is controlled by a set of generation parameters • target group • presentation objective • resource limitation • target language. CSA3050: Natural Language Generation
Text Planning Sentence Planning Linguistic Realization Typical Pipelined Architecture CSA3050: Natural Language Generation
Text Planning Sentence Planning Linguistic Realization Tasks and Architecture in NLG • Content determination • Discourse planning (≈ paragraphs) • Sentence aggregation • Lexicalisation • Referring expression generation • Syntax + morphology • Orthographic realization CSA3050: Natural Language Generation
Text Planning Text Plan Intermediate Representations Sentence Planning Sentence Plans Linguistic Realization CSA3050: Natural Language Generation
1. Content Determination • The process of deciding what to say from communicative goals etc. • construction of a set of messages from the underlying data source • Messages are aggregations of data that are appropriate for linguistic expression. • Each message may correspond to the meaning of a word or a phrase. • Messages are based on domain entities, concepts, and relations. CSA3050: Natural Language Generation
DEPARTURETIME( CALEXPRESS, 1000). ID(NEXTTRAIN, CALEXPRESS) COUNT((TRAIN, SRC(ABERDEEN), DESTINATION(GLASGOW)), 20, PERDAY) The Caledonian Express leaves at 10am The next train is the Caledonian Express There are 20 trains daily from Aberdeen to Glasgow Examples of Messages CSA3050: Natural Language Generation
2. Discourse Planning • A text is not just a random collection of sentencesThe Caledonian Express leaves at 10am.The next train is the Caledonian Express.There are 20 trains daily from Aberdeen to Glasgow • Texts have an underlying structure in which the parts are related together • The structure can be expressed by means of a text plan CSA3050: Natural Language Generation
Sequence COUNT(…) NextTrainInformation Elaboration IDENTITY(…) DEPARTURETIME(…) A Text Plan CSA3050: Natural Language Generation
Text Resulting from Text Plan There are 20 trains daily from Aberdeen to Glasgow. The next train is the Caledonian Express. It leaves Aberdeen at 10am. CSA3050: Natural Language Generation
3. Sentence Planning:Aggregation • A one-to-one mapping from messages to sentences results in disfluent text • Messages need to be combined to produce larger and more complex sentences • The result is a sentence specification or SENTENCE PLAN CSA3050: Natural Language Generation
An Example of Sentence Aggregation • Without aggregation: • The next train is the Caledonian Express. It leaves Aberdeen at 10am. • With aggregation: • The next train, which leaves at 10am, is the Caledonian Express. CSA3050: Natural Language Generation
4 Lexicalisation • Lexicalisation determines the particular words to be used to express domain concepts and relations • In our example, should the DEPARTURETIME relation be expressed using the verb leave or depart? • How do we express different nuances of meaning? • What words should be used in different languages? CSA3050: Natural Language Generation
5 Referring Expression Generation • Referring expression generation is concerned with how we describe domain entities in such a way that the hearer will know what we are talking about. • Choice between • Proper names (type/degree of formality) • Definite Descriptions • Pronouns • Major issue is avoiding ambiguity.John hit Bill. He cried out. CSA3050: Natural Language Generation
6 Syntactic and Morphological Realization • Morphology: rules of word formation: • walk + ed = walked • Syntax: rules of sentence formation • the subject goes before the verb CSA3050: Natural Language Generation
7 Orthographic Realization • Orthographic realization is concerned case, punctuation, typographic issues: font size, column width … • sentences begin with upper case letter, end in full stops • choice of font • other layout issues CSA3050: Natural Language Generation
Summary • NLG is related to NLU but addresses different problems. • Quality/understandability is a major issue. • NLG is an option when text is an appropriate output medium, and when "mail-merge" style character manipulation is insufficient for the application at hand. • Planning considerations enter into the generation of texts. • Text generation is a pipeline process involving different representations. CSA3050: Natural Language Generation