Question: 1) Reader: The system will accept a list of sentences in the form of a .txt file, or from the console. 2) Shifter: Given a

1) Reader: The system will accept a list of sentences in the form of a .txt file, or from the console. 2) Shifter: Given a set of sentences, the system will circularly shift and output all lines by repeatedly removing the first word and appending it at the end of the line, in the form of a .txt file, or from the console. 3) Sorter: Given a set of sentences, the system will then output all lines in alphabetical order, in the form of a new .txt file, or to the console. 4) StopwordRemover: Given a set of sentences, the system will filter out stop words within them, and output the filtered, unique, sentences in the form of a .txt file, or from the console. The stop words are defined within a configuration file. 5) Writer: Given a set of sentences, the system will output them in the form of a .txt file, or from the console. 6) Searcher: Given a keyword and a set of input sentences, the system will output the sentences with the keyword, and the keyword is highlighted. Each of these components should be an independent class/component, and the user can run them in any order. The system should support the following user scenarios by running these components in a proper order. QuickSearch: Given a set of sentences, the user can search if a keyword can be found. That is, the user enters a keyword, the system will return all the sentences containing the keyword both in the original sentences, and in the circular shifted sentences in alphabetic order in the console, and the keyword will be highlighted. If the keyword is not contained in any sentences previously entered, the system will return ``[keyword] not found.

All the functional modules, Reader, Shifter, Sorter, Filter, Writer, and Searcher should all be implemented as subclasses of Filter. The Filter, Pipe, Pipeline, and Controller classes are provided and do not need to be changed.

1) Reader: The system will accept a list of sentences in theform of a .txt file, or from the console. 2) Shifter: Givena set of sentences, the system will circularly shift and output alllines by repeatedly removing the first word and appending it at the

public class Controller \{ public static void main(String[] args) // At least two filters are needed (new Pipeline( new Input(), new CircularShifter(), new NoiseWordRemoval(), new Alphabetizer(), new Output() )).run()

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!