Create a spell checker that uses dictionary

Assignment Help JAVA Programming
Reference no: EM132096107

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 \r\n (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

Reference no: EM132096107

Questions Cloud

Not sure how to detriment the two kings properly : Find the P(E and F).' Do I calculate using 50 or 52? Not sure how to detriment the two kings properly
Assuming poisson distribution with mean of 20 customers : Assuming poisson distribution with mean of 20 customers, find the prob that more than 10 customers enter a supermarket between 5 and 6pm
Rephrase - hollywoods blockbuster cultural colonialism : To appeal to many audiences globally in different countries, most hollywood movie storylines are now simplified to emphasize action.
What is a requirement for live migration : What hardware assistance for virtualization can be provided by modern CPU s? What is a requirement for live migration?
Create a spell checker that uses dictionary : Create a spell checker that uses dictionary that stores its words in a balanced binary tree.
Give an example of a type i and type ii error : give an example of a Type I and Type II error? What are the ramifications or impacts of those errors for the situation you described?
Describe four benefits of virtualization : Why is live migration possible in virtual environments but much less possible for a native operating system?
Identify one factor that might make this sample biased : A statistics instructor collects eye color data from her students. Identify one factor that might make this sample biased.
Explain the definition of vapnik-chervonenkis dimension : Explain Def. VC (Vapnik-Cherovonenkis) dimension / VC dimension of a linear classifier for n dimensional input space

Reviews

Write a Review

JAVA Programming Questions & Answers

  Display a list of entries in a jtextarea or jtable

Create a GUI-based program to accept name of donor, name of charity, and amount of pledge from the user. Display a list of entries in a JTextArea or JTable

  Minimum number of packages of hot dogs

Assume that hot dogs come in packages of 10, and hot dog buns come in packages of 8. Write a program called cookout.js, that calculates the number of packages of hot dogs and the number of packages of hot dog buns needed for a cookout

  Design an adt for a two-color

Design an ADT for a two-color, double-stack ADT that consists of two stacks one "red" and one "blue" and has as its operations color-coded versions of the regular stack ADT operations.

  Create suitable subclasses

Create suitable subclasses of SeatReservation called AdultReservation, ChildReservation and ElderlyReservation - Create a suitable main method inside MovieSessi

  Write a subclass evolvablecutecreature

Write a client program that creates some EvolvableCuteCreature objects and tests your methods. You should especially focus on testing

  What is the output of the code

what is the output of the code - void doJob(int x, int a);

  Write a java program to compute total tax owed by individual

Write a java program to compute total tax owed by an individual. Inputs to the program should be Name, Age, Gender (F or M), Marital Status (M, S, D, W) and tax

  What is output by the following code

What is output by the following code? Which are the results of the following code? Which of the following can fill in the blank in this code to make it compile?

  What do you consider difficult about recursion

What do you consider difficult about recursion? Do we need mindset change when approaching recursion? Are there problem types that could be better approached in a recursive way instead of an iterative way?

  Java provides three repetitions structures

Java provides three repetitions structures: while, do while and for. These statements are also known as loops. When would you use a looping statement?

  Discuss the questions related to java programming

Discuss the Questions related to JAVA programming:Create a class called Employee that includes three instance variables-a first name (type String), a last name (type String) and a monthly salary (double). Provide a constructor that initializes the ..

  Create a simple gui that looks

A label that displays how many times the button was clicked - Create a simple GUI that looks

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd