Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Spring 2006-Lecture 8.

Similar presentations


Presentation on theme: "1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Spring 2006-Lecture 8."— Presentation transcript:

1 1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Spring 2006-Lecture 8

2 2 What’s the plan for today? Basic concepts of logic Propositional logic (aka statement logic) Predicate logic (aka first order logic)

3 3 Natural language and formal languages Natural languages: acquired as first language in childhood to serve any communicative goal we have Formal languages: designed by people for a clear, particular purpose One of the most important uses linguists make of formal languages is to represent meaning in natural languages.

4 4 Logic Logical languages can be used as meta- languages to formalize reasoning from axioms and theorems in a specific domain. Here, we’ll develop the background for applications of logic and formal languages to natural languages

5 5 Language of logic Syntax-semantics –Syntax: primitives, axioms, well-formedness, rules of inference or rewrite rules, theorems –Semantics: relation of syntax to interpretation

6 6 Semantics For our purposes: semantics is the study of the relations of formal systems to their interpretations

7 7 About propositional and predicate logic Each is a formal language with its own vocabulary, rules of syntax and semantics (or system of interpretation) Both are much simpler than natural languages –Only declarative statement (no questions, imperatives) –Connectives: and, or, not, if…then, if and only if but no because, while, after, although etc –Determiners: some, all, no, every but not most, many, a few, several, one half etc Logic is the study of reasoning (the product, not the process) with the objective of finding correct, or valid, instances and distinguishing them from those that are invalid.

8 8 Example All men are mortals Socrates is a man _______________________________________________________ Therefore, Socrates is mortal All cats are mammals All dogs are mammals ________________________________________ Therefore, all cats are dogs  A systematic account of what underlies our intuitions about the validity of our inferences

9 9 Argument form  Systematic replacements All rabbits are rodents Peter is a rabbit _______________________________________ Therefore, Peter is a rodent All X’s are Y’s a is an X _______________________________________ Therefore, a is a Y

10 10 Propositional logic Vocabulary –Infinite vocabulary of atomic statements, p, q, r, s, etc Syntax –Any atomic statement itself is a sentence or well- formed formula (wff) –Any wff preceded by ~ is also a wff –Any two wffs can be made into another wff by conjunction, disjunction, conditional or biconditional

11 11 Propositional logic Semantics –Truth values: 1 or 0 –Truth tables Negation Conjunction Disjunction Conditional Bi-conditional

12 12 Laws of propositional logic Idempotent laws Associative laws Commutative laws Distributive laws Identity laws Complement laws DeMorgan’s laws Conditional laws Bi-conditional laws

13 13 Rules of inference Modus Ponens Modus Tollens Hypothetical syllogism Disjunctive syllogism Simplification Conjunction Addition

14 14 Some simple exercises Example: If John is at the party, then Mary is too. –Translation: (p  q) –Key: p=John is at the party, q=Mary is at the party Translate the following sentences in propositional logic 1.Either John is in that room or Mary is, or possibly they both are 2.The fire was set by an arsonist, or there was an accidental explosion in the boiler room 3.When it rains, it pours 4.Sam wants a dog but Alice prefers cats

15 15 Predicate logic Vocabulary –Individual constants: j, m,... –Individual variables: x, y, z, … –Predicates: P, Q, R, … each with a fixed number of arguments called its arity –The five connectives of propositional logic (negation, and, or, if-then, if and only if) –Two quantifiers: universal and existential –Auxiliary symbols: parentheses and brackets

16 16 Syntax of predicate logic See handout

17 17 Semantics of predicate logic Truth values: 1, 0 Truth value is determined by the semantic value of the components of a formula Set D of individuals, discourse domain Example –H(s) –s has as its semantic value some individual chosen from a set D of individuals presumed to be fixed in advance. Say D includes Socrates and Aristotle. The statement H(s) gets the truth value true by the fact that the individual corresponding to s is a member of the set corresponding to H. A two place predicate has as its semantic value a set of ordered pairs of individuals from D and so on and so forth.

18 18 Some simple exercises Translate the following English sentences into predicate logic: 1.Everything is black or white 2.A dog is a quadruped 3.Everybody loves somebody 4.Someone is loved by everyone 5.There is someone whom everyone loves 6.No one loves himself unless it’s John 7.If you love a woman, kiss her or lose her 8.People who live in New York love it


Download ppt "1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Spring 2006-Lecture 8."

Similar presentations


Ads by Google