Algorithms for AI and NLP (INF4820 TFSs)

Similar documents
Computational Linguistics (INF2820 TFSs)

Computational Linguistics (INF2820 TFSs)

Algorithms for AI and NLP (INF4820 Lisp & FSAs)

Ling 571: Deep Processing for Natural Language Processing

11-682: Introduction to IR, NLP, MT and Speech. Parsing with Unification Grammars. Reading: Jurafsky and Martin, Speech and Language Processing

Ling/CSE 472: Introduction to Computational Linguistics. 5/9/17 Feature structures and unification

Ling/CSE 472: Introduction to Computational Linguistics. 5/21/12 Unification, parsing with unification Meaning representation

The CKY Parsing Algorithm and PCFGs. COMP-599 Oct 12, 2016

Computational Linguistics: Feature Agreement

LKB User Manual. (excerpted from Implementing Typed Feature Structure Grammars) Ann Copestake ISBN:

Grammar Engineering for Deep Linguistic Processing SS2012

Einführung in die Computerlinguistik

Knowledge Engineering for NLP May 1, 2005 Clausal semantics

The CKY Parsing Algorithm and PCFGs. COMP-550 Oct 12, 2017

Wh-questions. Ling 567 May 9, 2017

Topics in Parsing: Context and Markovization; Dependency Parsing. COMP-599 Oct 17, 2016

CKY algorithm / PCFGs

Indexing Methods for Efficient Parsing with Typed Feature Structure Grammars

Systems Analysis and Design Methods Chapter 7: Data Modeling and Analysis

Context-Free Grammars

Context-Free Grammars. Carl Pollard Ohio State University. Linguistics 680 Formal Foundations Tuesday, November 10, 2009

CS 842 Ben Cassell University of Waterloo

Parsing Chart Extensions 1

Homework & NLTK. CS 181: Natural Language Processing Lecture 9: Context Free Grammars. Motivation. Formal Def of CFG. Uses of CFG.

Dependent Object Types - A foundation for Scala s type system

Context-Free Grammars

Dependency and (R)MRS

Database Design. 4-1 Supertypes and Subtypes. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Prelude COMP 181 Tufts University Computer Science Last time Grammar issues Key structure meaning Tufts University Computer Science

Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques. Fundamentals, Design, and Implementation, 9/e

Semantics and Pragmatics of NLP Propositional Logic, Predicates and Functions

Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page:

2 Ambiguity in Analyses of Idiomatic Phrases

Proseminar on Semantic Theory Fall 2013 Ling 720 An Algebraic Perspective on the Syntax of First Order Logic (Without Quantification) 1

1 Informal Motivation

Ling 571: Deep Processing for Natural Language Processing

LANGUAGE PROCESSORS. Presented By: Prof. S.J. Soni, SPCE Visnagar.

AUTOMATIC LFG GENERATION

A Data Modeling Process. Determining System Requirements. Planning the Project. Specifying Relationships. Specifying Entities

Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques. Fundamentals, Design, and Implementation, 9/e

Fundamentals, Design, and Implementation, 9/e Copyright 2004 Database Processing: Fundamentals, Design, and Implementation, 9/e by David M.

Turtles All The Way Down

Chapter 6. Advanced Data Modeling. Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel

On Learning Discontinuous Dependencies from Positive Data

CSI33 Data Structures

6.863J Natural Language Processing Lecture 7: parsing with hierarchical structures context-free parsing. Robert C. Berwick

User-Defined Nonmonotonicity in Unification-Based Formalisms

Algorithms for NLP. Chart Parsing. Reading: James Allen, Natural Language Understanding. Section 3.4, pp

Prolog-embedding typed feature structure grammar and grammar tool. Version 4.

Languages and Compilers

CS47300: Web Information Search and Management

Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition. Chapter 8 Data Modeling Advanced Concepts

Advanced PCFG algorithms

Object oriented programming Concepts

CIS 341 Final Examination 4 May 2017

Object-Oriented Programming More Inheritance

TDL A Type Description Language for HPSG Part 2: User Guide

Foo A Minimal Modern OO Calculus

CMSC 330: Organization of Programming Languages. Context Free Grammars

Object-Oriented ProgrammingInheritance & Polymorphism

CS 61A Interpreters, Tail Calls, Macros, Streams, Iterators. Spring 2019 Guerrilla Section 5: April 20, Interpreters.

Dependent Object Types - A foundation for Scala's type system

Syntax and Grammars 1 / 21

Describing Syntax and Semantics

CMSC 202. Generics II

Grammar Development with LFG and XLE. Miriam Butt University of Konstanz

Optimizing Typed Feature Structure Grammar Parsing through Non-Statistical Indexing

Name EID. (calc (parse '{+ {with {x {+ 5 5}} {with {y {- x 3}} {+ y y} } } z } ) )

Grammar Development with LFG and XLE. Miriam Butt University of Konstanz

Syntax and Semantics

Algorithms for NLP. Chart Parsing. Reading: James Allen, Natural Language Understanding. Section 3.4, pp

LING 510, Lab 3 September 23, 2013

CSE-505: Programming Languages. Lecture 20.5 Recursive Types. Zach Tatlock 2016

Elements of Language Processing and Learning lecture 3

Why Types Matter. Zheng Gao CREST, UCL

Introduction to Scheme

λ calculus is inconsistent

Types of parsing. CMSC 430 Lecture 4, Page 1

STRUCTURES AND STRATEGIES FOR STATE SPACE SEARCH

Symmetry in Type Theory

CS-XXX: Graduate Programming Languages. Lecture 17 Recursive Types. Dan Grossman 2012

Well-formed Default Unification in Non-deterministic Multiple Inheritance Hierarchies

October 19, 2004 Chapter Parsing

Database Foundations. 4-1 Oracle SQL Developer Data Modeler. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Comp 311: Sample Midterm Examination

INF4820: Algorithms for Artificial Intelligence and Natural Language Processing. Common Lisp Fundamentals

Homework & Announcements

Principles of Programming Languages COMP251: Syntax and Grammars

Imperative, OO and Functional Languages A C program is

Ontology Development. Farid Naimi

CSE 431S Type Checking. Washington University Spring 2013

Class Diagram. Classes consist of. Note that class diagrams contain only classes, not objects.

Compilers. Yannis Smaragdakis, U. Athens (original slides by Sam

DISCUSSION 5min 2/24/2009. DTD to relational schema. Inlining. Basic inlining

Compiler Design Concepts. Syntax Analysis

COMPUTER SCIENCE TRIPOS

Class Diagram. Classes consist of. Note that class diagrams contain only classes, not objects.

The Earley Parser

Parsing partially bracketed input

Principles of Programming Languages, Spring 2016 Assignment 5 Logic Programming

Transcription:

S Det N VP V The dog barked LTOP h 1 INDEX e 2 def q rel bark v rel prpstn m rel LBL h 4 dog n rel LBL h RELS LBL h 1 ARG0 x 5 LBL h 9 8 ARG0 e MARG h 3 RSTR h 6 ARG0 x 2 5 ARG1 x BODY h 5 7 HCONS h 3 = q h 9, h 6 = q h 8 Algorithms for AI and NLP (INF4820 TFSs) HEAD 1 SPR 2 SPR, COMPS COMPS 3 HEAD 1 SPR 2 COMPS 3 Stephan Oepen and Jan Tore Lønning Universitetet i Oslo {oe jtl }@ifi.uio.no

A (Simplified) PCFG Estimation Example S S S VP VP VP Kim V shot VP elephants P in PP pajamas Kim V loves cake P with PP chocolate Kim VP V arrived PP P in Oslo P(RHS LHS) CFG Rule S VP VP VP PP VP V PP P PP VP V Estimate rule probability from observed distribution; conditional probabilities: P(RHS LHS) = C(LHS, RHS) C(LHS) Natural Language Understanding (2)

Formally: Probabilistic Context-Free Grammars Formally, a context-free grammar (CFG) is a quadruple: C, Σ,P,S... P is a set of category rewrite rules (aka productions), each with a conditional probability P(RHS LHS), e.g.... Kim [0.6] snow [0.4]... for each rule α β 1, β 2,...,β n P : α C and β i C Σ; 1 i n;... for each α C, the probabilities of all rules R α... must sum to 1. Natural Language Understanding (3)

Limitations of Context-Free Grammar Agreement and Valency (For Example) That dog barks. That dogs barks. Those dogs barks. The dog chased a cat. The dog barks a cat. The dog chased. The dog chased a cat my neighbours. The cat was chased by a dog. The cat was chased of a dog.... Natural Language Understanding (4)

Unification-Based Grammar: Structured Categories All (constituent) categories in the grammar are typed feature structures; feature structures are recursive, record-like objects: attribute value sets; typing very similar to OO programming: a multipe-inheritance hierarchy; specific TFS configurations may correspond to traditional categories; labels like S or are mere abbreviations, not elements of the theory. word HEAD noun [ SPR HEAD det COMPS ] HEAD verb SPR COMPS HEAD verb [ SPR HEAD noun COMPS ] N S VP Natural Language Understanding (5)

The Type Hierarchy: Fundamentals Types represent groups of entities with similar properties ( classes ); types ordered by specificity: subtypes inherit properties of (all) parents; type hierarchy determines which types are compatible (and which not). *top* *list* *string* feat-struc *cons* *null* expression pos word noun verb det Natural Language Understanding (6)

Type Hierarchies: Multiple Inheritance flyer and swimmer no common descendants: they are incompatible; flyer and bee stand in hierarchical relationship: they unify to subtype; flyer and invertebrate have one unique greatest lower bound ( glb ). *top* animal flyer swimmer invertebrate vertebrate bee fish cod guppy Natural Language Understanding (7)

Typed Feature Structure Subsumption Typed feature structures can be partially ordered by information content; a more general structure is said to subsume a more specific one; *top* is the most general feature structure (while is inconsistent); ( square subset or equal ) conventionally used to depict subsumption. Feature structure F subsumes feature structure G (F G) iff: (1) if path p is defined in F then p is also defined in G and the type of the value of p in F is a supertype or equal to the type of the value of p in G, and (2) all paths that are reentrant in F are also reentrant in G. Natural Language Understanding (8)

Feature Structure Subsumption: Examples TFS 1 : TFS 3 : a b FOO x BAR x FOO y BAR x BAZ x TFS 2 : TFS 4 : a a FOO x BAR y FOO 1 x BAR 1 Hierarchy a FOO BAR b BAZ x y Feature structure F subsumes feature structure G (F G) iff: (1) if path p is defined in F then p is also defined in G and the type of the value of p in F is a supertype or equal to the type of the value of p in G, and (2) all paths that are reentrant in F are also reentrant in G. Natural Language Understanding (9)

Typed Feature Structure Unification Decide whether two typed feature structures are mutually compatible; determine combination of two TFSs to give the most general feature structure which retains all information which they individually contain; if there is no such feature structure, unification fails (depicted as ); unification monotonically combines information from both input TFSs; relation to subsumption the unification of two structures F and G is the most general TFS which is subsumed by both F and G (if it exists). ( square set intersection ) conventionally used to depict unification. Natural Language Understanding (10)

Typed Feature Structure Unification: Examples TFS 1 : TFS 3 : a b FOO x BAR x FOO y BAR x BAZ x TFS 2 : TFS 4 : a a FOO x BAR y FOO 1 x BAR 1 Hierarchy a FOO BAR b BAZ x y TFS 1 TFS 2 TFS 2 TFS 1 TFS 3 TFS 3 TFS 3 TFS 4 b FOO 1 y BAR 1 BAZ x Natural Language Understanding (11)

Typed Feature Structure Example (as AVM) HEAD verb ARGS *cons* FIRST word ORTH chased HEAD verb REST *cons* FIRST expression HEAD noun REST *null* Natural Language Understanding (12)

Typed Feature Structure Example (as Graph) HEAD verb ARGS *cons* FIRST word REST ORTH chased HEAD verb *cons* expression FIRST HEAD noun REST *null* Natural Language Understanding (13)

Reentrancy in a Typed Feature Structure (AVM) HEAD 1 verb ARGS *ne-list* FIRST word ORTH chased HEAD 1 REST *ne-list* FIRST expression HEAD noun REST *null* Natural Language Understanding (14)

Reentrancy in a Typed Feature Structure (Graph) HEAD verb ARGS HEAD *ne-list*first word ORTH chased REST expression *ne-list*first HEAD noun REST *null* Natural Language Understanding (15)