Combinatory Categorial Grammar

Combinatory Categorial Grammar

Recommended Reading Combinatory Categorial • Michael White. 2006. Grammar Efficient Realization of Coordinate Structures in Combinatory Categorial Grammar. Research on Language and Computation, 4(1):39–75. Constraining surface realisation in • Mark Steedman and Jason Baldridge. Combinatory OpenCCG Categorial Grammar. To appear in Robert Borsley and Kersti Borjars (eds.) Constraint-based approaches to grammar: alternatives to transformational syntax. Oxford: Blackwell. PDF (Will appear in February 2011.) OpenCCG surface realisation Categorial Grammar Categorial grammars are lexicalised grammars sentence plan Sentence plans are • a grammar is just a “dictionary” hybrid logic • there are no language-specific grammar rules Lexicon dependency structures OpenCCG • a grammar is a mapping from words to structures realiser Grammar What do the grammar and lexicon look like? restaurant Mapping not food one-to-one! surface text serves the Lexicalised grammars Categorial grammars (CGs) Many kinds of lexicalised grammar A CG is a mapping from words to categories • Categorial grammars (including CCGs) • i.e. a set of word-category pairs • Lexicalised Tree Adjoining Grammars (LTAGs) • CFGs in Greibach Normal Form What do categories look like? Lexicalised grammars are more efficient than restaurant arbitrary CFGs for NLG food • search space is simpler (Koller & Striegnitz, 2002) serves the Atomic categories Categories Each CG is built around a finite set of atomic Two kinds of category categories • simple, non-composite, atomic symbols • “atomic” categories • similar to the symbols of a CFG • “complex” categories Examples: • S – sentence/clause • NP – noun phrase • N - noun • PP – preposition phrase Complex categories Atomic categories in XML • Complex categories are built up from atomic Use atomcat elements with a type attribute category symbols • From any finite set of atomic categories, can construct an infinite set of complex categories <atomcat type=“S”/> using two operators – directional slash operators: / and \ <atomcat type=“NP”/> Traditional arithmetic notation is a useful analogy Arithmetic notation Recursive definition Arithmetic notation gives us a finite set of digits Categories are defined recursively • 0, 1, 2, . ., 9 Atomic categories constitute the “base” And a small set of operators for describing an infinite • every atomic category is also a category set of numbers: e.g., • concatenation: 23, 456, 92789 The recursion involves the slash operators • addition: 2+7, 7+23, 456+65 • if X and Y are both categories, then so is (X/Y) • subtraction: 45 - 6, (2+6) - (67- 34) • if X and Y are both categories, then so is (X\Y) Simple examples Embedded examples category meaning category meaning (S\NP) verb phrase, intransitive verb ((S\NP)/NP) transitive verb (NP/N) determiner ((S\NP)/NP)/NP ditransitive verb (N\N) noun post-modifier, relative clause ((N\N)/NP) post-nominal preposition (PP/NP) preposition ((S\NP)\(S\NP)) adverb (PP\NP) postposition ((S\NP)\((S\NP)/NP)) reflexive pronoun ((N\N)/(S\NP)) relative pronoun Notational conveniences Complex categories in XML Drop outermost parentheses How to represent S\NP: • (S\NP) ⇒ S\NP • ((N\N)/(S\NP)) ⇒ (N\N)/(S\NP) <complexcat> <atomcat type=“S”/> Assume left associativity of / and \ <slash dir=“\”/> • ((S\NP)/NP)/NP ⇒ S\NP/NP/NP <atomcat type=“NP”/> • (N\N)/(S\NP) ⇒ N\N/(S\NP) </complexcat> S\NP/NP in XML N\N/(S\NP) in XML <complexcat> <complexcat> <atomcat type=“S”/> <atomcat type=“N”/> <slash dir=“\”/> <slash dir=“\”/> <atomcat type=“N”/> <atomcat type=“NP”/> <slash dir=“/”/> <slash dir=“/”/> <complexcat> <atomcat type=“NP”/> <atomcat type=“S”/> </complexcat> <slash dir=“\”/> <atomcat type=“NP”/> </complexcat> </complexcat> Categories - summary What does X/Y mean? The kind of word or phrase that combines with a following Y to form an X. X/Y Y atomic slash operators complex categories categories X This rule is called forward application. Determiners Prepositions argument result the restaurant in the restaurant NP / N N PP/NP NP NP PP Determiner: word that combines with a Preposition: word that combines with a following N to give an NP, i.e., an NP/N. following NP to give a PP, i.e., a PP/NP. Derivations Attributive adjectives in the restaurant great food PP/NP NP/N N N/N N NP N PP Attributive adjective: word that combines with a following N to give another N, i.e., an N/N. Adjective stacking What does X\Y mean? The kind of word or phrase that combines with great Italian restaurant a preceding Y to form an X. N/N N/N N Y X\Y N X N This rule is called backward application. Intransitive verbs Postpositions Giovanni’s rocks one floor above NP S\NP NP PP\NP S PP Intransitive verb: word that combines with Postposition: word that combines with a a preceding NP to give an S, i.e., an S\NP. preceding NP to give a PP, i.e., a PP\NP. Transitive verbs Relative pronouns Giovanni’s serves pasta restaurant that rocks NP S\NP/NP NP N N\N/(S\NP) S\NP S\NP N\N S N Transitive verb: word that combines with a Relative pronoun: word that combines following NP to give an intransitive verb, S\NP. with a following intransitive verb S\NP to give a noun postmodifier N\N. Adverbs The story so far • A categorial grammar is a mapping from Giovanni’s totally rocks words to categories NP S\NP/(S\NP) S\NP • Categories can be atomic or complex S\NP • Words are combined into phrases by forward S and backward application Adverb: word that combines with a following intransitive verb S\NP to give another intransitive verb S\NP. Our lexicon What does our grammar do? Giovanni’s :- NP pasta :- NP • It tells us which strings of words are serves :- S\NP/NP grammatical and which are not. rocks :- S\NP restaurant :- N • It assigns derivational structure to the great :- N/N grammatical strings. a : NP/N that :- N\N/(S\NP) • But what about semantics? Remember HLDS? Adding HLDS to our lexicon • The input to the OpenCCG realiser is a hybrid logic dependency structure Two steps: • So our categorial lexicon needs to include 1. Add a nominal to each atomic category symbol HLDS in some way • We need to be able to relate the grammatical 2. Add a set of elementary predications of hybrid sentences with their HLDS (interpretation) logic to each lexical category • And also to relate HLDSs to the grammatical Then relax and let forward and backward application sentences that can realise them (generation) (i.e. unification) take care of the rest! Our lexicon again 1. Adding nominals to categories Giovanni’s :- NP Giovanni’s :- NPx • Subscripts to atomic category symbols pasta :- NP pasta :- NP • Referential indices: unique labels for x object or event evoked by the word serves :- S\NP/NP serves :- Se\NPx/NPy • By convention, use x, y, z for objects, and e, f, g for events rocks :- S\NP rocks :- Se\NPx • Coindexed nominals indicate the restaurant :- N restaurant :- Nx referent of the argument is the same as referent of result, e.g., “great” great :- N/N great :- Nx/Nx a : NP/N a : NPx/Nx that :- N\N/(S\NP) that :- Nx\Nx/(Se\NPx) Adding nominals in XML Nominal coindexation in XML <atomcat type=“NP”/> <complexcat> <atomcat type=“N”> <fs> <feat attr=“index”> <atomcat type=“NP”> <lf> <nomvar name=“X”/> </lf> <fs> </feat> </fs> <feat attr=“index”> Nx\Nx </atomcat> <slash dir=“\”> <lf> <atomcat type=“N”> <nomvar name=“X”/> <fs> <feat attr=“index”> </lf> <lf> <nomvar name=“X”/> </lf> </feat> </feat> </fs> </fs> </atomcat> </atomcat> </complexcat> 2. Adding EPs to categories Intransitive verbs Giovanni’s :- NPx : @x Giovanni’s pasta :- NPx : @x pasta serves :- Se\NPx/NPy : @e serve, @e <AGENT> x, Giovanni’s rocks @e <THEME> y NPy Se\NPx rocks :- Se\NPx : @e great, @e <THEME> x @y Giovanni’s @e great, @e <THEME> x restaurant :- Nx : @e restaurant, @e <THEME> x great :- Nx/Nx : @e great, @e <THEME> x Se : @e great, @e <THEME> x, @x Giovanni’s a : NPx/Nx : that :- N \N /(S \NP ) : x x e x Transitive verbs Attributive adjectives Giovanni’s serves pasta great Italian restaurant NP Se\NPx/NPy w NPv @e serve N /N N /N N @w Giovanni’s @v pasta z z y y x @e <AGENT> x @f italian @e restaurant @g great @e <THEME> y @g <THEME> z @f <THEME> y @e <THEME> x Se\NPx Nx @e serve, @e <AGENT> x @e restaurant, @e <THEME> x, @e <THEME> y, @y pasta @f italian, @f <THEME> x N : @e restaurant, @e <THEME> x, S : @e serve, @e <AGENT> x, @e <THEME> y, x e @f italian, @f <THEME> x, @g great, @g <THEME> x @x Giovanni’s, @y pasta So where are we? From CG to CCG • Weve seen how to define a lexicon in CG CCG is an “extension” of CG. • Weve learned about two important operators in CG, i.e., forward and backward application CCG has more rules: • Weve seen how to combine words both • forward and backward type raising – Syntactically (derivations, unification), and • forward and backward composition – Semantically (set union of elementary predications) • But, Combinatory Categorial Grammar gives us Everything else remains the same - much more • in particular the HLDS representations. Type Raising Forward type raising • CCG includes type-raising rules, which turn arguments into functions over functions over such arguments X • Forward type raising T X Y/(Y\X) T Y/(Y\X) • Example: John John NP NP T T S/(S\NP) S/(S\NP) • The rules are order preserving. Here we turn an NP into a rightward looking function over leftward functions, preserving the linear order of constituents Multiple derivations Q1: I know what restaurant serves French food, but what Forward composition restaurant serves Italian food? A1: Babbo serves Italian food.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    14 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us