Question: Requirements DONT USE VECTORS OR MAPPING MAKE SIMPLE STRUCTRAL LOGIC USE OBJECT ORIENTED APROACH ASSOCATION AND COMPOSITION Create a class Dictionary that contains

Requirements  

DONT USE VECTORS OR MAPPING

MAKE SIMPLE STRUCTRAL LOGIC

USE OBJECT ORIENTED APROACH ASSOCATION AND COMPOSITION

  

Create a class Dictionary that contains a list of words represented by class Word. 

CREAT A CLASS WORD

2. A Word has a text (of type String) and a list of synonyms, where each synonym is also represented as a (pointer to) Word.

Dictionary shall load its list of words from a file that contains a list of words and synonyms, where each synonym is separated by a single white space character,

as in the following example:

 

abandon discontinue vacate

 

absent missing unavailable

 

cable wire

 

calculate compute determine measure

 

safety security refuge

 

C) Create a class Paraphraser that:

 

1. takes a text as input from the user and tokenize it into words.

 

2. For each word, look it up in the Dictionary and replace it with a corresponding synonym (selected randomly in case of multiple options)

 

3. Produce the output as paraphrased text

 

note:

 

You are supposed to make three classes

 

i.e DICTIONARY

 

WORD

 

PARAPHRASES


Step by Step Solution

3.45 Rating (161 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres a simple implementation of the three classes Dictionary Word and Paraphraser in Python using o... View full answer

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 Accounting Questions!