Computational language: week 10 Lexical Knowledge Representation concluded Syntax-based computational language Sentence structure: syntax Context free.

Slides:



Advertisements
Similar presentations
Natural Language Processing Syntax. Syntactic structure John likes Mary PN VtVt NP VP S DetPNVtVt NP VP S Every man likes Mary Noun.
Advertisements

Syntactic analysis using Context Free Grammars. Analysis of language Morphological analysis – Chairs, Part Of Speech (POS) tagging – The/DT man/NN left/VBD.
May 2006CLINT-LN Parsing1 Computational Linguistics Introduction Approaches to Parsing.
Grammars, Languages and Parse Trees. Language Let V be an alphabet or vocabulary V* is set of all strings over V A language L is a subset of V*, i.e.,
GRAMMAR & PARSING (Syntactic Analysis) NLP- WEEK 4.
Introduction and Jurafsky Model Resource: A Probabilistic Model of Lexical and Syntactic Access and Disambiguation, Jurafsky 1996.
March 1, 2009 Dr. Muhammed Al-Mulhem 1 ICS 482 Natural Language Processing Probabilistic Context Free Grammars (Chapter 14) Muhammed Al-Mulhem March 1,
CS Basic Parsing with Context-Free Grammars.
CS 4705 Lecture 7 Parsing with Context-Free Grammars.
CS 4705 Basic Parsing with Context-Free Grammars.
Chapter 3: Formal Translation Models
Parsing SLP Chapter 13. 7/2/2015 Speech and Language Processing - Jurafsky and Martin 2 Outline  Parsing with CFGs  Bottom-up, top-down  CKY parsing.
Dr. Ansa Hameed Syntax (4).
Models of Generative Grammar Smriti Singh. Generative Grammar  A Generative Grammar is a set of formal rules that can generate an infinite set of sentences.
1 Basic Parsing with Context Free Grammars Chapter 13 September/October 2012 Lecture 6.
March 1, 2009 Dr. Muhammed Al-Mulhem 1 ICS 482 Natural Language Processing INTRODUCTION Muhammed Al-Mulhem March 1, 2009.
11 CS 388: Natural Language Processing: Syntactic Parsing Raymond J. Mooney University of Texas at Austin.
Context Free Grammars Reading: Chap 12-13, Jurafsky & Martin This slide set was adapted from J. Martin, U. Colorado Instructor: Paul Tarau, based on Rada.
Lecture 12: 22/6/1435 Natural language processing Lecturer/ Kawther Abas 363CS – Artificial Intelligence.
1.Syntax: the rules of sentence formation; the component of the mental grammar that represent speakers’ knowledge of the structure of phrase and sentence.
1 CPE 480 Natural Language Processing Lecture 5: Parser Asst. Prof. Nuttanart Facundes, Ph.D.
For Monday Read chapter 23, sections 1-2 FOIL exercise due.
Tree-adjoining grammar (TAG) is a grammar formalism defined by Aravind Joshi and introduced in Tree-adjoining grammars are somewhat similar to context-free.
LINGUISTICA GENERALE E COMPUTAZIONALE ANALISI SINTATTICA (PARSING)
CS : Language Technology for the Web/Natural Language Processing Pushpak Bhattacharyya CSE Dept., IIT Bombay Constituent Parsing and Algorithms (with.
May 2006CLINT-LN Parsing1 Computational Linguistics Introduction Parsing with Context Free Grammars.
NLP. Introduction to NLP Is language more than just a “bag of words”? Grammatical rules apply to categories and groups of words, not individual words.
October 2005csa3180: Parsing Algorithms 11 CSA350: NLP Algorithms Sentence Parsing I The Parsing Problem Parsing as Search Top Down/Bottom Up Parsing Strategies.
PARSING David Kauchak CS159 – Spring 2011 some slides adapted from Ray Mooney.
Context Free Grammars Reading: Chap 9, Jurafsky & Martin This slide set was adapted from J. Martin, U. Colorado Instructor: Rada Mihalcea.
1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Fall 2005-Lecture 4.
For Wednesday Read chapter 23 Homework: –Chapter 22, exercises 1,4, 7, and 14.
Parsing with Context-Free Grammars for ASR Julia Hirschberg CS 4706 Slides with contributions from Owen Rambow, Kathy McKeown, Dan Jurafsky and James Martin.
Rules, Movement, Ambiguity
CSA2050 Introduction to Computational Linguistics Parsing I.
Basic Parsing Algorithms: Earley Parser and Left Corner Parsing
PARSING 2 David Kauchak CS159 – Spring 2011 some slides adapted from Ray Mooney.
csa3050: Parsing Algorithms 11 CSA350: NLP Algorithms Parsing Algorithms 1 Top Down Bottom-Up Left Corner.
CS 4705 Lecture 7 Parsing with Context-Free Grammars.
December 2011CSA3202: PCFGs1 CSA3202: Human Language Technology Probabilistic Phrase Structure Grammars (PCFGs)
CSA3050: NLP Algorithms Sentence Grammar NLP Algorithms.
NATURAL LANGUAGE PROCESSING
November 2004csa3050: Parsing Algorithms 11 CSA350: NLP Algorithms Parsing Algorithms 1 Top Down Bottom-Up Left Corner.
CS : Language Technology for the Web/Natural Language Processing Pushpak Bhattacharyya CSE Dept., IIT Bombay Parsing Algos.
Mid-Terms Exam Scope and Introduction. Format Grades: 100 points -> 20% in the final grade Multiple Choice Questions –8 questions, 7 points each Short.
Organization of Programming Languages Meeting 3 January 15, 2016.
Chapter 3 – Describing Syntax CSCE 343. Syntax vs. Semantics Syntax: The form or structure of the expressions, statements, and program units. Semantics:
10/31/00 1 Introduction to Cognitive Science Linguistics Component Topic: Formal Grammars: Generating and Parsing Lecturer: Dr Bodomo.
Roadmap Probabilistic CFGs –Handling ambiguity – more likely analyses –Adding probabilities Grammar Parsing: probabilistic CYK Learning probabilities:
Natural Language Processing Vasile Rus
Chapter 3 – Describing Syntax
CS 404 Introduction to Compiler Design
Programming Languages Translator
Parsing and Parser Parsing methods: top-down & bottom-up
Basic Parsing with Context Free Grammars Chapter 13
Table-driven parsing Parsing performed by a finite state machine.
What does it mean? Notes from Robert Sebesta Programming Languages
CS : Speech, NLP and the Web/Topics in AI
LING/C SC/PSYC 438/538 Lecture 21 Sandiway Fong.
Probabilistic and Lexicalized Parsing
CPSC 503 Computational Linguistics
CS 388: Natural Language Processing: Syntactic Parsing
Probabilistic and Lexicalized Parsing
Natural Language - General
Chapter 2: A Simple One Pass Compiler
Lecture 7: Introduction to Parsing (Syntax Analysis)
R.Rajkumar Asst.Professor CSE
CSA2050 Introduction to Computational Linguistics
Parsing I: CFGs & the Earley Parser
Presentation transcript:

Computational language: week 10 Lexical Knowledge Representation concluded Syntax-based computational language Sentence structure: syntax Context free grammars Phrase Structure rules Parsing with phrase structure grammars

Lexical Knowledge Representation concluded

Modelling verbs in DATR Think Present 1 st person singular think (I think) 2 nd person singular think (you think) 3 rd person singular thinks (she thinks) 1 st person plural think (we think) 2 nd person plural think (you two think) 3 rd person plural think (they think)

Lexical knowledge representation continued Summary Inheritance Inference rules Formalism Computable

Syntax-based computational language

Sentence structure Units of the sentence are constituents Constituent: a group of words treated as a single unit Minimum constituent is the word Structure of the sentence: syntax

Structure of sentences: syntax what is syntax? “characteriz[ing] the relation between semantic predicate-argument relations and the superficial word and phrase configurations by which a language expresses them” (Kaplan 2003)

Structure of sentences: syntax (a)John saw Marysyntactic level (b)saw (John 1, Mary 2 )semantic level (c)Mary was seen by Johnsyntactic level (d)Mary sent John bookssyntactic level (e)sent (Mary 1, John 2, books 3 )semantic level (f)saw: 1 = agent, 2 = patient (g)sent: 1 = agent, 2 = goal, 3 = patient

Structure of sentences: syntax MaxmetJane Max gave Jane bananas

Structure of sentences: syntax N VN MaxmetJane NVN N Max gave Jane bananas

Structure of sentences: syntax The boys watched the game

Structure of sentences: syntax [The boys] watched [the game]

Structure of sentences: syntax [The boys] watched [the game] The boys from Brazil watched an interesting game on TV

Structure of sentences: syntax [The boys] watched [the game] [The boys from Brazil] watched [an interesting game on TV]

Structure of sentences: syntax [The boys] watched [the game] [The boys from Brazil]l watched [an interesting game on TV] My mother sent Mary a recipe

Structure of sentences: syntax [The boys] watched [the game] [The boys from Brazil]l watched [an interesting game on TV] [My mother] sent Mary [a recipe]

Structure of sentences: syntax [The boys] watched [the game] [The boys from Brazil]l watched [an interesting game on TV] [My mother] sent [a recipe] to Mary My mother in London sent my sister the wrong recipe

Structure of sentences: syntax NP V NP [The boys] watched [the game] NP V NP [The boys from Brazil] watched [an interesting game on TV] NP V NP NP [My mother] sent Mary [a recipe] NP V NP NP [My mother in London] sent [my sister] [the wrong recipe]

Context Free Grammars Taking linear strings as input Producing non-linear hierarchical data structures (graphs) as outputs Assumption: sentences have a constituent structure

Hierarchical structure 1. My mother likes her cats

Hierarchical structure 1. My mother likes her cats

Hierarchical structure 1. My mother likes her cats

Hierarchical structure 1. My mother likes her cats

Hierarchical structure 1. My mother likes her cats

Context Free Grammars Phrase structure rules Item(s) to right of arrow is an ordered list of symbols Item to left is a generalization over this list Start symbol Rules unordered

Context Free Grammars Phrase structure rules The student enjoys maths The birds sang The relatives of my husband live in Chicago The student drove his car into the tree

Context Free Grammars Formal language Set of strings derivable from designated start symbol S Strings are ‘grammatical’ sentences

Context Free Grammars Four parameters Set of non-terminal symbols or variables Set of terminal symbols (found in lexicon) Set of phrase structure rules Designated start symbol

Computable grammars The evaluation of a grammar: Its ability to capture significant generalizations within the specific grammar of a given language, and across the grammars of different languages

Context Free Grammars / Phrase Structure Grammars (PSG) Historical note Popularised by Chomsky Chomsky’s Transformational Grammar Famous computable example: Generalised Phrase Structure Grammar (Gazdar et al.)

Sentence parsing recognize / accept a sentence generate sentences

Sentence parsing recognize / accept a sentence generate sentences parsing: assign correct structure to a sentence i.e. match a sentence to the correct parse tree of the number of parse trees generated by a grammar

Sentence parsing my mother likes her cats

Sentence parsing the set of possible trees generated by the grammar is the search space parsing is searching through the space to find correct tree for the given sentence goal: find all trees which: 1. have their root in S 2. cover no more or less the words in the input

Sentence parsing Two methods 1. top-down parsing The tree must have S as its root Deduction reasoning Rule-driven

Sentence parsing Two methods 1. top-down parsing 2. bottom-up parsing The tree must have n number of leaves, and the following terminal symbols: x, y, z Induction reasoning Data-driven

Sentence parsing Two methods 1. top-down parsing trees grown downward to syntactic category nodes trees rejected if leaf nodes do not line up with all words in input

Sentence parsing Two methods 2. bottom-up parsing trees grown upwards from the input sentence, using the grammar

Sentence parsing Two methods

Sentence parsing Top-down Parallel Depth-first, left-to-right: fully expand each partial tree beginning at the left-most node

Sentence parsing Top-down Bottom-up filtering Left-corner table

Sentence parsing Top-down Bottom-up filtering Left-corner table

Sentence parsing Problems Left recursion Grammar has a non-terminal symbol that has a expansion that includes itself AND it is the left-most symbol in the expansion e.g. NP -> NP PP

Sentence parsing Problems Structural ambiguity A given input sentence fits more than one candidate parse tree e.g. my friend saw the man with the telescope … NP -> NP PP VP -> V NP PP …

Sentence parsing Applications Grammar checker Semantic analysis