Basic Parsing Algorithms Chart Parsing

Size: px
Start display at page:

Download "Basic Parsing Algorithms Chart Parsing"

Transcription

1 Basic Parsing Algorithms Chart Parsing Seminar Recent Advances in Parsing Technology WS 2011/2012 Anna Schmidt

2 Talk Outline Chart Parsing Basics Chart Parsing Algorithms Earley Algorithm CKY Algorithm Basics BitPar: Efficient Implementation of CKY

3 Chart Parsing Basics

4 Chart Parsing Basics First proposed by Martin Kay Dynamic programming approach Partial results of the computation are stored and (re)used later if needed Same problem is not solved more than once Operates on a CFG Functionality: Recogniser / Parser in this talk focus on recogniser functionality

5 Main Components Chart Edges Agenda

6 Component: Chart Is a well-formed substring table (WFST) Stores partial and complete analyses of substrings Information stored in one triangular half of a two-dimensional array of (n+1)*(n+1) n*n Can also be understood as a (directed) graph Vertices: positions between input words 0 Mary 1 feeds 2 the 3 otter 4 Edges connecting vertices Allows no duplicate entries

7 Component: Edge Data structure storing information about a particular step in the parsing process Inhabit cells of the chart Contain Start and end position in input string A dotted rule Can also contain edge probability

8 Component: Edge A dotted rule consists of Left hand side (LHS) = non-terminal symbol Right hand side (RHS) = non-terminal or terminal symbol A dot between RHS symbols indicating which constituents have already been found Edges can be Active / incomplete: dot not the last element of RHS Inactive / complete: dot is last element of RHS Example: S NP VP (0,1)

9 Component: Agenda Organises the order in which tasks are executed Here all tasks (edges) are collected before being put on the chart Ordering of agenda determines what is processed first Therefore also which parse is found first Queue, stack, ordering with respect to probabilities,

10 Parsing Strategies Kay differentiates parsing strategies along two dimensions: Bottom-up versus top-down Directed versus undirected Directed bottom-up Only build edges for phrases that can actually be incorporated into a higher level structure Left-Corner Parser Directed top-down Only build a new (active) edge if the next word of the input can be used to extend such an edge Earley Undirected varieties: No such restrictions Undirected Bottom-Up: CKY

11 Parsing Strategies Ways of achieving directedness: Reachability Table: Contains for each non-terminal N the set of all symbols that can be the first element of a string dominated by N For example: NP can start with DET, N, ADJ, but not with V Rule selection table: M*N table where M = non-terminals excluding pre-terminals N = all non-terminals Contains all grammar rules applicable in a situation where M is the 'upper' and N is the 'lower' symbol

12 Chart Parsing: Advantages No repeated computation of same subproblem Deals well with left-recursive grammars Deals well with ambiguity No backtracking necessary

13 Earley Algorithm

14 Earley Algorithm Proposed by Jay Earley Top down search Can handle all CFGs Efficient: O(n3) in the general case Faster for particular types of grammar

15 Terminology In his paper, Earley does not use the notion of a 'chart' He represents the parsing process as sets of states Index of each state set = end position of all states in the set A state largely corresponds to an edge - Contains dotted rule - Pointer to start position - End position can be derived from state set

16 Terminology Formalisms are very similar Examples easier to follow when represented in charts So we will stick with 'chart' representations

17 Algorithm Components Initialization Predictor Scanner Completer Algorithm operates on one half of an array of size (n+1)*(n+1)

18 0 Mary 1 feeds 2 the 3 otter 4 eos 5 Initialise X S eos

19 0 Mary 1 feeds 2 the 3 otter 4 eos 5 Predict X S eos S NP VP NP N NP DET N N Mary DET the

20 0 Mary 1 feeds 2 the 3 otter 4 eos 5 Scan X S eos S NP VP NP N NP DET N N Mary DET the 1 2 N Mary 3 4 5

21 0 Mary 1 feeds 2 the 3 otter 4 eos 5 Complete X S eos S NP VP NP N NP DET N N Mary DET the 1 2 N Mary NP N S NP VP 3 4 5

22 0 Mary 1 feeds 2 the 3 otter 4 eos 5 Predict X S eos S NP VP NP N NP DET N N Mary DET the N Mary NP N S NP VP 1 VP V NP V feeds

23 0 Mary 1 feeds 2 the 3 otter 4 eos 5 Scan X S eos S NP VP NP N NP DET N N Mary DET the N Mary NP N S NP VP 1 VP V NP V feeds V feeds

24 0 Mary 1 feeds 2 the 3 otter 4 eos 5 Complete X S eos S NP VP NP N NP DET N N Mary DET the N Mary NP N S NP VP 1 VP V NP V feeds 2 V feeds VP V NP 3 4 5

25 0 Mary 1 feeds 2 the 3 otter 4 eos 5 Predict X S eos S NP VP NP N NP DET N N Mary DET the N Mary NP N S NP VP 1 VP V NP V feeds V feeds VP V NP 2 NP N NP DET N N Mary DET the 3 4 5

26 0 Mary 1 feeds 2 the 3 otter 4 eos 5 Scan X S eos S NP VP NP N NP DET N N Mary DET the N Mary NP N S NP VP 1 VP V NP V feeds V feeds VP V NP 2 NP N NP DET N N Mary DET the DET the 3 4 5

27 0 Mary 1 feeds 2 the 3 otter 4 eos 5 Complete X S eos S NP VP NP N NP DET N N Mary DET the N Mary NP N S NP VP 1 VP V NP V feeds V feeds VP V NP 2 NP N NP DET N N Mary DET the DET the NP DET N 3 4 5

28 0 Mary 1 feeds 2 the 3 otter 4 eos 5 Predict X S eos S NP VP NP N NP DET N N Mary DET the N Mary NP N S NP VP 1 VP V NP V feeds V feeds VP V NP 2 NP N NP DET N N Mary DET the DET the NP DET N 3 N Mary 4 5

29 0 Mary 1 feeds 2 the 3 otter 4 eos 5 Scan X S eos S NP VP NP N NP DET N N Mary DET the N Mary NP N S NP VP 1 VP V NP V feeds V feeds VP V NP 2 NP N NP DET N N Mary DET the DET the NP DET N 3 N Mary N otter 4 5

30 0 Mary 1 feeds 2 the 3 otter 4 eos 5 Complete X S eos S NP VP NP N NP DET N N Mary DET the N Mary NP N S NP VP 1 VP V NP V feeds V feeds VP V NP 2 NP N NP DET N N Mary DET the DET the NP DET N NP DET N 3 N Mary N otter 4 5

31 0 Mary 1 feeds 2 the 3 otter 4 eos 5 Complete X S eos S NP VP NP N NP DET N N Mary DET the N Mary NP N S NP VP 1 VP V NP V feeds V feeds VP V NP 2 NP N NP DET N N Mary DET the DET the NP DET N VP V NP NP DET N 3 N Mary N otter 4 5

32 0 Mary 1 feeds 2 the 3 otter 4 eos 5 Complete X S eos S NP VP NP N NP DET N N Mary DET the N Mary NP N S NP VP S NP VP 1 VP V NP V feeds V feeds VP V NP 2 NP N NP DET N N Mary DET the DET the NP DET N VP V NP NP DET N 3 N Mary N otter 4 5

33 0 Mary 1 feeds 2 the 3 otter 4 eos 5 Complete X S eos S NP VP NP N NP DET N N Mary DET the N Mary NP N S NP VP S NP VP X S eos 1 VP V NP V feeds V feeds VP V NP 2 NP N NP DET N N Mary DET the DET the NP DET N VP V NP NP DET N 3 N Mary N otter 4 5

34 0 Mary 1 feeds 2 the 3 otter 4 eos 5 Predict X S eos S NP VP NP N NP DET N N Mary DET the N Mary NP N S NP VP S NP VP X S eos 1 VP V NP V feeds V feeds VP V NP 2 NP N NP DET N N Mary DET the DET the NP DET N VP V NP NP DET N 3 N Mary N otter 4 eos eos 5

35 0 Mary 1 feeds 2 the 3 otter 4 eos 5 Scan X S eos S NP VP NP N NP DET N N Mary DET the N Mary NP N S NP VP S NP VP X S eos 1 VP V NP V feeds V feeds VP V NP VP V NP 2 NP N NP DET N N Mary DET the DET the NP DET N NP DET N 3 N Mary N otter 4 eos eos eos eos 5

36 0 Mary 1 feeds 2 the 3 otter 4 eos 5 Complete X S eos S NP VP NP N NP DET N N Mary DET the N Mary NP N S NP VP S NP VP X S eos X S eos 1 VP V NP V feeds V feeds VP V NP 2 NP N NP DET N N Mary DET the DET the NP DET N VP V NP NP DET N 3 N Mary N otter 4 eos eos eos eos 5

37 Lookahead Component In original paper, Earley proposes the use of a lookahead string for each state which represents the allowed successor for LHS Prevents completer from processing a state if lookahead string and next word of input do not match Remember Kay's directed top-down strategy?

38 CKY: Basics

39 CKY Basics Proposed by John Cocke, Daniel H. Younger, and Tadao Kasami (independently) Bottom-up search Incremental Grammar must be in Chomsky normal form (CNF) Complexity O(n3) Chart: (upper triangle of) array of size n*n

40 CKY Algorithm: Idea Initialise upper triangle of a chart of size n*n From upper left to lower right corner of chart: Go to the next cell in the diagonal Fill in POS tag of next word in input string Each time a POS tag has been filled in, go up cell by cell and build larger constituents that end at the current end position

41

42 0 Mary 1 feeds 2 the 3 otter S NP VP NP N NP DET N VP V NP N Mary otter V feeds DET the

43 0 Mary 1 feeds 2 the 3 otter N NP S NP VP NP N NP DET N VP V NP N Mary otter V feeds DET the

44 0 Mary 1 feeds 2 the 3 otter N NP 2 V 3 4 S NP VP NP N NP DET N VP V NP N Mary otter V feeds DET the

45 0 Mary 1 feeds 2 the 3 otter N NP 2 V 3 4 S NP VP NP N NP DET N VP V NP N Mary otter V feeds DET the

46 0 Mary 1 feeds 2 the 3 otter N NP 2 V 3 DET 4 S NP VP NP N NP DET N VP V NP N Mary otter V feeds DET the

47 0 Mary 1 feeds 2 the 3 otter N NP 2 V 3 DET 4 S NP VP NP N NP DET N VP V NP N Mary otter V feeds DET the

48 0 Mary 1 feeds 2 the 3 otter N NP 2 V 3 DET 4 S NP VP NP N NP DET N VP V NP N Mary otter V feeds DET the

49 0 Mary 1 feeds 2 the 3 otter N NP 2 V 3 DET 4 N NP S NP VP NP N NP DET N VP V NP N Mary otter V feeds DET the

50 0 Mary 1 feeds 2 the 3 otter N NP 2 V 3 DET NP 4 N NP S NP VP NP N NP DET N VP V NP N Mary otter V feeds DET the

51 0 Mary 1 feeds 2 the 3 otter N NP 2 V VP 3 DET NP 4 N NP S NP VP NP N NP DET N VP V NP N Mary otter V feeds DET the

52 0 Mary 1 feeds 2 the 3 otter N NP 2 V VP 3 DET NP 4 N NP S S NP VP NP N NP DET N VP V NP N Mary otter V feeds DET the

53 CKY: BitPar

54 BitPar: Basics Proposed by Helmut Schmid Bit-vector-based parser Efficiently implements a CKY-style algorithm Uses bit vector operations to parallelise parsing operations Idea: Don't try to decrease number of edges that are built, instead minimise cost of building edges Especially useful if all analyses are needed

55 BitPar: Requirements Restrictions on Context Free Grammar Must be in CNF Must be ε-free Chain rules allowed Precomputed for each non-terminal N: Set of non-terminals that are derivable from N via chain rules Set is stored in the bit vector chainvec[n] Set includes N itself

56 Background: Bitwise AND and OR AND 0101 & 0011 = 0001 OR = 0111 Both corresponding bits must equal 1 At least one of corresponding bits must equal 1

57 BitPar: Chart Chart = three-dimensional bit array chart [start position b] [end position e] = [ ] [b] [e] contains a bit vector with one bit for each non-terminal Bit is set to 1 if non-terminal was inserted 0 otherwise Chart initialised with all bits = 0

58 Filling the Chart: POS Tags Inserting POS tags into a cell of the diagonal: For each non-terminal N that can be rewritten as the word at the current position Do a bitwise OR of Bits inhabiting the chart cell chainvec[n] N and all its chain derivations are inserted in just one operation

59 Mary feeds the otter S, NP, N, VP, V, DET

60 Mary feeds the otter ? S, NP, N, VP, V, DET

61 Filling the Chart: Larger Constituents Conceptually: Determine if several cells can be combined to form a higher level constituent labeled N For this: Loop over grammar rules with LHS = N, extract RHS (consisting of RHS1, RHS2) Loop over all possible combinations of cells that together could contain the substructure of N and determine whether they contain RHS1 and RHS2 respectively

62 Filling the Chart: Larger Constituents This has to be done For each super-diagonal cell For each non-terminal For all corresponding grammar rules For all possible cell combinations that could constitute a substructure of N This is a time-consuming process BUT: The same functionality can be achieved by a single AND operation on two bit vectors

63 Internally: Filling the Chart: Larger Constituents Can a given non-terminal LHS be inserted into a given chart cell [b] [e]? Get RHS1, RHS2 from grammar Vector 1 Contains bits stored in chart [ b ] [ b..b+1..e-1 ] [ RHS1 ] Vector 2 Contains bits stored in chart [ b+1..b+2..e ] [ e ] [ RHS2 ]

64 Filling the Chart: Larger Constituents If a bitwise AND operation on the two new vectors produces one bit = 1 A valid substructure for LHS has been found LHS can be inserted into the chart cell Let's look at an example

65 Mary feeds the otter Example: Lets determine if NP should go into cell [3] [4] ?? S, NP, N, VP, V, DET

66 Should NP go into [3] [4]? First, we consult the grammar We find a rule NP DET N, so allowed right-hand sides for NP are RHS1 = DET RHS2 = N Reminder: Rules v1 = chart [ b ] [ b.. b+1.. e-1] [ RHS1 ] v2 = chart [ b+1.. b+2.. e ] [ e ] [ RHS2 ] Vector1 = 1 chart [3] [3] = RHS1 = DET? yes, so insert 1 Vector2 = 1 chart [4] [4] = RHS2 = N? yes, so insert 1 Vector1 AND Vector2 = 1, so insert NP

67 Mary feeds the otter Example: Lets determine if NP should go into cell [3] [4]. Yes! ? S, NP, N, VP, V, DET

68 Thank you for your attention!

69 References Earley, Jay: An efficient context-free parsing algorithm. Communications of the ACM, 13(2):94 102, Jurafsky, Daniel and Martin, James H.: Speech and Language Processing: An Introduction to Natural Language Processing, Speech Recognition, and Computational Linguistics. 2nd edition. Prentice-Hall Kay, Martin: Algorithm schemata and data structures in syntactic processing. In Readings in natural language processing, pages Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, Kay, Martin: Lecture Slides of the Course 'Basic Algorithms for Computational Linguistics' Schmid, Helmut: Efficient Parsing of Highly Ambiguous Context-Free Grammars with Bit Vectors. In Proceedings of Coling 2004, pages , Geneva, Switzerland, Wirén, Mats: A Comparison of Rule-Invocation Strategies in Context-Free Chart Parsing

70 Initialization introduces a new non-terminal start symbol X and a new end symbol EOS adds EOS to the end of the input string for each root symbol R of the grammar: add to the chart[0,0] an edge of the form: X. R EOS

71 Predictor for all non-terminals N directly following a dot (in the current state set): and for each grammar rule with N as LHS: add a new edge with LHS = N RHS according to grammar, but dot first element of RHS start and end = end of original state

72 Scanner for all terminal symbols immediately following a dot: compare terminal symbol with input string starting at end position of current edge if they match: add new edge to the chart with dot moved over the terminal symbol end position incremented by 1

73 Completer If the dot is last element of a production with LHS of type T find edges that are still waiting for a constituent of the type T end where the complete edge is starting Add to the chart an edge with dot moved over T end position = end position of completed edge

Bottom-Up Parsing. An Introductory Example

Bottom-Up Parsing. An Introductory Example Bottom-Up Parsing Bottom-up parsing is more general than top-down parsing Just as efficient Builds on ideas in top-down parsing Bottom-up is the preferred method in practice Reading: Section 4.5 An Introductory

More information

Outline of today s lecture

Outline of today s lecture Outline of today s lecture Generative grammar Simple context free grammars Probabilistic CFGs Formalism power requirements Parsing Modelling syntactic structure of phrases and sentences. Why is it useful?

More information

If-Then-Else Problem (a motivating example for LR grammars)

If-Then-Else Problem (a motivating example for LR grammars) If-Then-Else Problem (a motivating example for LR grammars) If x then y else z If a then if b then c else d this is analogous to a bracket notation when left brackets >= right brackets: [ [ ] ([ i ] j,

More information

Syntaktická analýza. Ján Šturc. Zima 208

Syntaktická analýza. Ján Šturc. Zima 208 Syntaktická analýza Ján Šturc Zima 208 Position of a Parser in the Compiler Model 2 The parser The task of the parser is to check syntax The syntax-directed translation stage in the compiler s front-end

More information

A Chart Parsing implementation in Answer Set Programming

A Chart Parsing implementation in Answer Set Programming A Chart Parsing implementation in Answer Set Programming Ismael Sandoval Cervantes Ingenieria en Sistemas Computacionales ITESM, Campus Guadalajara [email protected] Rogelio Dávila Pérez Departamento de

More information

Pushdown automata. Informatics 2A: Lecture 9. Alex Simpson. 3 October, 2014. School of Informatics University of Edinburgh [email protected].

Pushdown automata. Informatics 2A: Lecture 9. Alex Simpson. 3 October, 2014. School of Informatics University of Edinburgh als@inf.ed.ac. Pushdown automata Informatics 2A: Lecture 9 Alex Simpson School of Informatics University of Edinburgh [email protected] 3 October, 2014 1 / 17 Recap of lecture 8 Context-free languages are defined by context-free

More information

Dynamic Programming. Lecture 11. 11.1 Overview. 11.2 Introduction

Dynamic Programming. Lecture 11. 11.1 Overview. 11.2 Introduction Lecture 11 Dynamic Programming 11.1 Overview Dynamic Programming is a powerful technique that allows one to solve many different types of problems in time O(n 2 ) or O(n 3 ) for which a naive approach

More information

5. A full binary tree with n leaves contains [A] n nodes. [B] log n 2 nodes. [C] 2n 1 nodes. [D] n 2 nodes.

5. A full binary tree with n leaves contains [A] n nodes. [B] log n 2 nodes. [C] 2n 1 nodes. [D] n 2 nodes. 1. The advantage of.. is that they solve the problem if sequential storage representation. But disadvantage in that is they are sequential lists. [A] Lists [B] Linked Lists [A] Trees [A] Queues 2. The

More information

CS143 Handout 08 Summer 2008 July 02, 2007 Bottom-Up Parsing

CS143 Handout 08 Summer 2008 July 02, 2007 Bottom-Up Parsing CS143 Handout 08 Summer 2008 July 02, 2007 Bottom-Up Parsing Handout written by Maggie Johnson and revised by Julie Zelenski. Bottom-up parsing As the name suggests, bottom-up parsing works in the opposite

More information

Introduction. BM1 Advanced Natural Language Processing. Alexander Koller. 17 October 2014

Introduction. BM1 Advanced Natural Language Processing. Alexander Koller. 17 October 2014 Introduction! BM1 Advanced Natural Language Processing Alexander Koller! 17 October 2014 Outline What is computational linguistics? Topics of this course Organizational issues Siri Text prediction Facebook

More information

Scanning and parsing. Topics. Announcements Pick a partner by Monday Makeup lecture will be on Monday August 29th at 3pm

Scanning and parsing. Topics. Announcements Pick a partner by Monday Makeup lecture will be on Monday August 29th at 3pm Scanning and Parsing Announcements Pick a partner by Monday Makeup lecture will be on Monday August 29th at 3pm Today Outline of planned topics for course Overall structure of a compiler Lexical analysis

More information

DEPENDENCY PARSING JOAKIM NIVRE

DEPENDENCY PARSING JOAKIM NIVRE DEPENDENCY PARSING JOAKIM NIVRE Contents 1. Dependency Trees 1 2. Arc-Factored Models 3 3. Online Learning 3 4. Eisner s Algorithm 4 5. Spanning Tree Parsing 6 References 7 A dependency parser analyzes

More information

FIRST and FOLLOW sets a necessary preliminary to constructing the LL(1) parsing table

FIRST and FOLLOW sets a necessary preliminary to constructing the LL(1) parsing table FIRST and FOLLOW sets a necessary preliminary to constructing the LL(1) parsing table Remember: A predictive parser can only be built for an LL(1) grammar. A grammar is not LL(1) if it is: 1. Left recursive,

More information

LZ77. Example 2.10: Let T = badadadabaab and assume d max and l max are large. phrase b a d adadab aa b

LZ77. Example 2.10: Let T = badadadabaab and assume d max and l max are large. phrase b a d adadab aa b LZ77 The original LZ77 algorithm works as follows: A phrase T j starting at a position i is encoded as a triple of the form distance, length, symbol. A triple d, l, s means that: T j = T [i...i + l] =

More information

Accelerating and Evaluation of Syntactic Parsing in Natural Language Question Answering Systems

Accelerating and Evaluation of Syntactic Parsing in Natural Language Question Answering Systems Accelerating and Evaluation of Syntactic Parsing in Natural Language Question Answering Systems cation systems. For example, NLP could be used in Question Answering (QA) systems to understand users natural

More information

COMPUTER SCIENCE (5651) Test at a Glance

COMPUTER SCIENCE (5651) Test at a Glance COMPUTER SCIENCE (5651) Test at a Glance Test Name Computer Science Test Code 5651 Time Number of Questions Test Delivery 3 hours 100 selected-response questions Computer delivered Content Categories Approximate

More information

Formal Grammars and Languages

Formal Grammars and Languages Formal Grammars and Languages Tao Jiang Department of Computer Science McMaster University Hamilton, Ontario L8S 4K1, Canada Bala Ravikumar Department of Computer Science University of Rhode Island Kingston,

More information

. Learn the number of classes and the structure of each class using similarity between unlabeled training patterns

. Learn the number of classes and the structure of each class using similarity between unlabeled training patterns Outline Part 1: of data clustering Non-Supervised Learning and Clustering : Problem formulation cluster analysis : Taxonomies of Clustering Techniques : Data types and Proximity Measures : Difficulties

More information

Last not not Last Last Next! Next! Line Line Forms Forms Here Here Last In, First Out Last In, First Out not Last Next! Call stack: Worst line ever!

Last not not Last Last Next! Next! Line Line Forms Forms Here Here Last In, First Out Last In, First Out not Last Next! Call stack: Worst line ever! ECE 551 C++ Programming, Data structures, and Algorithms Abstract Data Type: Stack Last In First Out (LIFO) 1 2 2 1 4 3 1 3 4 Stacks in Programming Worst line ever! 5 3 1 5 Stacks are not useful for waiting

More information

Machine Learning for natural language processing

Machine Learning for natural language processing Machine Learning for natural language processing Introduction Laura Kallmeyer Heinrich-Heine-Universität Düsseldorf Summer 2016 1 / 13 Introduction Goal of machine learning: Automatically learn how to

More information

Positional Numbering System

Positional Numbering System APPENDIX B Positional Numbering System A positional numbering system uses a set of symbols. The value that each symbol represents, however, depends on its face value and its place value, the value associated

More information

Compiler I: Syntax Analysis Human Thought

Compiler I: Syntax Analysis Human Thought Course map Compiler I: Syntax Analysis Human Thought Abstract design Chapters 9, 12 H.L. Language & Operating Sys. Compiler Chapters 10-11 Virtual Machine Software hierarchy Translator Chapters 7-8 Assembly

More information

Learning Translation Rules from Bilingual English Filipino Corpus

Learning Translation Rules from Bilingual English Filipino Corpus Proceedings of PACLIC 19, the 19 th Asia-Pacific Conference on Language, Information and Computation. Learning Translation s from Bilingual English Filipino Corpus Michelle Wendy Tan, Raymond Joseph Ang,

More information

COMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing

COMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing COMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing The scanner (or lexical analyzer) of a compiler processes the source program, recognizing

More information

2) Write in detail the issues in the design of code generator.

2) Write in detail the issues in the design of code generator. COMPUTER SCIENCE AND ENGINEERING VI SEM CSE Principles of Compiler Design Unit-IV Question and answers UNIT IV CODE GENERATION 9 Issues in the design of code generator The target machine Runtime Storage

More information

Classification of Natural Language Interfaces to Databases based on the Architectures

Classification of Natural Language Interfaces to Databases based on the Architectures Volume 1, No. 11, ISSN 2278-1080 The International Journal of Computer Science & Applications (TIJCSA) RESEARCH PAPER Available Online at http://www.journalofcomputerscience.com/ Classification of Natural

More information

Circuit Analysis using the Node and Mesh Methods

Circuit Analysis using the Node and Mesh Methods Circuit Analysis using the Node and Mesh Methods We have seen that using Kirchhoff s laws and Ohm s law we can analyze any circuit to determine the operating conditions (the currents and voltages). The

More information

Lexical analysis FORMAL LANGUAGES AND COMPILERS. Floriano Scioscia. Formal Languages and Compilers A.Y. 2015/2016

Lexical analysis FORMAL LANGUAGES AND COMPILERS. Floriano Scioscia. Formal Languages and Compilers A.Y. 2015/2016 Master s Degree Course in Computer Engineering Formal Languages FORMAL LANGUAGES AND COMPILERS Lexical analysis Floriano Scioscia 1 Introductive terminological distinction Lexical string or lexeme = meaningful

More information

ALGEBRA. sequence, term, nth term, consecutive, rule, relationship, generate, predict, continue increase, decrease finite, infinite

ALGEBRA. sequence, term, nth term, consecutive, rule, relationship, generate, predict, continue increase, decrease finite, infinite ALGEBRA Pupils should be taught to: Generate and describe sequences As outcomes, Year 7 pupils should, for example: Use, read and write, spelling correctly: sequence, term, nth term, consecutive, rule,

More information

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS 1. SYSTEMS OF EQUATIONS AND MATRICES 1.1. Representation of a linear system. The general system of m equations in n unknowns can be written a 11 x 1 + a 12 x 2 +

More information

Data Structure [Question Bank]

Data Structure [Question Bank] Unit I (Analysis of Algorithms) 1. What are algorithms and how they are useful? 2. Describe the factor on best algorithms depends on? 3. Differentiate: Correct & Incorrect Algorithms? 4. Write short note:

More information

LESSON QUESTIONS: Bar charts

LESSON QUESTIONS: Bar charts LESSON QUESTIONS: Bar charts FOCUS QUESTION: How can I show proportions and relative sizes of different data groups? Contents EXAMPLE 1: Load the data about New York contagious diseases EXAMPLE 2: Calculate

More information

Syntactic Theory. Background and Transformational Grammar. Dr. Dan Flickinger & PD Dr. Valia Kordoni

Syntactic Theory. Background and Transformational Grammar. Dr. Dan Flickinger & PD Dr. Valia Kordoni Syntactic Theory Background and Transformational Grammar Dr. Dan Flickinger & PD Dr. Valia Kordoni Department of Computational Linguistics Saarland University October 28, 2011 Early work on grammar There

More information

Improving Upon Earley s Parsing Algorithm In Prolog

Improving Upon Earley s Parsing Algorithm In Prolog Improving Upon Earley s Parsing Algorithm In Prolog Matt Voss Artificial Intelligence Center University of Georgia Athens, GA 30602 May 7, 2004 Abstract This paper presents a modification of the Earley

More information

Effective Self-Training for Parsing

Effective Self-Training for Parsing Effective Self-Training for Parsing David McClosky [email protected] Brown Laboratory for Linguistic Information Processing (BLLIP) Joint work with Eugene Charniak and Mark Johnson David McClosky - [email protected]

More information

ML for the Working Programmer

ML for the Working Programmer ML for the Working Programmer 2nd edition Lawrence C. Paulson University of Cambridge CAMBRIDGE UNIVERSITY PRESS CONTENTS Preface to the Second Edition Preface xiii xv 1 Standard ML 1 Functional Programming

More information

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS Systems of Equations and Matrices Representation of a linear system The general system of m equations in n unknowns can be written a x + a 2 x 2 + + a n x n b a

More information

Special Topics in Computer Science

Special Topics in Computer Science Special Topics in Computer Science NLP in a Nutshell CS492B Spring Semester 2009 Jong C. Park Computer Science Department Korea Advanced Institute of Science and Technology INTRODUCTION Jong C. Park, CS

More information

CSCI 3136 Principles of Programming Languages

CSCI 3136 Principles of Programming Languages CSCI 3136 Principles of Programming Languages Faculty of Computer Science Dalhousie University Winter 2013 CSCI 3136 Principles of Programming Languages Faculty of Computer Science Dalhousie University

More information

Fast nondeterministic recognition of context-free languages using two queues

Fast nondeterministic recognition of context-free languages using two queues Fast nondeterministic recognition of context-free languages using two queues Burton Rosenberg University of Miami Abstract We show how to accept a context-free language nondeterministically in O( n log

More information

ALGEBRA. Find the nth term, justifying its form by referring to the context in which it was generated

ALGEBRA. Find the nth term, justifying its form by referring to the context in which it was generated ALGEBRA Pupils should be taught to: Find the nth term, justifying its form by referring to the context in which it was generated As outcomes, Year 7 pupils should, for example: Generate sequences from

More information

Symbiosis of Evolutionary Techniques and Statistical Natural Language Processing

Symbiosis of Evolutionary Techniques and Statistical Natural Language Processing 1 Symbiosis of Evolutionary Techniques and Statistical Natural Language Processing Lourdes Araujo Dpto. Sistemas Informáticos y Programación, Univ. Complutense, Madrid 28040, SPAIN (email: [email protected])

More information

Scoping (Readings 7.1,7.4,7.6) Parameter passing methods (7.5) Building symbol tables (7.6)

Scoping (Readings 7.1,7.4,7.6) Parameter passing methods (7.5) Building symbol tables (7.6) Semantic Analysis Scoping (Readings 7.1,7.4,7.6) Static Dynamic Parameter passing methods (7.5) Building symbol tables (7.6) How to use them to find multiply-declared and undeclared variables Type checking

More information

Introduction to Data Structures

Introduction to Data Structures Introduction to Data Structures Albert Gural October 28, 2011 1 Introduction When trying to convert from an algorithm to the actual code, one important aspect to consider is how to store and manipulate

More information

Honors Class (Foundations of) Informatics. Tom Verhoeff. Department of Mathematics & Computer Science Software Engineering & Technology

Honors Class (Foundations of) Informatics. Tom Verhoeff. Department of Mathematics & Computer Science Software Engineering & Technology Honors Class (Foundations of) Informatics Tom Verhoeff Department of Mathematics & Computer Science Software Engineering & Technology www.win.tue.nl/~wstomv/edu/hci c 2011, T. Verhoeff @ TUE.NL 1/20 Information

More information

Parsing Beyond Context-Free Grammars: Introduction

Parsing Beyond Context-Free Grammars: Introduction Parsing Beyond Context-Free Grammars: Introduction Laura Kallmeyer Heinrich-Heine-Universität Düsseldorf Sommersemester 2016 Parsing Beyond CFG 1 Introduction Overview 1. CFG and natural languages 2. Polynomial

More information

13 MATH FACTS 101. 2 a = 1. 7. The elements of a vector have a graphical interpretation, which is particularly easy to see in two or three dimensions.

13 MATH FACTS 101. 2 a = 1. 7. The elements of a vector have a graphical interpretation, which is particularly easy to see in two or three dimensions. 3 MATH FACTS 0 3 MATH FACTS 3. Vectors 3.. Definition We use the overhead arrow to denote a column vector, i.e., a linear segment with a direction. For example, in three-space, we write a vector in terms

More information

Analysis of Algorithms, I

Analysis of Algorithms, I Analysis of Algorithms, I CSOR W4231.002 Eleni Drinea Computer Science Department Columbia University Thursday, February 26, 2015 Outline 1 Recap 2 Representing graphs 3 Breadth-first search (BFS) 4 Applications

More information

DATA STRUCTURES USING C

DATA STRUCTURES USING C DATA STRUCTURES USING C QUESTION BANK UNIT I 1. Define data. 2. Define Entity. 3. Define information. 4. Define Array. 5. Define data structure. 6. Give any two applications of data structures. 7. Give

More information

Systematically Enhancing Black-Box Web Vulnerability Scanners

Systematically Enhancing Black-Box Web Vulnerability Scanners Systematically Enhancing Black-Box Web Vulnerability Scanners Thesis submitted in partial fulfillment of the requirements for the degree of Master of Science (by Research) in Computer Science by Sai Sathyanarayan

More information

This activity will show you how to draw graphs of algebraic functions in Excel.

This activity will show you how to draw graphs of algebraic functions in Excel. This activity will show you how to draw graphs of algebraic functions in Excel. Open a new Excel workbook. This is Excel in Office 2007. You may not have used this version before but it is very much the

More information

Model 2.4 Faculty member + student

Model 2.4 Faculty member + student Model 2.4 Faculty member + student Course syllabus for Formal languages and Automata Theory. Faculty member information: Name of faculty member responsible for the course Office Hours Office Number Email

More information

Samples of Allowable Supplemental Aids for STAAR Assessments. Updates from 12/2011

Samples of Allowable Supplemental Aids for STAAR Assessments. Updates from 12/2011 Samples of Allowable Supplemental Aids for STAAR Assessments Updates from 12/2011 All Subjects: Mnemonic Devices A mnemonic device is a learning technique that assists with memory. Only mnemonic devices

More information

Overview. Essential Questions. Grade 8 Mathematics, Quarter 4, Unit 4.3 Finding Volume of Cones, Cylinders, and Spheres

Overview. Essential Questions. Grade 8 Mathematics, Quarter 4, Unit 4.3 Finding Volume of Cones, Cylinders, and Spheres Cylinders, and Spheres Number of instruction days: 6 8 Overview Content to Be Learned Evaluate the cube root of small perfect cubes. Simplify problems using the formulas for the volumes of cones, cylinders,

More information

The «include» and «extend» Relationships in Use Case Models

The «include» and «extend» Relationships in Use Case Models The «include» and «extend» Relationships in Use Case Models Introduction UML defines three stereotypes of association between Use Cases, «include», «extend» and generalisation. For the most part, the popular

More information

Compiler Construction

Compiler Construction Compiler Construction Regular expressions Scanning Görel Hedin Reviderad 2013 01 23.a 2013 Compiler Construction 2013 F02-1 Compiler overview source code lexical analysis tokens intermediate code generation

More information

APA-STYLE TABLES in MICROSOFT WORD 2007

APA-STYLE TABLES in MICROSOFT WORD 2007 Twin Cities Writing Center APA-STYLE TABLES in MICROSOFT WORD 2007 Before inserting a table into your paper, make sure a table is an appropriate way to communicate your information. Read about the use

More information

Introduction to Data-flow analysis

Introduction to Data-flow analysis Introduction to Data-flow analysis Last Time LULESH intro Typed, 3-address code Basic blocks and control flow graphs LLVM Pass architecture Data dependencies, DU chains, and SSA Today CFG and SSA example

More information

Design Patterns in Parsing

Design Patterns in Parsing Abstract Axel T. Schreiner Department of Computer Science Rochester Institute of Technology 102 Lomb Memorial Drive Rochester NY 14623-5608 USA [email protected] Design Patterns in Parsing James E. Heliotis

More information

Statistical Machine Translation

Statistical Machine Translation Statistical Machine Translation Some of the content of this lecture is taken from previous lectures and presentations given by Philipp Koehn and Andy Way. Dr. Jennifer Foster National Centre for Language

More information

REPORT WRITING GUIDE

REPORT WRITING GUIDE Report Writing Guide F2009 1 REPORT WRITING GUIDE Introduction The importance of good report writing and data presentation cannot be overemphasized. No matter how good an experiment, or how brilliant a

More information

First Bytes Programming Lab 2

First Bytes Programming Lab 2 First Bytes Programming Lab 2 This lab is available online at www.cs.utexas.edu/users/scottm/firstbytes. Introduction: In this lab you will investigate the properties of colors and how they are displayed

More information

Mildly Context Sensitive Grammar Formalisms

Mildly Context Sensitive Grammar Formalisms Mildly Context Sensitive Grammar Formalisms Petra Schmidt Pfarrer-Lauer-Strasse 23 66386 St. Ingbert [email protected] Overview 3 Tree-djoining-Grammars 4 Co 7 8 9 CCG 9 LIG 10 TG 13 Linear

More information

A GUIDE TO PROCESS MAPPING AND IMPROVEMENT

A GUIDE TO PROCESS MAPPING AND IMPROVEMENT A GUIDE TO PROCESS MAPPING AND IMPROVEMENT Prepared by the CPS Activity Based Costing Team December 2012 CONTENTS 1. Introduction Page 3 2. What is process mapping? Page 4 3. Why process map? Page 4 4.

More information

Philadelphia University Faculty of Information Technology Department of Computer Science First Semester, 2007/2008.

Philadelphia University Faculty of Information Technology Department of Computer Science First Semester, 2007/2008. Philadelphia University Faculty of Information Technology Department of Computer Science First Semester, 2007/2008 Course Syllabus Course Title: Theory of Computation Course Level: 3 Lecture Time: Course

More information

Lecture 1: Systems of Linear Equations

Lecture 1: Systems of Linear Equations MTH Elementary Matrix Algebra Professor Chao Huang Department of Mathematics and Statistics Wright State University Lecture 1 Systems of Linear Equations ² Systems of two linear equations with two variables

More information

Introduction. Compiler Design CSE 504. Overview. Programming problems are easier to solve in high-level languages

Introduction. Compiler Design CSE 504. Overview. Programming problems are easier to solve in high-level languages Introduction Compiler esign CSE 504 1 Overview 2 3 Phases of Translation ast modifled: Mon Jan 28 2013 at 17:19:57 EST Version: 1.5 23:45:54 2013/01/28 Compiled at 11:48 on 2015/01/28 Compiler esign Introduction

More information

Creating a Poster Presentation using PowerPoint

Creating a Poster Presentation using PowerPoint Creating a Poster Presentation using PowerPoint Course Description: This course is designed to assist you in creating eye-catching effective posters for presentation of research findings at scientific

More information

Constraints in Phrase Structure Grammar

Constraints in Phrase Structure Grammar Constraints in Phrase Structure Grammar Phrase Structure Grammar no movement, no transformations, context-free rules X/Y = X is a category which dominates a missing category Y Let G be the set of basic

More information

PLG: a Framework for the Generation of Business Process Models and their Execution Logs

PLG: a Framework for the Generation of Business Process Models and their Execution Logs PLG: a Framework for the Generation of Business Process Models and their Execution Logs Andrea Burattin and Alessandro Sperduti Department of Pure and Applied Mathematics University of Padua, Italy {burattin,sperduti}@math.unipd.it

More information

Designing forms for auto field detection in Adobe Acrobat

Designing forms for auto field detection in Adobe Acrobat Adobe Acrobat 9 Technical White Paper Designing forms for auto field detection in Adobe Acrobat Create electronic forms more easily by using the right elements in your authoring program to take advantage

More information

Pattern Insight Clone Detection

Pattern Insight Clone Detection Pattern Insight Clone Detection TM The fastest, most effective way to discover all similar code segments What is Clone Detection? Pattern Insight Clone Detection is a powerful pattern discovery technology

More information

Analysis of Compression Algorithms for Program Data

Analysis of Compression Algorithms for Program Data Analysis of Compression Algorithms for Program Data Matthew Simpson, Clemson University with Dr. Rajeev Barua and Surupa Biswas, University of Maryland 12 August 3 Abstract Insufficient available memory

More information

WIMP: Windows, Icons, Menus (or mice), Pointers (or pull-down menus) Kathy Lynch and Julie Fisher 2004. Topic Overview. Suggested Readings.

WIMP: Windows, Icons, Menus (or mice), Pointers (or pull-down menus) Kathy Lynch and Julie Fisher 2004. Topic Overview. Suggested Readings. IMS3470 Human-computer interaction WIMP: Windows, Icons, Menus (or mice), Pointers (or pull-down menus) Kathy Lynch and Julie Fisher 2004 Topic Overview WIMP or is it GUI? (interface model using direct

More information

. 0 1 10 2 100 11 1000 3 20 1 2 3 4 5 6 7 8 9

. 0 1 10 2 100 11 1000 3 20 1 2 3 4 5 6 7 8 9 Introduction The purpose of this note is to find and study a method for determining and counting all the positive integer divisors of a positive integer Let N be a given positive integer We say d is a

More information

Acquisition Lesson Planning Form Key Standards addressed in this Lesson: MM2A3d,e Time allotted for this Lesson: 4 Hours

Acquisition Lesson Planning Form Key Standards addressed in this Lesson: MM2A3d,e Time allotted for this Lesson: 4 Hours Acquisition Lesson Planning Form Key Standards addressed in this Lesson: MM2A3d,e Time allotted for this Lesson: 4 Hours Essential Question: LESSON 4 FINITE ARITHMETIC SERIES AND RELATIONSHIP TO QUADRATIC

More information

FIRST GRADE MATH Summer 2011

FIRST GRADE MATH Summer 2011 Standards Summer 2011 1 OA.1 Use addition and subtraction within 20 to solve word problems involving situations of adding to, taking from, putting together, taking apart, and comparing, with unknowns in

More information

The responses to this assessment will help you identify key opportunities to derive full value from the Net Promoter system process.

The responses to this assessment will help you identify key opportunities to derive full value from the Net Promoter system process. The purpose of this assessment is to understand the progress your company or organization is making against a full potential Net Promoter system implementation. The responses to this assessment will help

More information

JAWAA: Easy Web-Based Animation from CS 0 to Advanced CS Courses

JAWAA: Easy Web-Based Animation from CS 0 to Advanced CS Courses JAWAA: Easy Web-Based Animation from CS 0 to Advanced CS Courses Ayonike Akingbade, Thomas Finley, Diana Jackson, Pretesh Patel, and Susan H. Rodger Department of Computer Science Duke University Durham,

More information

(Refer Slide Time: 2:03)

(Refer Slide Time: 2:03) Control Engineering Prof. Madan Gopal Department of Electrical Engineering Indian Institute of Technology, Delhi Lecture - 11 Models of Industrial Control Devices and Systems (Contd.) Last time we were

More information

Data Structures. Chapter 8

Data Structures. Chapter 8 Chapter 8 Data Structures Computer has to process lots and lots of data. To systematically process those data efficiently, those data are organized as a whole, appropriate for the application, called a

More information

Recognition. Sanja Fidler CSC420: Intro to Image Understanding 1 / 28

Recognition. Sanja Fidler CSC420: Intro to Image Understanding 1 / 28 Recognition Topics that we will try to cover: Indexing for fast retrieval (we still owe this one) History of recognition techniques Object classification Bag-of-words Spatial pyramids Neural Networks Object

More information

Object-Oriented Software Specification in Programming Language Design and Implementation

Object-Oriented Software Specification in Programming Language Design and Implementation Object-Oriented Software Specification in Programming Language Design and Implementation Barrett R. Bryant and Viswanathan Vaidyanathan Department of Computer and Information Sciences University of Alabama

More information

PARALLELIZED SUDOKU SOLVING ALGORITHM USING OpenMP

PARALLELIZED SUDOKU SOLVING ALGORITHM USING OpenMP PARALLELIZED SUDOKU SOLVING ALGORITHM USING OpenMP Sruthi Sankar CSE 633: Parallel Algorithms Spring 2014 Professor: Dr. Russ Miller Sudoku: the puzzle A standard Sudoku puzzles contains 81 grids :9 rows

More information

E XPLORING QUADRILATERALS

E XPLORING QUADRILATERALS E XPLORING QUADRILATERALS E 1 Geometry State Goal 9: Use geometric methods to analyze, categorize and draw conclusions about points, lines, planes and space. Statement of Purpose: The activities in this

More information

Introduction to Logic in Computer Science: Autumn 2006

Introduction to Logic in Computer Science: Autumn 2006 Introduction to Logic in Computer Science: Autumn 2006 Ulle Endriss Institute for Logic, Language and Computation University of Amsterdam Ulle Endriss 1 Plan for Today Now that we have a basic understanding

More information

Naming vs. Locating Entities

Naming vs. Locating Entities Naming vs. Locating Entities Till now: resources with fixed locations (hierarchical, caching,...) Problem: some entity may change its location frequently Simple solution: record aliases for the new address

More information

OVAL Developer Days. July 11-12, 2006

OVAL Developer Days. July 11-12, 2006 OVAL Developer Days July 11-12, 2006 Introduction...- 3 - Attendee List...- 4 - Day One...- 5 - Session 1...- 5 - OVAL Tutorial... - 5 - Session 2...- 5 - External Repositories... - 5 - Inventory Definitions...

More information

File by OCR Manual. Updated December 9, 2008

File by OCR Manual. Updated December 9, 2008 File by OCR Manual Updated December 9, 2008 edocfile, Inc. 2709 Willow Oaks Drive Valrico, FL 33594 Phone 813-413-5599 Email [email protected] www.edocfile.com File by OCR Please note: This program is

More information

Planar Graphs. Complement to Chapter 2, The Villas of the Bellevue

Planar Graphs. Complement to Chapter 2, The Villas of the Bellevue Planar Graphs Complement to Chapter 2, The Villas of the Bellevue In the chapter The Villas of the Bellevue, Manori gives Courtel the following definition. Definition A graph is planar if it can be drawn

More information

Fast Sequential Summation Algorithms Using Augmented Data Structures

Fast Sequential Summation Algorithms Using Augmented Data Structures Fast Sequential Summation Algorithms Using Augmented Data Structures Vadim Stadnik [email protected] Abstract This paper provides an introduction to the design of augmented data structures that offer

More information

Overview of E0222: Automata and Computability

Overview of E0222: Automata and Computability Overview of E0222: Automata and Computability Deepak D Souza Department of Computer Science and Automation Indian Institute of Science, Bangalore. August 3, 2011 What this course is about What we study

More information