Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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)
Step by Step Solution
★★★★★
3.55 Rating (165 Votes )
There are 3 Steps involved in it
Step: 1
ANSWER SOLUTION TextRazor Java Reference TextRazors API helps you rapidly build stateoftheart language processing technology into your application Our ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started