Title: CSA3050: Natural Language Generation 2
1CSA3050 Natural Language Generation 2
- Surface Realisation
- Systemic Grammar
- Functional Unification Grammar
- see JM Chapter 20.3
2Surface Realisation within NLG
3Revealing Quotations
- Language understanding is somewhat like counting
from one to infinity language generation is like
counting from infinity back to one. Y. Wilks,
1988 - Generation from what?! C. Longuet-Higgins
- Moral there is no consensus about the level of
representation we start from. This applies in
particular to surface realisation.
4Surface Realisation
- There is, however, some agreement that output
should be specified in terms of function rather
than syntactic form - Consider the case of voice (syntactic form)
- The system will save the document vs.
- The document will be saved by the system
- Output of a discourse planner is not in terms of
voice, active v. passive. - More likely in terms of notions like topic, focus
etc. whose surface realisation is left to a
subsequent processing stage.
5Two Approaches toSurface Realisation
- Systemic Grammar (Halliday 1985)
- Systemic Functional Linguistics
- Language as a resource for expressing meaning in
context. - Sentences are regarded collections of functions
that are mapped to grammatical forms. - Functional Unification Grammar (Kay 1979)
- Grammar is a "feature structure" (recursive
attribute/value pairs). - Input specification is another feature structure
- Realisation viewed as further specification of
input to yield output sentence via fundamental
operation of functional unification.
6Systemic Grammar Multi-Layered Sentence Analysis
the system will save the document
Mood subject finite predicator object
Transitivity actor process process goal
Theme theme rheme rheme rheme
- Mood layer defines interaction between reader
and writer - telling v. asking v. ordering
- Transitivity layer expresses propositional
content - Theme layer deals with topic (highlighting
function)
7Systemic Grammar
- Grammar is represented as a graph called a system
network. This comprises - and systems (curly braces)
- conjunctive features in boldface
- or systems (straight vertical lines)
- disjunctive features in normal face
- realisation statements (in italic).
- specify how disjunctive features are realised
8(No Transcript)
9Realisation Statements
- X insert the function Xpredicator
- XY conflate the functions X and Y goal
subject - XgtY order X somewhere before Ysubject gt
predicator - X/A function X has grammatical feature
Ysubject/noun phrase - X!L assign function X to lexical item Lpassive!be
10Generation Procedure
- Traverse network from left to right, choosing the
appropriate features and collecting the
appropriate realisation statements. - Build an intermediate expression that obeys the
constraints set by the realisation statements. - Recurse back through the grammar at a lower level
for functions not fully specified.
11Example Input
- (
- process save-1
- actor system-1
- goal document-1
- speechact assertion
- tense future
- )
- N.B. This specification resembles that used by
PENMAN system (Mann 1983) based on KL-ONE
knowledge base.
12Generation 1
- Start with clause feature
- insert predicator and classify as verb
- Proceed to mood subsystem
- after interrogating input specification
(assertion is specified) choose indicative and
declarative features. - Insert subject and finite functions with ordering
subject gt finite gt predicator
13Output of Mood System
Mood subject finite predicator
14Generation 2
- Proceed to Transitivity subsystem.
- Assuming save-1 is a material process (from KB)
- Insert goal and process functions
- Conflate process with (finite, predicator) pair
- Proceed to Voice subsystem
- Choose Active feature and obey realisation
statements.
15Output of Transitivity System
Mood subject finite predicator object
Transitivity actor process process goal
16Generation 3
- Proceed to Theme subsystem
- Since there is no thematic specification in the
input, choose Unmarked Theme - Insert theme and rheme functions
- Conflate theme with subject and rheme with
predicator,object
17Output of Mood Subsystem
Mood subject finite predicator object
Transitivity actor process process goal
Theme theme rheme rheme rheme
18Generation 4
- Generation now recursively enters the grammar at
lower levels to fully specify - the phrases (noun phrase network, auxiliary
network not shown here) - lexical items (usually through entries in the
knowledge base) - and possibly morphological choices
19Result of Generation
the system will save the document
Mood subject finite predicator object
Transitivity actor process process goal
Theme theme rheme rheme rheme
20Functional Unification Grammar
- Build the generation grammar as a feature
structure (FS) - Build input specification as an FS
- Unify the two together (functional unification
operation). - Linearize result.
21Feature Structures
- Feature structures are essentially sets of
attribute value pairs
attribute1 value1 attribute2 value2 attribute3
value3
22Feature Structure 2
- These can be used to express facts of different
kinds
human facts
agreement facts
name mike height 156 eyes green
number sing gender masc case nom
23Feature Structures 3
- Furthermore, values can themselves be feature
structures
24Functional Unification
- The information in feature structures can be
combined together by means of the functional
unification (?) operation.
name mike height 156
eyes green
?
name mike height 156 eyes green
25Grammar as a Feature Structure
26Input Specification as a Feature Structure
cat S actor head lex system process head lex
save tense future goal head lex document
27Partial Result
cat S actor cat NP head lex system proces
s cat VP number actor number head lex save
tense future goal cat NP head lex docume
nt pattern (actor process goal)
28Full Result