NLP. Introduction to NLP What is the meaning of: (5+2)*(4+3)? Parse tree 5 24 3 N N N N + + E E E E F F* FE E E 49.

Slides:



Advertisements
Similar presentations
Logic Use mathematical deduction to derive new knowledge.
Advertisements

Logic.
Computability and Complexity 8-1 Computability and Complexity Andrei Bulatov Logic Reminder.
Logic in general Logics are formal languages for representing information such that conclusions can be drawn Syntax defines the sentences in the language.
1 CA 208 Logic Ex3 Define logical entailment  in terms of material implication  Define logical consequence |= (here the semantic consequence relation.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 9 Jim Martin.
Logical Agents Chapter 7. Why Do We Need Logic? Problem-solving agents were very inflexible: hard code every possible state. Search is almost always exponential.
Knowledge Representation & Reasoning (Part 1) Propositional Logic chapter 6 Dr Souham Meshoul CAP492.
Logical Agents Chapter 7. Why Do We Need Logic? Problem-solving agents were very inflexible: hard code every possible state. Search is almost always exponential.
Knoweldge Representation & Reasoning
Let remember from the previous lesson what is Knowledge representation
Logical Agents Chapter 7 Feb 26, Knowledge and Reasoning Knowledge of action outcome enables problem solving –a reflex agent can only find way from.
Propositional Logic: Logical Agents (Part I) This lecture topic: Propositional Logic (two lectures) Chapter (this lecture, Part I) Chapter 7.5.
Adapted from Discrete Math
BY: MISS FARAH ADIBAH ADNAN IMK. CHAPTER OUTLINE: PART III 1.3 ELEMENTARY LOGIC INTRODUCTION PROPOSITION COMPOUND STATEMENTS LOGICAL.
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes Jan 19, 2012.
Propositional Logic: Logical Agents (Part I) This lecture topic: Propositional Logic (two lectures) Chapter (this lecture, Part I) Chapter 7.5.
Fall 98 Introduction to Artificial Intelligence LECTURE 7: Knowledge Representation and Logic Motivation Knowledge bases and inferences Logic as a representation.
Pattern-directed inference systems
1 Logical Agents CS 171/271 (Chapter 7) Some text and images in these slides were drawn from Russel & Norvig’s published material.
Logic Disjunction A disjunction is a compound statement formed by combining two simple sentences using the word “OR”. A disjunction is true when at.
Lecture 4. CONDITIONAL STATEMENTS: Consider the statement: "If you earn an A in Math, then I'll buy you a computer." This statement is made up of two.
CSE LOGIC1 Propositional Logic An “adventure game” example Thinking?
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes Jan 17, 2012.
Logical Agents Chapter 7. Knowledge bases Knowledge base (KB): set of sentences in a formal language Inference: deriving new sentences from the KB. E.g.:
1 Logical Agents CS 171/271 (Chapter 7) Some text and images in these slides were drawn from Russel & Norvig’s published material.
1 Logical Agents Chapter 7. 2 A simple knowledge-based agent The agent must be able to: –Represent states, actions, etc. –Incorporate new percepts –Update.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
Thinking Mathematically
CS6133 Software Specification and Verification
Propositional Logic Predicate Logic
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
CS2351 Artificial Intelligence Bhaskar.V Class Notes on Knowledge Representation - Logical Agents.
LOGIC. Logic in general  Logics are formal languages for representing information such that conclusions can be drawn  Syntax defines the sentences in.
Dr. Shazzad Hosain Department of EECS North South Universtiy Lecture 04 – Part B Propositional Logic.
Propositional Logic Rather than jumping right into FOL, we begin with propositional logic A logic involves: §Language (with a syntax) §Semantics §Proof.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 1 Back to “Serious” Topics… Knowledge Representation.
Artificial Intelligence Logical Agents Chapter 7.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 04 : Logic.
Logical Agents. Inference : Example 1 How many variables? 3 variables A,B,C How many models? 2 3 = 8 models.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Simple Logic.
Chapter 1 Propositional Logic
Propositional Logic: Logical Agents (Part I)
Presented by: Tutorial Services The Math Center
Propositional Logic (a.k.a. Sentential Logic)
DISCRETE MATHEMATICS CHAPTER I.
Knowledge Representation and Reasoning
Knowledge and reasoning – second part
The Propositional Calculus
ARTIFICIAL INTELLIGENCE
Introduction to Knowledge-bases
Knowledge Representation
EA C461 – Artificial Intelligence Logical Agent
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 20
Logical Agents Chapter 7.
Knowledge and reasoning – second part
Back to “Serious” Topics…
Discrete Mathematics Lecture 2: Propositional Logic
Logical Agents Chapter 7.
Logical Agents Chapter 7.
MAT 3100 Introduction to Proof
Chapter 7. Propositional and Predicate Logic
Discrete Mathematics Lecture 2: Propositional Logic
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
Logical Agents Chapter 7 Andreas Geyer-Schulz and Chuck Dyer
Logical Agents Prof. Dr. Widodo Budiharto 2018
Presentation transcript:

NLP

Introduction to NLP

What is the meaning of: (5+2)*(4+3)? Parse tree N N N N + + E E E E F F* FE E E 49

What if we had (5+2)*(4+z)? 5 24 z N N N N + + E E E E F F* FE E E mult(add(5,2),add(4,z))

Every human is mortal. ??

Capturing the meaning of linguistic utterances using formal notation Linguistic meaning –“It is 8 pm” Pragmatic meaning –“It is time to leave” Semantic analysis: –Assign each word a meaning –Combine the meanings of words into sentences I bought a book: ∃ x,y: Buying(x) ^ Buyer(speaker,x) ^ BoughtItem(y,x) ^ Book(y) Buying (Buyer=speaker, BoughtItem=book)

NLP

Introduction to NLP

If an agent hears a sentence and can act accordingly, the agent is said to understand it Example –Leave the book on the table Understanding may involve inference –Maybe the book is wrapped in paper? And pragmatics –Which book? Which table? So, understanding may involve a procedure

Verifiability –Can a statement be verified against a knowledge base (KB) –Example: does my cat Martin have whiskers? Unambiguousness –Give me the book –Which book? Canonical form Expressiveness –Can the formalism express temporal relations, beliefs, …? –Is it domain-independent? Inference

One traditional approach is to use logic representations, e.g., FOL (first order logic) One can then use theorem proving (inference) to determine whether one statement entails another

The simplest type of logic The proposition symbols P 1, P 2, … are sentences –If S is a sentence,  S is a sentence (negation) –If S 1 and S 2 are sentences, S 1  S 2 is a sentence (conjunction) –If S 1 and S 2 are sentences, S 1  S 2 is a sentence (disjunction) –If S 1 and S 2 are sentences, S 1  S 2 is a sentence (implication) –If S 1 and S 2 are sentences, S 1  S 2 is a sentence (biconditional)

Sentence → AtomicSentence | ComplexSentence AtomicSentence → True | False | S | T | U... ComplexSentence → (Sentence) |  Sentence | Sentence  Sentence | Sentence  Sentence | Sentence  Sentence | Sentence  Sentence

 (highest)     (lowest)

A = Today is a holiday. B = We are going to the park. A ⇒ B A ∧ ¬ B ¬ A ⇒ ¬ B ¬ B ⇒ ¬ A B ⇒ A

A = Today is a holiday. B = We are going to the park. A ⇒ B If today is a holiday, we are going to the park. A ∧ ¬ B Today is a holiday, and we are not going to the park. ¬ A ⇒ ¬ B If today is not a holiday, then we are not going to the park. ¬ B ⇒ ¬ A If we are not going to the park, then today is not a holiday. B ⇒ A If we are going to the park, then today is a holiday.

 Sis true iff S is false S 1  S 2 is true iff S 1 is true and S 2 is true S 1  S 2 is true iff S 1 is true or S 2 is true S 1  S 2 is true iffS 1 is false orS 2 is true i.e.S 1  S 2 is false iffS 1 is true andS 2 is false S 1  S 2 is true iffS 1  S 2 is true and S 2  S 1 is true Recursively, one can compute the truth value of longer formulas

PQ PPPQPQPQPQPQPQPQPQ FFTFFTT FTTFTTF TFFFTFF TTFTTTT

NLP