from nl to fol
play

From NL to FOL From NL to Logic Semantics and the NLTK Scott - PowerPoint PPT Presentation

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. 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

  2. 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

  3. 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

  4. 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

  5. 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

  6. 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

  7. 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

  8. 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

  9. 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

  10. 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

  11. 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

  12. 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

  13. 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

  14. 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

  15. 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

  16. 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

  17. 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

  18. 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

  19. 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

  20. 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

  21. 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

  22. 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

  23. 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

  24. 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

  25. 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

  26. 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

  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

  28. 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

  29. 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

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend