5. Consider a standalone, single-user Java application which acts as a basic electronic English dictionary. A...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
5. Consider a standalone, single-user Java application which acts as a basic electronic English dictionary. A user of this application: typically searches for the meanings of an English word, and • typically searches for the words that describe the component parts of the object described by an English word, i.e. meronyms. When this Java application starts up, it loads the data from three tab-separated-value text files into the computer's main memory: wn_mp.txt, wn_s.txt and wn_g.txt. Each line in wn_s.txt contains a 9 digit ID (e.g. 100053097), an English word and its part-of-speech (i.e. noun, verb, adjective or adverb). Each line in wn_g.txt contains a 9 digit ID and the meaning of the word, which the ID refers to. Each line in wn_mp.txt contains two 9 digit IDs: ID1 and ID2. The words with ID1 are component parts (i.e. meronyms) of the words with ID2. For example, a 'wheel' is a component part of a 'car'. Note that the same English word can have more than one meaning. The same meaning can be applicable to more than one English word. Each line in the data files corresponds to one record. The 9 digit ID at the start of each record serves as a link between relevant records in the three data files. Extracts of these data files are shown in Listings 1-3. Listing 1: wn mp.txt: links a group of English words that are component parts of another group of English words 1 102670683 102958343 2 102685365 102958343 3 104563204 104561422 Listing 2: wn-s.txt: stores an English word with its part-of-speech information 1 102670683 2 102685365 accelerator noun air bag noun 3 102958343 car noun 4 102958343 automobile noun 5 104561422 water mill noun 6 104563204 waterwheel noun 7 201930738 automobile verb 8 300005205 absolute adjective 9 400003483 basically adverb (question continues on next page...) Listing 3: wn-g.txt: stores the meaning of an English word the act of departing politely 1 100053097 2 102670683 3 102685365 4 102958343 5 104561422 6 104563204 a pedal that controls the throttle valve a safety restraint in an automobile a motor vehicle with four wheels a mill powered by a water wheel a wheel that rotates by direct action of water 7 201930738 8 300005205 travel in an automobile perfect or complete or pure 9 400003483 in essence; by one's (or its) very nature a) Which TWO ADTS are the most suitable for modelling the data for this electronic English dictionary so as to support an efficient dictionary lookup? (2 marks) b) Which class of collection object defined in the Java Collections Framework (JCF) is the most suitable for modelling EACH of the ADTS you stated in part (a)? (2 marks) c) Making reference to your answers in parts (a) and (b), explain how you would use the identified types of collection objects to model the data in this electronic English dictionary, to facilitate the lookup of meronyms and their meanings of an English word. Include, in your solution, a set of partial Java classes showing how the data in the three data files (i.e. wn_mp.txt, wn_s.txt and wn_g.txt) can be modelled in order to fulfil the given requirement. Making reference to the time efficiency of each data structure used in your design, state the resulting time efficiency of the dictionary lookup operation. (11 marks) 5. Consider a standalone, single-user Java application which acts as a basic electronic English dictionary. A user of this application: typically searches for the meanings of an English word, and • typically searches for the words that describe the component parts of the object described by an English word, i.e. meronyms. When this Java application starts up, it loads the data from three tab-separated-value text files into the computer's main memory: wn_mp.txt, wn_s.txt and wn_g.txt. Each line in wn_s.txt contains a 9 digit ID (e.g. 100053097), an English word and its part-of-speech (i.e. noun, verb, adjective or adverb). Each line in wn_g.txt contains a 9 digit ID and the meaning of the word, which the ID refers to. Each line in wn_mp.txt contains two 9 digit IDs: ID1 and ID2. The words with ID1 are component parts (i.e. meronyms) of the words with ID2. For example, a 'wheel' is a component part of a 'car'. Note that the same English word can have more than one meaning. The same meaning can be applicable to more than one English word. Each line in the data files corresponds to one record. The 9 digit ID at the start of each record serves as a link between relevant records in the three data files. Extracts of these data files are shown in Listings 1-3. Listing 1: wn mp.txt: links a group of English words that are component parts of another group of English words 1 102670683 102958343 2 102685365 102958343 3 104563204 104561422 Listing 2: wn-s.txt: stores an English word with its part-of-speech information 1 102670683 2 102685365 accelerator noun air bag noun 3 102958343 car noun 4 102958343 automobile noun 5 104561422 water mill noun 6 104563204 waterwheel noun 7 201930738 automobile verb 8 300005205 absolute adjective 9 400003483 basically adverb (question continues on next page...) Listing 3: wn-g.txt: stores the meaning of an English word the act of departing politely 1 100053097 2 102670683 3 102685365 4 102958343 5 104561422 6 104563204 a pedal that controls the throttle valve a safety restraint in an automobile a motor vehicle with four wheels a mill powered by a water wheel a wheel that rotates by direct action of water 7 201930738 8 300005205 travel in an automobile perfect or complete or pure 9 400003483 in essence; by one's (or its) very nature a) Which TWO ADTS are the most suitable for modelling the data for this electronic English dictionary so as to support an efficient dictionary lookup? (2 marks) b) Which class of collection object defined in the Java Collections Framework (JCF) is the most suitable for modelling EACH of the ADTS you stated in part (a)? (2 marks) c) Making reference to your answers in parts (a) and (b), explain how you would use the identified types of collection objects to model the data in this electronic English dictionary, to facilitate the lookup of meronyms and their meanings of an English word. Include, in your solution, a set of partial Java classes showing how the data in the three data files (i.e. wn_mp.txt, wn_s.txt and wn_g.txt) can be modelled in order to fulfil the given requirement. Making reference to the time efficiency of each data structure used in your design, state the resulting time efficiency of the dictionary lookup operation. (11 marks)
Expert Answer:
Answer rating: 100% (QA)
ANSWER SOLUTION TextRazor Java Reference TextRazors API helps you rapidly build stateoftheart language processing technology into your application Our ... View the full answer
Related Book For
The Legal Environment of Business
ISBN: 978-0538473996
11th Edition
Authors: Roger E Meiners, Al H. Ringleb, Frances L. Edwards
Posted Date:
Students also viewed these algorithms questions
-
Two protons in an atomic nucleus are typically separated by a distance of 2 1015 m. The electric repulsion force between the protons is huge, but the attractive nuclear force is even stronger and...
-
Main Line Auto Distributor is an auto parts supplier to local garage shops. None of its customers have the space or capital to store all of the possible parts they might need so they order parts from...
-
Consider a computer system that has cache memory, main memory (RAM) and disk, and an operating system that uses virtual memory. It takes 1 nsec to access a word from the cache, 10 nsec to access a...
-
Make a Marketing Plan for business during the Covid 19 Pandemic as it is today. Position yourself as an entrepreneur looking to open a new business or expand your existing business. Use assumptions...
-
Refer to Exhibit 13.6. Required: Briefly explain the operating environment of a developing country of your choice using the framework that identifies the social, political, economic, and...
-
Pop Corporation acquired an 80 percent interest in Son Corporation on October 1, 2016, for $82,400, equal to 80 percent of the underlying equity of Son on that date plus $16,000 goodwill (total...
-
Add alphabeta pruning to your program, and see what difference (if any) it makes to the number of nodes the program has to examine when playing a game.
-
These financial statement items are for Barfield Corporation at year-end, July 31, 2014. Salaries and wages payable........... $ 2,080 Salaries and wages expense.......... 57,500 Supplies...
-
Blaze Corporation allocates overhead on the basis of DLH and the standard amount per allocation base is 2.00 DLH per unit. For March, the company planned production of 10,000 units (80% of its...
-
For this exercise, we use JTRAIN.RAW to determine the effect of the job training grant on hours of job training per employee. The basic model for the three years is hrsempit = (0 + (1td88t + (2d89, +...
-
Explain the below supply chain planning application. Provide practical example Demand Planning Production Planning Logistics Planning Inventory Deployment
-
Adjustments Debit Credit Prepaid Rent (A) 1,700 Office Supplies (B) 300 Accumulated Depreciation, Equipment (C) 375 Salaries Payable (D) 1,000 Rent Expense (A) 1,700 Office Supplies Expense (B) 300...
-
What is the self-employment tax rate for earnings above $160,200?
-
What's FIT of 4 employees that have a total gross earnings of $76486.12 , State income tax of $3747.82 and a contribution of 401(k) of $1529.72. Using the wage bracket method 2021.
-
1. What problems can arise when too much of an economy's wealth is in the hands of a few of the richest people? State as many negative effects as you can while explaining why each is a problem and...
-
1. Define mass media and explain why it is a socializing agent for children. 2. How is Obesity an issue for children's socialization? How do we address this issue as an early childhood educator? 3....
-
An employee's current annual gross wage is $63,900. Part A: Calculate how much will be needed in retirement if the employee wants to have enough saved to live off 80% of the current annual gross wage...
-
A manufacturer can sell product 1 at a profit of $20 per unit and product 2 at a profit of $40 per unit. Three units of raw material are needed to manufacture one unit of product 1, and six units of...
-
Copenhaver contracted to put pay washers and dryers in an apartment complex owned by Berryman. After Copenhaven had installed the equipment, and with four years to run on the contract, Berryman...
-
In 1993, Suffolk County, New York, found the presence of mosquito-borne disease for the first time in 75 years. Several deaths have occurred from West Nile Virus and there have been cases of malaria....
-
Your firm produces electric blenders. A certain popular model has a suggested retail price of $30. Your firm sells it wholesale for $18. Smaller stores tend to sell the blender at the suggested...
-
Using the results of Problem 2.6, determine the invariants \(U_{i}\) and \(V_{i}\) for the AS/3501 lamina, where \(i=1,2,3,4\). Problem 2.6 Find all components of the stiffness and compliance...
-
Show how the Mohr's circles in Figure 2.17 can be used to interpret the transformed lamina stiffness \(\bar{Q}_{12}\). FIGURE 2.17 40 'n Q11 In- n> Q11 20 -U-
-
Using the results of Problem 2.6 or Problem 2.16, compare the transformed lamina stiffnesses for AS/3501 carbon/epoxy plies oriented at \(+45^{\circ}\) and \(-45^{\circ}\). Problem 2.6 Using the...
Study smarter with the SolutionInn App