Introduction to Tactical Generation with HPSG

Similar documents
Pre-Processing MRSes

An Interactive Intelligent Language Tutor Over The Internet

CS 598 Natural Language Processing

Syntax Parsing 1. Grammars and parsing 2. Top-down and bottom-up parsing 3. Chart parsers 4. Bottom-up chart parsing 5. The Earley Algorithm

Compositional Semantics

Introduction to HPSG. Introduction. Historical Overview. The HPSG architecture. Signature. Linguistic Objects. Descriptions.

The Interface between Phrasal and Functional Constraints

Parsing of part-of-speech tagged Assamese Texts

AQUA: An Ontology-Driven Question Answering System

The presence of interpretable but ungrammatical sentences corresponds to mismatches between interpretive and productive parsing.

Testing A Moving Target: How Do We Test Machine Learning Systems? Peter Varhol Technology Strategy Research, USA

Objectives. Chapter 2: The Representation of Knowledge. Expert Systems: Principles and Programming, Fourth Edition

Natural Language Processing. George Konidaris

Proof Theory for Syntacticians

Basic Parsing with Context-Free Grammars. Some slides adapted from Julia Hirschberg and Dan Jurafsky 1

Implementing the Syntax of Japanese Numeral Classifiers

Hindi Aspectual Verb Complexes

Grammars & Parsing, Part 1:

ENGBG1 ENGBL1 Campus Linguistics. Meeting 2. Chapter 7 (Morphology) and chapter 9 (Syntax) Pia Sundqvist

A Version Space Approach to Learning Context-free Grammars

A Minimalist Approach to Code-Switching. In the field of linguistics, the topic of bilingualism is a broad one. There are many

The Strong Minimalist Thesis and Bounded Optimality

SINGLE DOCUMENT AUTOMATIC TEXT SUMMARIZATION USING TERM FREQUENCY-INVERSE DOCUMENT FREQUENCY (TF-IDF)

"f TOPIC =T COMP COMP... OBJ

Feature-Based Grammar

CEFR Overall Illustrative English Proficiency Scales

Aspectual Classes of Verb Phrases

A Case Study: News Classification Based on Term Frequency

Informatics 2A: Language Complexity and the. Inf2A: Chomsky Hierarchy

Process improvement, The Agile Way! By Ben Linders Published in Methods and Tools, winter

A Framework for Customizable Generation of Hypertext Presentations

Generation of Referring Expressions: Managing Structural Ambiguities

Specification and Evaluation of Machine Translation Toy Systems - Criteria for laboratory assignments

Rover Races Grades: 3-5 Prep Time: ~45 Minutes Lesson Time: ~105 minutes

The Smart/Empire TIPSTER IR System

The Internet as a Normative Corpus: Grammar Checking with a Search Engine

Citrine Informatics. The Latest from Citrine. Citrine Informatics. The data analytics platform for the physical world

Psychology and Language

Artificial Neural Networks written examination

Context Free Grammars. Many slides from Michael Collins

ReinForest: Multi-Domain Dialogue Management Using Hierarchical Policies and Knowledge Ontology

White Paper. The Art of Learning

Using Motivational Interviewing for Coaching

Process to Identify Minimum Passing Criteria and Objective Evidence in Support of ABET EC2000 Criteria Fulfillment

Modeling user preferences and norms in context-aware systems

Intra-talker Variation: Audience Design Factors Affecting Lexical Selections

What is a Mental Model?

Building an HPSG-based Indonesian Resource Grammar (INDRA)

Module 12. Machine Learning. Version 2 CSE IIT, Kharagpur

A Grammar for Battle Management Language

Chapter 2 Rule Learning in a Nutshell

Jacqueline C. Kowtko, Patti J. Price Speech Research Program, SRI International, Menlo Park, CA 94025

How to analyze visual narratives: A tutorial in Visual Narrative Grammar

Writing Research Articles

A relational approach to translation

Derivational: Inflectional: In a fit of rage the soldiers attacked them both that week, but lost the fight.

An Introduction to the Minimalist Program

Construction Grammar. University of Jena.

WSU Five-Year Program Review Self-Study Cover Page

EdIt: A Broad-Coverage Grammar Checker Using Pattern Grammar

Lecturing Module

Towards a Machine-Learning Architecture for Lexical Functional Grammar Parsing. Grzegorz Chrupa la

Specifying Logic Programs in Controlled Natural Language

Approaches to control phenomena handout Obligatory control and morphological case: Icelandic and Basque

NAME: East Carolina University PSYC Developmental Psychology Dr. Eppler & Dr. Ironsmith

Chinese Language Parsing with Maximum-Entropy-Inspired Parser

On the Notion Determiner

RANKING AND UNRANKING LEFT SZILARD LANGUAGES. Erkki Mäkinen DEPARTMENT OF COMPUTER SCIENCE UNIVERSITY OF TAMPERE REPORT A ER E P S I M S

A R "! I,,, !~ii ii! A ow ' r.-ii ' i ' JA' V5, 9. MiN, ;

An Approach to Polarity Sensitivity and Negative Concord by Lexical Underspecification

Deep search. Enhancing a search bar using machine learning. Ilgün Ilgün & Cedric Reichenbach

Linking Task: Identifying authors and book titles in verbose queries

11/29/2010. Statistical Parsing. Statistical Parsing. Simple PCFG for ATIS English. Syntactic Disambiguation

A General Class of Noncontext Free Grammars Generating Context Free Languages

Rubric for Scoring English 1 Unit 1, Rhetorical Analysis

The Semantics of Prepositions: An exploration into the uses of "at" and "to"

Transfer Learning Action Models by Measuring the Similarity of Different Domains

The MEANING Multilingual Central Repository

Reinforcement Learning by Comparing Immediate Reward

Semi-supervised methods of text processing, and an application to medical concept extraction. Yacine Jernite Text-as-Data series September 17.

Designing a Speech Corpus for Instance-based Spoken Language Generation

UNIVERSITY OF OSLO Department of Informatics. Dialog Act Recognition using Dependency Features. Master s thesis. Sindre Wetjen

Prediction of Maximal Projection for Semantic Role Labeling

Iterative Cross-Training: An Algorithm for Learning from Unlabeled Web Pages

Learning Optimal Dialogue Strategies: A Case Study of a Spoken Dialogue Agent for

CONCEPT MAPS AS A DEVICE FOR LEARNING DATABASE CONCEPTS

Type Theory and Universal Grammar

CS Machine Learning

Explanation-Aware Army Builder for Warhammer 40k

On Human Computer Interaction, HCI. Dr. Saif al Zahir Electrical and Computer Engineering Department UBC

How to Judge the Quality of an Objective Classroom Test

Chapter 4: Valence & Agreement CSLI Publications

Outline. Web as Corpus. Using Web Data for Linguistic Purposes. Ines Rehbein. NCLT, Dublin City University. nclt

PRODUCT PLATFORM DESIGN: A GRAPH GRAMMAR APPROACH

UNDERSTANDING DECISION-MAKING IN RUGBY By. Dave Hadfield Sport Psychologist & Coaching Consultant Wellington and Hurricanes Rugby.

Constraining X-Bar: Theta Theory

Controlled vocabulary

A Usage-Based Approach to Recursion in Sentence Processing

COMPUTATIONAL COMPLEXITY OF LEFT-ASSOCIATIVE GRAMMAR

Type-driven semantic interpretation and feature dependencies in R-LFG

Transcription:

Introduction to Tactical Generation with HPSG Woodley Packard University of Washington March 5, 2013

Introduction Natural Language Generation: the task of automatically producing natural language utterances Tactical NLG: deciding how to convey a particular meaning (Strategic NLG: deciding what meaning to convey, when, to whom) This NLP task dichotomy can be traced at least as far back as (McKeown 1982).

Tactical NLG How to convey a particular meaning... what do we mean by a meaning? Fixed shape: result of a database query or a simulation Unpredictable shape: general semantic representation, e.g. minimal recursion semantics [Copestake et al., 2005]

Fixed shaped meanings Example: a weather station predicts the temperature for the next week. meaning to be conveyed: values or trend of those predictions possible solution, templates, e.g.: Temperatures are expected to <<rise or fall>>, reaching <<extreme value>> on <<day>>. Easy to produce a well-formed result; hard to make it sound both natural and unrepeatitive.

Logical forms as input MRS : ( TOP = h 1, { h 15 : asleep(x 11 ) h 1 : think(x 3,h 8 ) the(x 3,h 2 ) the(x 11,h 4 ) h 4 : dog(x 11 ) h 2 : cat(x 3 ) }, { h 8 = q h 15 } ) Approximately equivalent to three predicate logics: Option 1 : x 3.cat(x 3 ) : think(x 3, x 11.dog(x 11 ) : asleep(x 11 )) Option 2 : x 3.cat(x 3 ) : x 11.dog(x 11 ) : think(x 3,asleep(x 11 )) Option 3 : x 11.dog(x 11 ) : x 3.cat(x 3 ) : think(x 3,asleep(x 11 ))... which all mean the same thing (I m using to denote this somewhat slippery the quantifier).

Logical forms as input Given an MRS m and a grammar g, produce: 1. All strings s where g(s) = m. The cat thought the dog was asleep. The cat thought that the dog was asleep. 2. What about g(s) m? Sometimes, e.g. to let the input underspecify certain pieces of information. But no new EPs. The cats thought that the dogs were sleeping. 3. What about m g(s)? Not good enough. The cat thought.

Briefly: Motivation In real life, what are m and s? 1. Paraphrasing: m produced by parsing another string 2. Machine translation: m produced by parsing a string in another language 3. Summarization: m is a patchwork from parses of lots of sentences 4. Deep template-based NLG: m is mostly static, with a few parts filled in from a DB query / weather station

But how? 1. We know how to parse: i.e. given an input string s and a grammar g, compute: m = g(s) 2. We want to compute: {s Σ : m g(s)}.

Idea 1: Brute Force R = {} for s Σ do compute g(s) if m g(s) then R = R {s} end if end for return R 1. Problem: complexity is atrocious (infinite). 2. Limit to at most N letters; Σ N strings to parse, each taking O(N 3 ) time. 3. With Σ = [A Za z0 9.?!], too slow for N > 2 or so. 4. We could generate Hi, but maybe not Bye

Idea 1: Post mortem Idea 1 searched lots of strings that: 1. weren t words, e.g.: Zqf.9f, oooof11 2. weren t grammatical, e.g. dinosaurs dinosaur dinosaurs dinosaurs dinosaurs 3. weren t relevant, e.g. Dinosaurs drink coffee. when we want Dogs chase cats. Theme: wasting time on irrelevant strings.

Idea 2: Brute Force, improved R = {} V = relevant words(m) for s V do compute g(s) if m g(s) then R = R {s} end if end for return R 1. Still need to limit infinite search V to, say, N words. 2. To generate The cat thought the dog was asleep., minimally need V = 6 and N = 7 (in practice, V = 13); 6 7 = 279936 candidate seven-word sentences to parse at 65ms each; roughly 5 hours. 3. Tractable for modest N, but not fast.

Idea 2: Sidenote on Relevant Words How do we compute V = relevant words(m)? 1. Any given EP in m can only be produced by a small list of grammar signs; straightforward to retrieve all possible grammar signs that could produce any of the input EPs. 2. That s not enough; some words are syntactically required but don t show up in the logical form at all (e.g. was in our example). 3. Hand-written rules to trigger vacuous lexemes

Idea 2: Post mortem Idea 2 was a lot better than idea 1, but still wasted time on: 1. ungrammatical strings, e.g. asleep asleep asleep asleep asleep 2. irrelevant strings, e.g. The dog thought the cats were dogs. 3. Phrases like the cat and the dog was asleep may be tried and needlessly reparsed thousands of times as common substrings of disparate hypotheses.

Idea 3: Dynamic Programming R = {},C = {},A = {(w,fs(w)) w relevant words(m)} while a = next(a) do if length(a) > max length then continue end if for (b,r) C rules(g) do if applicable(r,a,b) then A.add(apply(r, a, b)) end if if applicable(r,b,a) then A.add(apply(r, b, a)) end if end for C.add(a) if meaning(a) = m then print R end if end while

Idea 3: Analysis 1. Only grammatical strings are considered much faster. 2. Don t have to parse candidates; their meaning is directly available. 3. Commenting out three lines in ACE to approximate this algorithm: The cat thought the dog was asleep. takes about 5 minutes, explores 169618 hypotheses. 4. Lots of unnecessary hypotheses are still generated, e.g.: as though the cat asleep was thinking 5. New idea: a phrase whose meaning is not compatible with the goal meaning cannot be a constituent in the result. [Shieber, 1988]

Idea 4: Block Some Erroneous Hypotheses function applicable((rule, a, b)): Boolean if (rule,a,b) is not unifiable then return FALSE end if m = meaning(apply(rule,a,b)) if m contradicts m then return FALSE else return TRUE end if end function 1. Actual implementation: augment initial hypotheses feature structures with information from m in such a way that if m contradicts m then (rule,a,b) will not be unifiable. 2. Enabling this in ACE: The cat thought the dog was asleep. takes 90 milliseconds, explores 818 hypotheses!

Other Optimizations Do not throw paper or other litter on the paths and in the terrain. 14 words, 17 EPs. 1. Idea 4: 23.6 seconds, 28647 hypotheses. 2. With ambiguity packing: 1.8 seconds, 4734 hypotheses. 3. With index accessibility filtering: 0.5 seconds, 2275 hypotheses. 4. See [Carroll and Oepen, 2005] for those optimizations. 5. Modern engines (LKB, AGREE, ACE) deploy all these optimizations. 6. Generation is frequently faster than parsing! 7. <joke> Maybe we can speed up parsing by enumerating all MRSes and generating from them! </joke>

Bibliography J. Carroll and S. Oepen. High efficiency realization for a wide-coverage unification grammar. Natural Language Processing IJCNLP 2005, pages 165 176, 2005. A. Copestake, D. Flickinger, C. Pollard, and I.A. Sag. Minimal recursion semantics: An introduction. Research on Language & Computation, 3(2):281 332, 2005. Kathleen R McKeown. The text system for natural language generation: An overview. In Proceedings of the 20th annual meeting on Association for Computational Linguistics, pages 113 120. Association for Computational Linguistics, 1982. Stuart M Shieber. A uniform architecture for parsing and generation. In Proceedings of the 12th conference on Computational linguistics-volume 2, pages 614 619. Association for Computational Linguistics, 1988.