A Vısual Basic Application Ogf Early Algorithm

A Vısual Basic Application Ogf Early Algorithm

VISUAL BASIC APPLICATION OF THE EARLEY ALGORITHM Zeynep ALTAN [email protected] Istanbul University, Faculty of Engineering, Department of Computer Science, 34850 Avcılar, Istanbul Key Words: Recognition and Parsing, Earley Algorithm, Computational Linguistics, Formal Language Theory. algorithm (bottom-up parsing methods).2 This ABSTRACT algorithm has some advantages according to As abstract systems have become more sophisticated, other context-free based algorithms. For natural language processing systems have been one example; Knuth’s LR(k) algorithm can only of the most interesting topics of computer science. work on some subclass of grammars, so they can Because of the contributions of Turkish to be done in the time n and, they are called as computational applications and the language’s rich restricted algorithms including a lot of linguistic properties, Turkish studies are approved in ambiguities. CKY algorithm parses any string linguistic theory. This study presents a Visual Basic 3 application of the Earley Algorithm that parses the with the length n in time proportional to O(n ) sentences being independent from the language in a [7]. The time complexity of the Earley visual environment. Algorithm for CFGs also depends on a number of special classes of grammars. If the parsing steps I. INTRODUCTION are defined according to an unambiguous The purpose of the abstract systems has been the grammar, the processes execute in O(n2) simulation of the words or the sentences to obtain reasonably defined elementary operations, but for the speech recognition algorithms. Context-Free ambiguous context-free grammars it is required Grammars (CFGs ) which are widely used to O(n3) elementary operations, when the length of parse the natural language syntax are the the input is n. Another advantage of the Earley fundamental grammars of these systems. Algorithm is the definition of the grammar. CFG Although other types of the grammars in grammar used by this algorithm does not require Chomsky hierarchy1 are fairly powerful, they to be defined in the Chomsky Normal Form have some disadvantages during the modelling. (CNF) 3. For example; it may not formally be possible to Pitsch presented a generalisation of the model the syntax of sentences by context- context-free LL (k) notion onto coupled context- sensitive grammar. Because, time complexity free grammars by constituting the steps of the problem may arise while the algorithm parses a predictive context-free parsing machine sentence. Therefore, it is required to choose the according to Earley parser [5]. Stolcke defined grammars with less time complexity instead of an extension of Earley’s parser for stochastic the context-free grammars computing the prefix and grammars that parse the text more effectively substring probabilities, which are suitable for the than others. original Earley chart structure [1]. Thus, the The Earley Algorithm, which was constituted probable parses of substrings can be ruled out by by Jay Earley as his Ph. degree thesis, has also been built by using context-free grammar [6]. A 2 lot of artificial intelligence researchers have been CKY (Cocke -Kasami-Younger) Algorithm is a simple making use of this algorithm in their studies, procedure for recognising strings in a context-free language, which is in Chomsky Normal Form; thus the derivation tree which are about speech recognition. The Earley of any string will essentially be binary. Algorithm’s top-down control structure depends Knuth’s Algorithm works on LR (k) grammars; i.e. on both CKY parsing and Knuth’s LR (k) rightmost derivations of sentences are obtained. 3 A context-free grammar G = (N,Σ,P,S) is said to be in Chomsky Normal Form, if every rule is in one of the following forms: 1 X → YZ, X→a for X,Y,Z∈N and a ∈∑. Right Linear, Context-Free, Context-Sensitive and Unrestricted Grammars define the Chomsky hierarchy of grammars. 1 the top-down modelling. Briscoe and Carrol inflected words [10], the most important developed an interactive incremental parsing disadvantage of using Early Algorithm has been system constructing the LALR (1) parse table eliminated. In this way, the declaration of all defined by ANTL (The Alvey Natural Language words in the input sentence does not require; Tools) grammar. This system includes lexical, since the root words are saved in the database, morphological and syntactic analysis of English the number of the grammar rules including [8]. terminal categories will reduce and become Most of the recognition algorithms that general containing only suffix rules. Verb depend on the formalism of tree-adjoining inflections in Turkish may also be defined by grammar (TAG)4 use the steps of Earley grammar rules. The verb in the input sentence, Algorithm to parse the sentences according to the which precedes the suffixes, is analyzed as an compiled grammar. Schabes and Schieber invariant root by querying the database, and the studied the extended derivation of TAGs with the following suffix particles may indicate voice application of Earley Algorithm deducting the set (causative, reciprocal, reflexive, passive), of Earley items on the corresponding grammar modality (necessitive, abilitative, conditional), [9]. Minnen developed the predictive left-to- negation, tense-aspect mood and person/number. right parsing of the restricted TAG(LD/LP) This property also reduces the number of rules (local dominance/linear precedence) with an defined for terminal categories including verbs. algorithm, which was closely related to the As a result, morphological analysis is very Earley parsing [4]. Thus the schematic meaningful for the determination of part-of- representation of trees and the combination of speech structure in syntactic parsing, and for the these trees with the adjunction operations could semantic analysis of a sentence. Information allow to the various permutation of the about verbal inflection is especially important for elementary structures. the word order concept [11]. Because of the contributions of Turkish to computational applications and the language’s II. TOP-DOWN APPROACH OF THE rich linguistic properties, Turkish studies are EARLEY ALGORITHM approved in linguistic theory. This study presents Any context-free rule format can be adapted a Visual Basic application of the Earley to the Earley Algorithm to parse a string or a Algorithm parsing the sentences in a visual sentence with the productions of given grammar environment. Since the tool is independent from building the left-most derivation of the strings the language, we can define grammar rules both [2]. for Turkish and English. Our next study will Let Ei,j be any state in the state set which is focus on the extension of this algorithm for derived from a consistent production. Then it can TAGs constituting a similar recogniser, so the be represented as: advantage of TAGs according to CFGs will be E i ,j : A → α .β , adapted to the recent application. We are where i is the initial position of any nonterminal planning to test the TAG(LD/LP) recognition A which is expanded to supply the condition algorithm which LD/LP are defined as i ≤ j ≤ n , i < n (n is the last symbol of input constraints and structure, respectively5. After we string ) and, j is the current state of which any described the grammar rules in Turkish string in the form x = w 1w 2…. wj-1 begins to according to morphological properties of the process. The expansion of A is repeated until the 4 preceding sentential form is completed to yield a If the sentences to be parsed are generated as small pieces, which are called elementary trees out of the phrase structure, derivation form x =w 1w 2…. wn . Any production tree-adjoining grammar (TAG) is defined as formalism. Then of the grammar gives a left most derivation as: these small pieces with some constrained conditions are * * * S⇒ w1….wi Aδ⇒ w1 ….wi αβδ ⇒ w1.…wj βδ composed to form larger pieces of tree structure. 5 [3]. The use of the top-down approximation of the Early → α β Algorithm can form a large number of unnecessary items to Thus the dotted production A . (either be predicted and unsuccessful intermediate results can be α or β may be empty ) is in E i ,j . Each state in obtained when the grammar size to be parsed is too large. the Earley Algorithm represents the following But the basic idea of parsing with TAG structure reduces components: these unnecessary predictions with the adjunction operations. The adjunctions for all derivations are eliminated to create (a) production, which is derived from the right of new relations between the supertrees of the roots and the input string scanning a part of x= w1w 2….wn ; subtrees of the foots. 2 (b) a point that shows which part of the Visual Basic is extremely flexible in production’s right side has been recognised so designing the user interfaces and makes possible far; to add user interface components. We can add (c) a pointer, back to the position looking for the these elements, for example; text boxes, dialog production in the input string ; boxes, list boxes and sign boxes, by using control (d) a lookahead (k-symbol) string, which can devices. One of the advantages of programming be used instead of successive production. with Visual Basic is the speed in developing and In this application of the Earley Algorithm, the testing of an application. Before testing, it is not lookahead string, which gives a property of required a condition that the application must be Earley states, has been neglected and a matrix finished. When a new property is added to the form with two indices has been used as the application, this property is tested; if we change pointer. something on it, this change can also be tested again. III. FORMAL EXPLANATION OF THE The application of the Earley Algorithm EARLEY ALGORITHM using this parser tests many different sentences Let G = (N,Σ, S, P) be a CFG without containing both for Turkish and English.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    6 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