EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 2 Tutorials Revision of formalisation Interpreting logical statements in NL Form and Content of an Argument.

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

Artificial Intelligence: Natural Language and Prolog
Prolog programming....Dr.Yasser Nada. Chapter 8 Parsing in Prolog Taif University Fall 2010 Dr. Yasser Ahmed nada prolog programming....Dr.Yasser Nada.
Logic & Critical Reasoning Translation into Propositional Logic.
CSA2050: DCG I1 CSA2050 Introduction to Computational Linguistics Lecture 8 Definite Clause Grammars.
Grammars, constituency and order A grammar describes the legal strings of a language in terms of constituency and order. For example, a grammar for a fragment.
DEFINITE CLAUSE GRAMMARS Ivan Bratko University of Ljubljana Faculty of Computer and Information Sc.
Grammars.
Chapter Chapter Summary Languages and Grammars Finite-State Machines with Output Finite-State Machines with No Output Language Recognition Turing.
SYNTAX Introduction to Linguistics. BASIC IDEAS What is a sentence? A string of random words? If it is a sentence, does it have to be meaningful?
GRAMMAR & PARSING (Syntactic Analysis) NLP- WEEK 4.
Introduction and Jurafsky Model Resource: A Probabilistic Model of Lexical and Syntactic Access and Disambiguation, Jurafsky 1996.
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 3 Syntax of Propositional Logic Parse trees revised Construction of parse trees Semantics of propositional.
Introduction to Computability Theory
An Introduction to Propositional Logic Translations: Ordinary Language to Propositional Form.
Let remember from the previous lesson what is Knowledge representation
1 Note As usual, these notes are based on the Sebesta text. The tree diagrams in these slides are from the lecture slides provided in the instructor resources.
Chapter 3: Formal Translation Models
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 6 Limitations of propositional logic Introduction to predicate logic Symbols, terms and formulae, Parse.
EE1J2 – Discrete Maths Lecture 5 Analysis of arguments (continued) More example proofs Formalisation of arguments in natural language Proof by contradiction.
Lect. 11Phrase structure rules Learning objectives: To define phrase structure rules To learn the forms of phrase structure rules To compose new sentences.
Meaning and Language Part 1.
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 11 Introduction to Predicate Logic Limitations of Propositional Logic Predicates, quantifiers and propositions.
Context-Free Grammar CSCI-GA.2590 – Lecture 3 Ralph Grishman NYU.
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.
Grammars.
Introduction Syntax: form of a sentence (is it valid) Semantics: meaning of a sentence Valid: the frog writes neatly Invalid: swims quickly mathematics.
LING 388: Language and Computers Sandiway Fong Lecture 7.
GRAMMARS David Kauchak CS159 – Fall 2014 some slides adapted from Ray Mooney.
A sentence (S) is composed of a noun phrase (NP) and a verb phrase (VP). A noun phrase may be composed of a determiner (D/DET) and a noun (N). A noun phrase.
The Language of Mathematics Basic Grammar. A word to the wise The purpose of this tutorial is to get you to understand what equations and inequalities.
CSNB143 – Discrete Structure Topic 11 – Language.
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.
Context Free Grammars Reading: Chap 9, Jurafsky & Martin This slide set was adapted from J. Martin, U. Colorado Instructor: Rada Mihalcea.
Review of basic concepts.  The knowledge of sentences and their structure.  Syntactic rules include: ◦ The grammaticality of sentences ◦ Word order.
Daisy Arias Math 382/Lab November 16, 2010 Fall 2010.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
Rules, Movement, Ambiguity
Artificial Intelligence: Natural Language
The man bites the dog man bites the dog bites the dog the dog dog Parse Tree NP A N the man bites the dog V N NP S VP A 1. Sentence  noun-phrase verb-phrase.
Syntax The Structure of a Language. Lexical Structure The structure of the tokens of a programming language The scanner takes a sequence of characters.
CPSC 422, Lecture 27Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 27 Nov, 16, 2015.
SYNTAX.
◦ Process of describing the structure of phrases and sentences Chapter 8 - Phrases and sentences: grammar1.
Parsing and Code Generation Set 24. Parser Construction Most of the work involved in constructing a parser is carried out automatically by a program,
Section 1.1 Propositions and Logical Operations. Introduction Remember that discrete is –the study of decision making in non-continuous systems. That.
CAS LX b. Summarizing the fragment analysis, relative clauses.
GRAMMARS & PARSING. Parser Construction Most of the work involved in constructing a parser is carried out automatically by a program, referred to as a.
Discrete Mathematics Lecture # 1. Course Objectives  Express statements with the precision of formal logic.  Analyze arguments to test their validity.
Language and Cognition Colombo, June 2011 Day 2 Introduction to Linguistic Theory, Part 3.
NATURAL LANGUAGE PROCESSING
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
Formal grammars A formal grammar is a system for defining the syntax of a language by specifying sequences of symbols or sentences that are considered.
SYNTAX.
King Faisal University جامعة الملك فيصل Deanship of E-Learning and Distance Education عمادة التعلم الإلكتروني والتعليم عن بعد [ ] 1 King Faisal University.
10/31/00 1 Introduction to Cognitive Science Linguistics Component Topic: Formal Grammars: Generating and Parsing Lecturer: Dr Bodomo.
Knowledge Representation Lecture 2 out of 5. Last Week Intelligence needs knowledge We need to represent this knowledge in a way a computer can process.
Natural Language Processing Vasile Rus
Sentential logic. Lecture based on: Graeme Forbes, Modern Logic Katarzyna Paprzycka, online lectures.
Natural Language Processing Vasile Rus
5. Context-Free Grammars and Languages
Describing Syntax and Semantics
Logic.
Knowledge Representation and Reasoning
Natural Language Processing
Chapter Eight Syntax.
The Foundations: Logic and Proofs
Chapter Eight Syntax.
David Kauchak CS159 – Spring 2019
Logic of Informatics Introduction.
Presentation transcript:

EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 2 Tutorials Revision of formalisation Interpreting logical statements in NL Form and Content of an Argument Formalisation of NL – grammatical analysis, production rules, parsing, parse trees Propositional logic as a formal language – symbols and formulae Parsing and parse trees in Propositional Logic,

EE1J2 - Slide 2 Tutorial arrangements 3 Tutorial groups: X, Y and Z Thursdays 3pm, starting 31 st January X: Room 220/221, A Teye Y: Room 523, K Hussein Z: Room 521/522, G Philips Hand in work Tuesday before tutorial Drawers marked ‘X, Y, Z’ downstairs

EE1J2 - Slide 3 Revision - formalisation Either Arsenal, Leeds, Liverpool, or ManU will win the league. If neither ManU nor Arsenal win it, then Liverpool will win. If Leeds or Liverpool fail to win, then Arsenal will not win and ManU will win it.

EE1J2 - Slide 4 Elementary propositions A – Arsenal will win the league L – Leeds will win the league P – Liverpool will win the league M – ManU will win the league

EE1J2 - Slide 5 Formalised statement Either Arsenal, Leeds, Liverpool, or ManU will win the league (A  L  P  M) If neither ManU nor Arsenal win it, then Liverpool will win ((  M   A)  P) If Leeds or Liverpool fail to win, then Arsenal will not win and ManU will win it. ((  L   P)  (  A  M))

EE1J2 - Slide 6 Formalised Statement (A  L  P  M)  ((  M   A)  P)  ((  L   P)  (  A  M))

EE1J2 - Slide 7 Formalisation (continued) Statement If Polonius is not behind that curtain then Polonius is well Atomic propositions: C – Polonius is behind that curtain W – Polonius is well Formalisation in Propositional Logic: (  C)  W

EE1J2 - Slide 8 Interpreting logical statements in NL NL interpretation of propositional connectives ConnectiveInterpretation  p p not p, p does not hold, p is false p  q p and q, p but q, not only p but q, p while q, p despite q, p yet q, p although q p  q p or q, p or q or both, p and/or q, p unless q p  q p implies q, if p then q, q if p, p only if q, q when p, p is sufficient for q, p materially implies q

EE1J2 - Slide 9 Example Consider the statement p  q   r   s where: p – ‘the thief is young’ q – ‘the thief is hanged’ r – ‘the thief will grow old’ s – ‘the thief will steal In NL, this equates to: “if the thief is young and the thief is hanged, then the thief will neither grow old nor steal”

EE1J2 - Slide 10 Exclusive and inclusive OR The English word ‘or’ can be ambiguous. The two possible meanings are denoted by inclusive or and exclusive or Inclusive or is represented by the propositional connective  Exclusive or is represented by (p  q)   (p  q)

EE1J2 - Slide 11 Separating Form and Content If I play cricket or go to work, but not both, then I will not be going shopping. Therefore, if I go shopping then neither would I play cricket nor would I go to work An object remaining stationary or moving at a constant velocity means that there is no external force acting upon it. Therefore, if there is a force acting upon the object, it is not stationary and it is not moving at a constant velocity

EE1J2 - Slide 12 Form and Content Although the content is different, the forms are the same…

EE1J2 - Slide 13 Argument 1 If I play cricket or go to work, but not both, then I will not be going shopping. Therefore, if I go shopping then neither would I play cricket nor would I go to work. Atomic Propositions: P – I play cricket Q – I go to work R – I go shopping Formal Argument: ((P  Q)   (P  Q)   R)  (R  (  P)  (  Q))

EE1J2 - Slide 14 Argument 2 An object remaining stationary or moving at a constant velocity means that there is no external force acting upon it. Therefore, if there is a force acting upon the object, it is not stationary and it is not moving at a constant velocity Atomic propositions: S – the object is stationary M – the object is moving at a constant velocity F – there is an external force acting upon the object

EE1J2 - Slide 15 Argument 2 (cont.) Atomic propositions: S – the object is stationary M – the object is moving at a constant velocity F – there is an external force acting upon the object Formal Argument ((S  M)   (S  M)   F)  (F  (  S)  (  M))

EE1J2 - Slide 16 Re-cap Propositional logic motivated by analogies with natural language Formalisation of statements in NL ‘Naturalisation’ of formulae in PL Separation of form and meaning Now move on to study propositional logic as a formal language What is a formal language?

EE1J2 - Slide 17 Formalisation of Natural Language Remember grammar lessons in primary school? The purpose is to expose the underlying grammatical or syntactic structure of the sentence Or, to decide whether the given sentence is grammatical (i.e. in the language)

EE1J2 - Slide 18 Grammatical analysis in NL Consider S = “The cat devoured the tiny mouse” S is made up of of the noun phrase NP = ‘The cat’, and the verb phrase VP = ‘devoured the tiny mouse’

EE1J2 - Slide 19 Grammatical Analysis NP comprises the determiner ‘The’ and the noun ‘cat’ VP comprises the verb ‘devoured’ and the noun phrase ‘the tiny mouse’ The noun phrase ‘the tiny mouse’ comprises the determiner ‘the’, the adjective ‘tiny’, and the noun ‘mouse’

EE1J2 - Slide 20 Production Rules Formally, this analysis of the sentence is with respect to a set of production rules Production rules determine how non-terminal elements in a language can be expanded into sequences of non-terminal elements and terminal elements. The non-terminals are structures like ‘sentence’, ‘noun-phrase’, ‘verb-phrase’, ‘adjective, etc The terminals are actual words

EE1J2 - Slide 21 Production Rules The first production rule which we used was S  NP + VP Then we applied more production rules, formally denoted as: NP  DET + N VP  V + NP NP  DET + ADJ + N

EE1J2 - Slide 22 Parsing This process is called parsing The sequence of production rules which transforms S into the sequence of words in the sentence is a parse of the sentence.

EE1J2 - Slide 23 Grammatical sentences In a formal language, a sequence of words is a sentence in the language or is grammatical if and only if a parse of the word sequence exists

EE1J2 - Slide 24 Parse Trees The parse of the sentence “The cat devoured the tiny mouse” given by the above set of production rules can be represented simply, intuitively and usefully as a tree structure This tree structure is called a parse tree

EE1J2 - Slide 25 Parse Tree for “the cat devoured the tiny mouse” The cat devoured the tiny mouse DET ADJ NOUN DET NOUN VERB NP NP VP S

EE1J2 - Slide 26 Parsing in NL The bases of the branches of the tree correspond to non-terminal units of the language. The ‘leaves’ of the tree correspond to the terminal unit. Local structure of the tree at a non-terminal unit corresponds to the production rule employed in the parse

EE1J2 - Slide 27 Summary of Lecture 2 Revision of formalisation Interpreting logical statements in NL Form and Content of an Argument Formalisation of NL – grammatical analysis, production rules, parsing, parse trees Propositional logic as a formal language – symbols and formulae Parsing a formula in Propositional Logic