fall 2004 lecture notes #6
DESCRIPTION
EECS 595 / LING 541 / SI 661. Natural Language Processing. Fall 2004 Lecture Notes #6. Natural Language Generation. What is NLG?. Mapping meaning to text Stages: Content selection Lexical selection Sentence structure: aggregation, referring expressions Discourse structure. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Fall 2004 Lecture Notes #6](https://reader036.vdocuments.mx/reader036/viewer/2022062309/568152a2550346895dc0c8c8/html5/thumbnails/1.jpg)
Fall 2004
Lecture Notes #6
EECS 595 / LING 541 / SI 661
Natural Language Processing
![Page 2: Fall 2004 Lecture Notes #6](https://reader036.vdocuments.mx/reader036/viewer/2022062309/568152a2550346895dc0c8c8/html5/thumbnails/2.jpg)
Natural Language Generation
![Page 3: Fall 2004 Lecture Notes #6](https://reader036.vdocuments.mx/reader036/viewer/2022062309/568152a2550346895dc0c8c8/html5/thumbnails/3.jpg)
What is NLG?
• Mapping meaning to text
• Stages:– Content selection– Lexical selection– Sentence structure: aggregation, referring
expressions– Discourse structure
Acrobat Document
![Page 4: Fall 2004 Lecture Notes #6](https://reader036.vdocuments.mx/reader036/viewer/2022062309/568152a2550346895dc0c8c8/html5/thumbnails/4.jpg)
Systemic grammars
• Language is viewed as a resource for expressing meaning in context (Halliday, 1985)
• Layers: mood, transitivity, theme
The system will save the document
Mood subject finite predicator object
Transitivity actor process goal
Theme theme rheme
Acrobat Document
![Page 5: Fall 2004 Lecture Notes #6](https://reader036.vdocuments.mx/reader036/viewer/2022062309/568152a2550346895dc0c8c8/html5/thumbnails/5.jpg)
Example
(:process save-1:actor system-1:goal document-1:speechact assertion:tense future
) Input is underspecified
![Page 6: Fall 2004 Lecture Notes #6](https://reader036.vdocuments.mx/reader036/viewer/2022062309/568152a2550346895dc0c8c8/html5/thumbnails/6.jpg)
The Functional Unification Formalism (FUF)
• Based on Kay’s (83) formalism
• partial information, declarative, uniform, compact
• same framework used for all stages: syntactic realization, lexicalization, and text planning
![Page 7: Fall 2004 Lecture Notes #6](https://reader036.vdocuments.mx/reader036/viewer/2022062309/568152a2550346895dc0c8c8/html5/thumbnails/7.jpg)
Functional analysis
• Functional vs. structured analysis
• “John eats an apple”
• actor (John), affected (apple), process (eat)
• NP VP NP
• suitable for generation
![Page 8: Fall 2004 Lecture Notes #6](https://reader036.vdocuments.mx/reader036/viewer/2022062309/568152a2550346895dc0c8c8/html5/thumbnails/8.jpg)
Partial vs. complete specification
• Voice: An apple is eaten by John
• Tense: John ate an apple
• Mode: Did John ear an apple?
• Modality: John must eat an apple
• prolog: p(X,b,c)
action = eat
actor = John
object = apple
![Page 9: Fall 2004 Lecture Notes #6](https://reader036.vdocuments.mx/reader036/viewer/2022062309/568152a2550346895dc0c8c8/html5/thumbnails/9.jpg)
Unification
• Target sentence
• input FD
• grammar
• unification process
• linearization process
![Page 10: Fall 2004 Lecture Notes #6](https://reader036.vdocuments.mx/reader036/viewer/2022062309/568152a2550346895dc0c8c8/html5/thumbnails/10.jpg)
Sample input
((cat s) (prot ((n ((lex john))))) (verb ((v ((lex like))))) (goal ((n ((lex mary))))))
![Page 11: Fall 2004 Lecture Notes #6](https://reader036.vdocuments.mx/reader036/viewer/2022062309/568152a2550346895dc0c8c8/html5/thumbnails/11.jpg)
Sample grammar((alt top (((cat s) (prot ((cat np))) (goal ((cat np))) (verb ((cat vp) (number {prot number}))) (pattern (prot verb goal))) ((cat np) (n ((cat noun) (number {^ ^ number}))) (alt (((proper yes) (pattern (n))) ((proper no) (pattern (det n)) (det ((cat article) (lex “the”))))))) ((cat vp) (pattern (v)) (v ((cat verb)))) ((cat noun)) ((cat verb)) ((cat article)))))
![Page 12: Fall 2004 Lecture Notes #6](https://reader036.vdocuments.mx/reader036/viewer/2022062309/568152a2550346895dc0c8c8/html5/thumbnails/12.jpg)
Sample output((cat s) (goal ((cat np) (n ((cat noun) (lex mary) (number {goal number}))) (pattern (n)) (proper yes))) (pattern (prot verb goal)) (prot ((cat np) (n ((cat noun) (lex john) (number {verb number}))) (number {verb number}) (pattern (n)) (proper yes))) (verb ((cat vp) (pattern (v)) (v ((cat verb) (lex like))))))
![Page 13: Fall 2004 Lecture Notes #6](https://reader036.vdocuments.mx/reader036/viewer/2022062309/568152a2550346895dc0c8c8/html5/thumbnails/13.jpg)
Comparison with Prolog
• Similarities:– both have unification at the core
– Prolog program = FUF grammar
– Prolog query = FUF input
• Differences:– Prolog: first order term unification
– FUF: arbitrarily rooted directed graphs are unified
![Page 14: Fall 2004 Lecture Notes #6](https://reader036.vdocuments.mx/reader036/viewer/2022062309/568152a2550346895dc0c8c8/html5/thumbnails/14.jpg)
The SURGE grammar• Syntactic realization front-end
• variable level of abstraction
• 5600 branches and 1600 alts
Lexicalchooser
SURGELinearizerMorphology
Lexicalized FD Syntactic FD
Text
![Page 15: Fall 2004 Lecture Notes #6](https://reader036.vdocuments.mx/reader036/viewer/2022062309/568152a2550346895dc0c8c8/html5/thumbnails/15.jpg)
Systems developed using FUF/SURGE
• COMET
• MAGIC
• ZEDDOC
• PLANDOC
• FLOWDOC
• SUMMONS
![Page 16: Fall 2004 Lecture Notes #6](https://reader036.vdocuments.mx/reader036/viewer/2022062309/568152a2550346895dc0c8c8/html5/thumbnails/16.jpg)
CFUF
• Fast implementation by Mark Kharitonov (C++)
• Up to 100 times faster than Lisp/FUF
• Speedup higher for larger inputs
![Page 17: Fall 2004 Lecture Notes #6](https://reader036.vdocuments.mx/reader036/viewer/2022062309/568152a2550346895dc0c8c8/html5/thumbnails/17.jpg)
References
• Cole, Mariani, Uszkoreit, Zaenen, Zue (eds.) Survey of the State of the Art in Human Language Technology, 1995
• Elhadad, Using Argumentation to Control Lexical Choice: A Functional Unification Implementation, 1993
• Elhadad, FUF: the Universal Unifier, User Manual, 1993
• Elhadad and Robin, SURGE: a Comprehensive Plug-in Syntactic Realization Component for Text Generation, 1999
• Kharitonov, CFUF: A Fast Interpreter for the Functional Unification Formalism, 1999
• Radev, Language Reuse and Regeneration: Generating Natural Language Summaries from Multiple On-Line Sources, Department of Computer Science, Columbia University, October 1998
![Page 18: Fall 2004 Lecture Notes #6](https://reader036.vdocuments.mx/reader036/viewer/2022062309/568152a2550346895dc0c8c8/html5/thumbnails/18.jpg)
Path notation
• You can view a FD as a tree• To specify features, you can use a path
– {feature feature … feature} value
– e.g. {prot number}
• You can also use relative paths– {^ number} value => the feature number for the current
node
– {^ ^ number} value => the feature number for the node above the current node
![Page 19: Fall 2004 Lecture Notes #6](https://reader036.vdocuments.mx/reader036/viewer/2022062309/568152a2550346895dc0c8c8/html5/thumbnails/19.jpg)
Sample grammar((alt top (((cat s) (prot ((cat np))) (goal ((cat np))) (verb ((cat vp) (number {prot number}))) (pattern (prot verb goal))) ((cat np) (n ((cat noun) (number {^ ^ number}))) (alt (((proper yes) (pattern (n))) ((proper no) (pattern (det n)) (det ((cat article) (lex “the”))))))) ((cat vp) (pattern (v)) (v ((cat verb)))) ((cat noun)) ((cat verb)) ((cat article)))))
![Page 20: Fall 2004 Lecture Notes #6](https://reader036.vdocuments.mx/reader036/viewer/2022062309/568152a2550346895dc0c8c8/html5/thumbnails/20.jpg)
Unification Example
![Page 21: Fall 2004 Lecture Notes #6](https://reader036.vdocuments.mx/reader036/viewer/2022062309/568152a2550346895dc0c8c8/html5/thumbnails/21.jpg)
Unify Prot
![Page 22: Fall 2004 Lecture Notes #6](https://reader036.vdocuments.mx/reader036/viewer/2022062309/568152a2550346895dc0c8c8/html5/thumbnails/22.jpg)
Unify Goal
![Page 23: Fall 2004 Lecture Notes #6](https://reader036.vdocuments.mx/reader036/viewer/2022062309/568152a2550346895dc0c8c8/html5/thumbnails/23.jpg)
Unify vp
![Page 24: Fall 2004 Lecture Notes #6](https://reader036.vdocuments.mx/reader036/viewer/2022062309/568152a2550346895dc0c8c8/html5/thumbnails/24.jpg)
Unify verb
![Page 25: Fall 2004 Lecture Notes #6](https://reader036.vdocuments.mx/reader036/viewer/2022062309/568152a2550346895dc0c8c8/html5/thumbnails/25.jpg)
Finish
![Page 26: Fall 2004 Lecture Notes #6](https://reader036.vdocuments.mx/reader036/viewer/2022062309/568152a2550346895dc0c8c8/html5/thumbnails/26.jpg)
Readings for next time
• J&M Chapters 14, 15, 20