Download Computational Linguistics I: Tree Adjoining Grammars and Combinatory Categorial Grammars and more Study notes Computer Science in PDF only on Docsity! CMSC 723/LING 723 Computational Linguistics I Tree Adjoining Grammars Combinatory Categorial Grammars Lecture 7 October 15, 2008 1 CMSC 723/LING 723 Computational Linguistics I Yes, Virginia, there are grammar formalisms besides CFG ! Lecture 7 October 15, 2008 2 Tree adjoining Grammar • TAG is a formal tree-rewriting system (Joshi, 1975) • Compare CFG: string re-writing • Uses trees as basic units, instead of strings • Thought to model language better than CFGs • Formally, they are “mildly” context sensitive 3Joshi et al. Tree adjunct grammars. Journal of Computer and System Sciences, 10(1). 1975 Why should we care? • Mathematically interesting • Using trees relates it directly to strong generative capacity (structures), not weak (strings) • Makes it more relevant to linguistic descriptions • Linguistically more useful • “Lexicalized” formalism. Each elementary tree is associated with a lexical anchor. Helpful for linguistic theories that explain phenomena lexically rather than just syntactically. • Can model recursion and dependencies locally. CFG fails here. Case in point: Dutch cross-serial dependencies. • Computationally tractable • Only “mildly” more powerful than CFGs. • Still efficiently parseable 4 Koech & Joshi. The Linguistic Relevance of Tree Adjoining Grammar. Upenn TR. 1985 TAG definitions • Initial Tree (a kind of elementary tree) • All interior nodes are labeled with non-terminals • nodes on the frontier are labeled with either terminals, or non-terminals marked for substitution (") • Used for substitution operations 9 TAG definitions • Auxiliary Tree (another kind of elementary tree) • One of its frontier nodes must be marked as a “foot node” (*) • The foot node must be labeled with a non-terminal symbols which is identical to that of the root node • Used for adjunction operations 10 Initial Trees and Substitution • Takes place on non-terminal nodes of the frontier of a tree. The node marked for substitution is replaced by the tree # to be substituted • $ is usually an initial tree but could be an auxiliary as well 11 Substitution Example 12 Initial Tree Initial Tree Auxiliary Trees and Adjunction • Builds a new tree from an auxiliary tree # (with root/foot node X) and a tree $ (with internal node X) • The sub-tree at internal node X in $ is excised and replaced by # • The excised sub-tree is then attached to the foot node of # 13 Adjunction Example 14 Aux. Tree Aux. Tree TAG is very popular • Powerful yet parseable • One of the most frequently employed formalisms in CL • Examples • XTAG for English, Korean: Full blown GPL’ed grammar, parser and grammar development environment (UPenn) • FTAG for French • TAG+ workshops since 1997 19http://www.cis.upenn.edu/~xtag CCGs • Proposed by Mark Steedman • A theory in which the lexicon is mainly responsible for defining syntax (sound familiar?) • Adhere to Principle of Compositionality “syntax and interpretation are related and my be derived in tandem; they are homomorphic” • General idea: grammatical entities combine according to a function-argument relationship 20 Steedman, Mark (2000), The Syntactic Process. The MIT Press. CCGs • Associate a functional type/category with each grammatical entity • Two types of categories • Arguments (e.g., nouns) have a simple category like N • Functors or predicates e.g. (verbs or determiners) have a complex category of the form X/Y or Y\X • Combinatory rules allow functors and arguments to be combined, e.g., X/Y Y ! X and Y X\Y ! X 21 CCGs • Associate a functional type/category with each grammatical entity • Two types of categories • Arguments (e.g., nouns) have a simple category like N • Functors or predicates e.g. (verbs or determiners) have a complex category of the form X/Y or Y\X • Combinatory rules allow functors and arguments to be combined, e.g., X/Y Y ! X and Y X\Y ! X 22 CCG Functors • X/Y is like an f(Y); something that combines with Y on its right to produce X. Examples: • “the” (determiner) has category NP/N • “eat” (trans. verb) has VP/NP • “give” (ditrans. verb) has (VP/NP)/NP • X\Y is also a function; something that combines with Y on its left to produce X. Examples: • IMPORTANT: CCG says that the simple category VP is actually S\NP. So, “eat apples” would have the category S\NP. • What would “eat” have? • How about “give” ? 23 Parsing with CCGs • Possible to specify a CYK algorithm for CCGs • Example operations that power this: • X ! X/Y Y • X ! Y X\Y • X/Z ! X\Y Y/Z • Many more such operations that we don’t have time for 24