GithubHelp home page GithubHelp logo

vmsaif / wrongspelldetector Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 397 KB

The Spell Checker is a Java project that checks for spelling mistakes in a .txt file. It uses JFileChooser to allow the user to select a dictionary and file to check, stores the dictionary words in an ArrayList for efficient searching, and compares the spelling of the words in the file to the dictionary to identify errors.

Java 100.00%
arraylist dictionary jfilechooser line-numbers spell-checker spelling-mistakes

wrongspelldetector's Introduction

Spell Checker

Hits

This Java project implements a spell checker that prompts the user to add a dictionary file in .txt format, and then prompts for a file to be checked for spelling mistakes in .txt format. It tells in which line the error occurred, and if multiple errors are found, it writes the line numbers.

Features

  • Uses JFileChooser to allow the user to select the dictionary and file to be checked.
  • Stores the dictionary words in an ArrayList for efficient searching.
  • Implements logic to cross-check the spelling of the words in the file against the dictionary.

How to Run

Compile.

From the root directory of the repository, from terminal

javac src\*.java

Run the SpellChecker class.

java -cp src\ CHECKER

In the project directory, there is a sample dictionary file words.txt and a sample document with spelling mistakes GeorgeEliot_SilasMarner.txt Follow the prompts in the user interface to select (in order)

  1. dictionary file in .txt format
  2. the file to be checked in .txt format

What I Have Learned

  • How to use JFileChooser to allow the user to select files.
  • How to store data in an ArrayList and perform searches efficiently.
  • How to implement logic to cross-check the spelling of words against a dictionary.

Dependencies

Java 8 or later

wrongspelldetector's People

Contributors

vmsaif avatar

Stargazers

 avatar  avatar

Watchers

 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.