Giter Club home page Giter Club logo

spellchecker's Introduction

SpellChecker

This program compares the spelling of each word of a input file with a list of words from the a English dictionary. If the word is not present in the dictionary, the word is assumed to be spelled incorrectly and then the program offers the user:

  1. a choice of words he/she can use instead of the misspelled word based on a similarity metric
  2. the ability to accept the misspelling
  3. the ability to type a new word to be used instead of the misspelled word.

Any choice that the users elects, will be printed to the output file. If the word is located in the dictionary, then the word is automatically printed to the output file.

The design that I chose was to ask the user for the input file from the start and then instantiate an Interface object that scans the input file. The most important program is the Interface.runProgram() method that collects all the helper methods in a series of executions until the file is fully checked. Whenever, I needed to repeat a task, such as printing to the output file or making a word an array of distinct characters, I created a helper method that would execute that task. The runProgram() method acts as a skeleton that calls different functions based on the words it scans.

If I were to make one suggestion on how to improve this program, I would say that the user should be prompted in the beginning of the programto choose parameters for the getWordSuggestions() method. This would personalize the program to the user's tastes. I would implement this by making a scanner class within the getWordSuggestions() method that asks the user how many correctly spelled suggestions they would want and of what length, and similarity metric.

This project was a great exercise in file i/o and I also learned how to implement the selection sort algorithm from scratch.

spellchecker's People

Contributors

jbotwina avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.