Question: data structure Project-1: Mini-Project Parser based on List implementations Project Description: Write a simple Parser in Java, that is capable of deciding, whether a simple

data structure  data structure Project-1: Mini-Project Parser based on List implementations Project Description:
Write a simple Parser in Java, that is capable of deciding, whether
a simple Arabic or English sentence is syntactic correct or not. A
possible Grammar for such sentences can be defined as follows: :: ::

Project-1: Mini-Project Parser based on List implementations Project Description: Write a simple Parser in Java, that is capable of deciding, whether a simple Arabic or English sentence is syntactic correct or not. A possible Grammar for such sentences can be defined as follows: :: :: :: :: a the some certain .... <: boy student dog ischool baby boys students data structure>: like likes I speak speaks study studies ... 2) Alternatively, you can use the following Pattern for your sentences :: (for English) or :: Verb> (for Arabic) See My Lecture Notes and Pervious Students projects. Eexamples Based on the above grammar, the following sentences are correct: [The, baby, speaks, English) [The, boy, studies, English) and even [The, boy, study, English) [a, boy, studies, a, school) However: (speaks, English, baby, aj (study, a, English, like) are not. Hints: A correct sentence can be regarded as a list " the, student, likes, English]" containing sub lists and word object at specific order. (the, student), represents a List of a Nominal Phrase (NP)and [likes, English) represents a List of a Verbal Phrase (VP) Appending a List of VP to a List of NP yields a valid Sentence. This apply also to a List of a Determiner like (the) and a list of Noun like (student) etc. A possible solution: To create a parser for such sentences, we need at least the following lists as lexicon: 1. Determiner: a list of determiner such [a, the, some...] 2. Noun: a list of nouns such as (student, baby, ...) 3. Verb: a list of verbs such that (speak, speaks, study,...] 4. However, the Lists Nominal Phrase Verbal Phrase Sentence represent Lists containing sub lists, for example: The Noun Phrase list will contain a concatenation of the Determiner and Noun Lists in that order, and the Verbal Phrase list will contain a concatenation of the Verb and NP list, etc. The final list will be called Sentence, and it will be composed of the concatenation of [[NP), [VP]] Final Remake: In an advanced stage, you can improve your Parser by: Using more advanced Data Structures such as a Dictionaries or tables instead of lists on the word levels Generating a Parse-Trees of each correct sentence to optimize the search, you can also employ graph-based search such as Depth-First operating on graph (Stack-based search) or Breath-first Search (based on a queue) Projects (Details found in the Lecture Notes) Notes on the Projects Project 1 Simple Passer for checking NLP word-order (English, Arabic). Details see Slides and Lecture notes website Project 2 write a Java Program that is capable of Matching tags in an HTML document select any HTML Document that contains Arabic Texts). You can apply your checker to cheek Java based syntax programs or Arithmetic Expressions with Braces. Hint: import. Util.StringTokenizer; Use our Stack implementation or Java class Stack Project (Optional Projects): 1. Create a telephone directory using a Dictionary 2. Create an index containing the Frequencies of words in a big text file 3. Word Index (which words in which lines dictionary) 4. Any Application related to Information Retrieval (needs approving)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!