Question
***** PLEASE HELP******* I have to submit this by today and has to pass the test too, Here is the link to required files. I
***** PLEASE HELP*******
I have to submit this by today and has to pass the test too, Here is the link to required files. I will really appreciate for help.
https://drive.google.com/open?id=0B2gb5h869g2aaVNYMjAzeDRMRjQ
Create a spell checker that uses dictionary that stores its words in a balanced binary tree.
Tasks and Requirements
NOTE: Naming is critical in the tasks and requirements described below. If the names don't match those described below exactly, your project will not be graded.
Create a copy of the Java SE Project Template. The project name must follow this pattern: {FLname}_SpellChecker_{TERM}, where {FLname} is replaced by the first letter of your first name plus your last name, and {TERM} is the current semester and year. E.g. if your name is Maria Marciano and it's Fall 2014, your project name must be MMarciano_SpellChecker_F14.
Create a package named spellchecker in your project.
BinaryTreeNode class:
Download BinaryTreeNode.java, and put it in the spellchecker package.
Your BinaryTree class must use BinaryTreeNode to store its words.
Do not modify BinaryTreeNode.java.
BasicDictionary class:
Download the Dictionary.java interface and put it in the spellchecker package.
Read the comments above each method to understand what they are supposed to do.
Create a new class named BasicDictionary in the spellchecker package. In the class creation wizard, click the Add (interface) button, and search for Dictionary. Check the "Inherited abstract methods" box. Click Finish. Eclipse will create the class and automatically add method stubs that meet the Dictionary interface.
You do not modify the Dictionary interface. You add your code to the BasicDictionary class.
BasicDictionary must use a binary tree to store the words in the dictionary. BasicDictionary can hold the root of the binary tree, but a stronger design would use a separate BinaryTree class.
You must write your own binary tree code.
BasicSpellChecker class:
Download the SpellChecker.java interface and put it in the spellchecker package.
Read the comments above each method to understand what they are supposed to do.
In BasicSpellChecker, modify the public class BasicSpellChecker to include implements SpellChecker.
You can use Eclipse's QuickFix support to add the required methods to BasicSpellChecker.
You do not modify the SpellChecker interface. You add your spell-checking code to BasicSpellChecker's methods.
Add the unit testing classes. These classes will be used to test the code that you write.
Create a new package in the src folder called sbccunittest. To be clear: sbccunittest should be a child of the src folder, not of the spellchecker package.
Download SpellCheckerTester.java into sbccunittest.
Download test_files.zip into your project root and unzip them into your project's root folder.
Spell-checking notes
Be sure to read the SpellChecker.spellCheck() documentation carefully. It specifies the regular expression that you must use for iterating through words in the document.
It also describes an instance variable of BasicSpellChecker that you need to create and update - the current spell checking index.
Also be sure to read the SpellChecker.replaceText() documentation carefully. It describes how the spell checking index is to be adjusted when replaceText() is called.
Note that the test documents are Windows files, which means that each line ends with (i.e. two characters).
Ignore case when comparing words.
Unit Testing
Debug all java compilation Errors (see the Problems view). The unit tests can't be run until these errors are fixed.
In the Package Explorer, right-click on the sbccunittest package | Run As... | JUnit Test.
Initially, all of the tests will probably fail. However, as you add functionality to the BasicDictionary class, tests will begin to pass.
Work on BasicDictionary first. Continue adding functionality to the BasicDictionary until all of the dictionary tests (see Scoring section below) pass. Then start working on BasicSpellChecker and its associated tests.
There is no user interface requirement for this assignment. However, you might find it interesting to build a simple console interface that allows the user to specify a dictionary and a text document to spell check. When an unknown word is found, give the user options to ignore the word, change it themselves, replace it with the preceeding/succeeding word, or end the spell checking. When spell checking is completed, overwrite the original text document with the spell-checked version.
*** When importing the dictionary, build a complete tree
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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