From NL to FOL Scott Farrar CLMA, University of Washington far- rar@u.washington.edu Review From NL to FOL From NL to Logic Semantics and the NLTK Scott Farrar CLMA, University of Washington farrar@u.washington.edu February 17, 2010 1/27
From NL to FOL Today’s lecture Scott Farrar CLMA, University of Washington far- rar@u.washington.edu Review From NL to Logic Review 1 Semantics and the NLTK From NL to Logic 2 Semantics and the NLTK 3 2/27
From NL to FOL ForAllX Scott Farrar CLMA, University of Washington far- rar@u.washington.edu Review What is/are: From NL to Logic Semantics and the NLTK 3/27
From NL to FOL ForAllX Scott Farrar CLMA, University of Washington far- rar@u.washington.edu Review What is/are: From NL to Logic the three main problems associated with Semantics and the computational semantics? NLTK 3/27
From NL to FOL ForAllX Scott Farrar CLMA, University of Washington far- rar@u.washington.edu Review What is/are: From NL to Logic the three main problems associated with Semantics and the computational semantics? NLTK a logic ? 3/27
From NL to FOL ForAllX Scott Farrar CLMA, University of Washington far- rar@u.washington.edu Review What is/are: From NL to Logic the three main problems associated with Semantics and the computational semantics? NLTK a logic ? some logics we’ve talked about ? 3/27
From NL to FOL ForAllX Scott Farrar CLMA, University of Washington far- rar@u.washington.edu Review What is/are: From NL to Logic the three main problems associated with Semantics and the computational semantics? NLTK a logic ? some logics we’ve talked about ? a logical sentence ? 3/27
From NL to FOL ForAllX Scott Farrar CLMA, University of Washington far- rar@u.washington.edu Review What is/are: From NL to Logic the three main problems associated with Semantics and the computational semantics? NLTK a logic ? some logics we’ve talked about ? a logical sentence ? the logical connectives of sentential logical? 3/27
From NL to FOL ForAllX Scott Farrar CLMA, University of Washington far- rar@u.washington.edu Review What is/are: From NL to Logic the three main problems associated with Semantics and the computational semantics? NLTK a logic ? some logics we’ve talked about ? a logical sentence ? the logical connectives of sentential logical? a logical argument ? 3/27
From NL to FOL ForAllX Scott Farrar CLMA, University of Washington far- rar@u.washington.edu Review What is/are: From NL to Logic the three main problems associated with Semantics and the computational semantics? NLTK a logic ? some logics we’ve talked about ? a logical sentence ? the logical connectives of sentential logical? a logical argument ? a tautology ? 3/27
From NL to FOL What is meaning, really? Scott Farrar CLMA, University of Washington far- rar@u.washington.edu An example: Review From NL to Logic Semantics and the NLTK 4/27
From NL to FOL What is meaning, really? Scott Farrar CLMA, University of Washington far- rar@u.washington.edu An example: Review 1 English: Horatio bakes me a cake or Horatio bakes you From NL to Logic a cake. Semantics and the NLTK 4/27
From NL to FOL What is meaning, really? Scott Farrar CLMA, University of Washington far- rar@u.washington.edu An example: Review 1 English: Horatio bakes me a cake or Horatio bakes you From NL to Logic a cake. Semantics and the NLTK 2 Sentential Logic: P ∨ Q (just a symbolic translation) 4/27
From NL to FOL What is meaning, really? Scott Farrar CLMA, University of Washington far- rar@u.washington.edu An example: Review 1 English: Horatio bakes me a cake or Horatio bakes you From NL to Logic a cake. Semantics and the NLTK 2 Sentential Logic: P ∨ Q (just a symbolic translation) Intuitive approach to meaning 4/27
From NL to FOL What is meaning, really? Scott Farrar CLMA, University of Washington far- rar@u.washington.edu An example: Review 1 English: Horatio bakes me a cake or Horatio bakes you From NL to Logic a cake. Semantics and the NLTK 2 Sentential Logic: P ∨ Q (just a symbolic translation) Intuitive approach to meaning Intuitively we say that (1)’s meaning depends on whether Horatio bakes a cake, and whether it’s for you or me. 4/27
From NL to FOL What is meaning, really? Scott Farrar CLMA, University of Washington far- rar@u.washington.edu An example: Review 1 English: Horatio bakes me a cake or Horatio bakes you From NL to Logic a cake. Semantics and the NLTK 2 Sentential Logic: P ∨ Q (just a symbolic translation) Intuitive approach to meaning Intuitively we say that (1)’s meaning depends on whether Horatio bakes a cake, and whether it’s for you or me. That is, depending on the state of the world. 4/27
From NL to FOL What is meaning, really? Scott Farrar CLMA, University of Washington far- rar@u.washington.edu An example: Review 1 English: Horatio bakes me a cake or Horatio bakes you From NL to Logic a cake. Semantics and the NLTK 2 Sentential Logic: P ∨ Q (just a symbolic translation) Intuitive approach to meaning Intuitively we say that (1)’s meaning depends on whether Horatio bakes a cake, and whether it’s for you or me. That is, depending on the state of the world. Not very satisfying! 4/27
From NL to FOL Slightly more formal account Scott Farrar CLMA, University of Washington far- rar@u.washington.edu What about assigning a value to meaning? Review Something like the meaning of Horatio bakes me a cake. is: From NL to Logic Semantics and the NLTK 5/27
From NL to FOL Slightly more formal account Scott Farrar CLMA, University of Washington far- rar@u.washington.edu What about assigning a value to meaning? Review Something like the meaning of Horatio bakes me a cake. is: From NL to Logic True Semantics and the NLTK 5/27
From NL to FOL Slightly more formal account Scott Farrar CLMA, University of Washington far- rar@u.washington.edu What about assigning a value to meaning? Review Something like the meaning of Horatio bakes me a cake. is: From NL to Logic True Semantics and the NLTK 0.43 5/27
From NL to FOL Slightly more formal account Scott Farrar CLMA, University of Washington far- rar@u.washington.edu What about assigning a value to meaning? Review Something like the meaning of Horatio bakes me a cake. is: From NL to Logic True Semantics and the NLTK 0.43 Truth values In fact, we can say that the atomic sentences of our logic P , Q , ..., X can either be True or False depending on the state of the world. This is called a truth functional logic . 5/27
From NL to FOL Slightly more formal account Scott Farrar CLMA, University of Washington far- rar@u.washington.edu What about assigning a value to meaning? Review Something like the meaning of Horatio bakes me a cake. is: From NL to Logic True Semantics and the NLTK 0.43 Truth values In fact, we can say that the atomic sentences of our logic P , Q , ..., X can either be True or False depending on the state of the world. This is called a truth functional logic . Complex sentences What about P ∨ Q ? When is it True or False ? 5/27
From NL to FOL Truth table for ‘inclusive or’, ∨ Scott Farrar CLMA, University of Washington far- rar@u.washington.edu Review From NL to Logic Semantics and the P Q P ∨ Q NLTK T T T T F T F T T F F F 6/27
From NL to FOL Truth table for ‘exclusive or’, ⊕ Scott Farrar CLMA, University of Washington far- rar@u.washington.edu Review From NL to Logic Semantics and the P Q P ⊕ Q NLTK T T F T F T F T T F F F 7/27
From NL to FOL Today’s lecture Scott Farrar CLMA, University of Washington far- rar@u.washington.edu Review From NL to Logic Review 1 Semantics and the NLTK From NL to Logic 2 Semantics and the NLTK 3 8/27
From NL to FOL Methodology Scott Farrar CLMA, University of Washington far- rar@u.washington.edu Semantic analysis is the mapping of NL utterances onto some logic. In traditional logic classes, the mapping is Review usually done from logic to NL: From NL to Logic Semantics and the NLTK 9/27
From NL to FOL Methodology Scott Farrar CLMA, University of Washington far- rar@u.washington.edu Semantic analysis is the mapping of NL utterances onto some logic. In traditional logic classes, the mapping is Review usually done from logic to NL: From NL to Logic Semantics and the NLTK Example ∃ x ( dog ( x ) ∧ disappear ( x )) At least one entity is a dog and disappeared. Some dog disappeared. A dog disappeared. 9/27
From NL to FOL Methodology Scott Farrar CLMA, University of Washington far- rar@u.washington.edu Semantic analysis is the mapping of NL utterances onto some logic. In traditional logic classes, the mapping is Review usually done from logic to NL: From NL to Logic Semantics and the NLTK Example ∃ x ( dog ( x ) ∧ disappear ( x )) At least one entity is a dog and disappeared. Some dog disappeared. A dog disappeared. Our methodology : start with structures in NL and find appropriate logical formulas. This makes the logic work for NL, not the other way around. 9/27
From NL to FOL Mapping NL to FOL: Nouns Scott Farrar CLMA, University of Washington far- rar@u.washington.edu What do nouns usually denote? Review From NL to Logic Semantics and the NLTK 10/27
Recommend
More recommend