computational semantics more calculus
play

Computational Semantics: More Calculus -calculus Recap NLTK - PowerPoint PPT Presentation

Computational Semantics: More Calculus Scott Farrar CLMA, University of Washington far- rar@u.washington.edu Computational Semantics: More Calculus -calculus Recap NLTK semantics operations Scott Farrar Type theory CLMA,


  1. Computational Semantics: More λ Calculus Scott Farrar CLMA, University of Washington far- rar@u.washington.edu Computational Semantics: More λ Calculus λ -calculus Recap NLTK semantics λ operations Scott Farrar Type theory CLMA, University of Washington farrar@u.washington.edu March 1, 2010 1/23

  2. Computational Today’s lecture Semantics: More λ Calculus Scott Farrar CLMA, University of Washington far- rar@u.washington.edu λ -calculus Recap 1 λ -calculus Recap NLTK semantics λ operations NLTK semantics 2 Type theory λ operations 3 Type theory 4 2/23

  3. Computational Key points from last time Semantics: More λ Calculus Scott Farrar CLMA, University of Washington far- rar@u.washington.edu The λ -calculus can be considered an axiomatic theory of functions . λ -calculus Recap NLTK semantics λ operations Type theory 3/23

  4. Computational Key points from last time Semantics: More λ Calculus Scott Farrar CLMA, University of Washington far- rar@u.washington.edu The λ -calculus can be considered an axiomatic theory of functions . λ -calculus Recap It is a calculus of functions and function application NLTK semantics ( F A ), where F is some function and A is some λ operations Type theory argument. 3/23

  5. Computational Key points from last time Semantics: More λ Calculus Scott Farrar CLMA, University of Washington far- rar@u.washington.edu The λ -calculus can be considered an axiomatic theory of functions . λ -calculus Recap It is a calculus of functions and function application NLTK semantics ( F A ), where F is some function and A is some λ operations Type theory argument. F is in the form of λ var . expr such that var is bound by the λ operator. 3/23

  6. Computational Key points from last time Semantics: More λ Calculus Scott Farrar CLMA, University of Washington far- rar@u.washington.edu The λ -calculus can be considered an axiomatic theory of functions . λ -calculus Recap It is a calculus of functions and function application NLTK semantics ( F A ), where F is some function and A is some λ operations Type theory argument. F is in the form of λ var . expr such that var is bound by the λ operator. λ x . red ( x ) is an example of a λ -expression. 3/23

  7. Computational Key points from last time Semantics: More λ Calculus Scott Farrar CLMA, University of Washington far- rar@u.washington.edu The λ -calculus can be considered an axiomatic theory of functions . λ -calculus Recap It is a calculus of functions and function application NLTK semantics ( F A ), where F is some function and A is some λ operations Type theory argument. F is in the form of λ var . expr such that var is bound by the λ operator. λ x . red ( x ) is an example of a λ -expression. The function λ x . red ( x ) is anonymous ; it has no name. 3/23

  8. Computational Key points from last time Semantics: More λ Calculus Scott Farrar CLMA, University of Washington far- rar@u.washington.edu The λ -calculus can be considered an axiomatic theory of functions . λ -calculus Recap It is a calculus of functions and function application NLTK semantics ( F A ), where F is some function and A is some λ operations Type theory argument. F is in the form of λ var . expr such that var is bound by the λ operator. λ x . red ( x ) is an example of a λ -expression. The function λ x . red ( x ) is anonymous ; it has no name. The λ -calculus can be used with FOL to functions to aid in the compositionality process. 3/23

  9. Computational Today’s lecture Semantics: More λ Calculus Scott Farrar CLMA, University of Washington far- rar@u.washington.edu λ -calculus Recap 1 λ -calculus Recap NLTK semantics λ operations NLTK semantics 2 Type theory λ operations 3 Type theory 4 4/23

  10. Computational NLTK semantics Semantics: More λ Calculus Scott Farrar CLMA, University Variables of Washington far- rar@u.washington.edu The NLTK implements FOL and λ -calculus starting with a λ -calculus Recap basic functional calculus and then adding elements of FOL. NLTK semantics Furthermore, variables in the NLTK’s implementation are λ operations typed: Type theory 5/23

  11. Computational NLTK semantics Semantics: More λ Calculus Scott Farrar CLMA, University Variables of Washington far- rar@u.washington.edu The NLTK implements FOL and λ -calculus starting with a λ -calculus Recap basic functional calculus and then adding elements of FOL. NLTK semantics Furthermore, variables in the NLTK’s implementation are λ operations typed: Type theory IndividualVariableExpression : the value has to be a, b, c, ..., w,x,y,z (but not e ), plus 0 or more numerals, e.g., x, y, x1, y23 . 5/23

  12. Computational NLTK semantics Semantics: More λ Calculus Scott Farrar CLMA, University Variables of Washington far- rar@u.washington.edu The NLTK implements FOL and λ -calculus starting with a λ -calculus Recap basic functional calculus and then adding elements of FOL. NLTK semantics Furthermore, variables in the NLTK’s implementation are λ operations typed: Type theory IndividualVariableExpression : the value has to be a, b, c, ..., w,x,y,z (but not e ), plus 0 or more numerals, e.g., x, y, x1, y23 . EventVariableExpression : has to be e or e1, e2, ... 5/23

  13. Computational NLTK semantics Semantics: More λ Calculus Scott Farrar CLMA, University Variables of Washington far- rar@u.washington.edu The NLTK implements FOL and λ -calculus starting with a λ -calculus Recap basic functional calculus and then adding elements of FOL. NLTK semantics Furthermore, variables in the NLTK’s implementation are λ operations typed: Type theory IndividualVariableExpression : the value has to be a, b, c, ..., w,x,y,z (but not e ), plus 0 or more numerals, e.g., x, y, x1, y23 . EventVariableExpression : has to be e or e1, e2, ... FunctionVariableExpression : has to be a single capital letter and can be followed by a numeral, e.g., A , B , A1 , E1 5/23

  14. Computational NLTK semantics Semantics: More λ Calculus Scott Farrar CLMA, University of Washington far- rar@u.washington.edu λ -calculus Recap NLTK semantics λ operations Constants Type theory ConstantExpression : an expression consisting of a constant, e.g., BILL , BB , bill 6/23

  15. Computational NLTK semantics Semantics: More λ Calculus Scott Farrar CLMA, University of Washington far- Binder expressions rar@u.washington.edu λ -calculus Recap NLTK semantics λ operations Type theory 7/23

  16. Computational NLTK semantics Semantics: More λ Calculus Scott Farrar CLMA, University of Washington far- Binder expressions rar@u.washington.edu VariableBinderExpression : an abstract class, an λ -calculus Recap expression with at least one bound variable and a NLTK semantics binding operator ( \ , all, exists ) λ operations Type theory 7/23

  17. Computational NLTK semantics Semantics: More λ Calculus Scott Farrar CLMA, University of Washington far- Binder expressions rar@u.washington.edu VariableBinderExpression : an abstract class, an λ -calculus Recap expression with at least one bound variable and a NLTK semantics binding operator ( \ , all, exists ) λ operations LambdaExpression : an expression with at least one Type theory variable bound by the λ operator ( \ ) 7/23

  18. Computational NLTK semantics Semantics: More λ Calculus Scott Farrar CLMA, University of Washington far- Binder expressions rar@u.washington.edu VariableBinderExpression : an abstract class, an λ -calculus Recap expression with at least one bound variable and a NLTK semantics binding operator ( \ , all, exists ) λ operations LambdaExpression : an expression with at least one Type theory variable bound by the λ operator ( \ ) ExistsExpression : an expression with at least one variable bound by the exists operator 7/23

  19. Computational NLTK semantics Semantics: More λ Calculus Scott Farrar CLMA, University of Washington far- Binder expressions rar@u.washington.edu VariableBinderExpression : an abstract class, an λ -calculus Recap expression with at least one bound variable and a NLTK semantics binding operator ( \ , all, exists ) λ operations LambdaExpression : an expression with at least one Type theory variable bound by the λ operator ( \ ) ExistsExpression : an expression with at least one variable bound by the exists operator AllExpression : an expression with at least one variable bound by the all operator 7/23

  20. Computational NLTK semantics Semantics: More λ Calculus Scott Farrar CLMA, University of Washington far- Binder expressions rar@u.washington.edu VariableBinderExpression : an abstract class, an λ -calculus Recap expression with at least one bound variable and a NLTK semantics binding operator ( \ , all, exists ) λ operations LambdaExpression : an expression with at least one Type theory variable bound by the λ operator ( \ ) ExistsExpression : an expression with at least one variable bound by the exists operator AllExpression : an expression with at least one variable bound by the all operator ApplicationExpression : an expression with a functor and an argument 7/23

  21. Summary of λ -expressions syn. category example FOL λ expression common noun dog dog ( x ) \ x.dog(x) proper noun Bill BILL \ P.P(BILL) intransitive verb runs run ( x ) \ x.run(x) transitive verb loves love ( x , y ) \ X y.X( \ x.love(y,x)) copula is eq ( x , y ) \ X y.X( \ x.eq(y,x)) negative copula isn’t ¬ eq ( x , y ) \ X y.X( \ x.-eq(y,x)) auxiliary verb did go go ( x ) \ K z.K(z) ( \ x.go(x)) neg. auxiliary verb didn’t go ¬ go ( x ) \ K z.-K(z) ( \ x.go(x))

Recommend


More recommend