Skip to content

A spellchecker written for the command line, using nodejs

License

Notifications You must be signed in to change notification settings

cdonohue/spellchecker

Repository files navigation

spellchecker

A spellchecker written for the command line, using nodejs CleanShot 2024-01-10 at 21 44 30

CleanShot 2024-01-10 at 21 47 31@2x

Features

  • Checks spelling of a file based on a dictionary
  • Uses a Set to store dictionary words for fast lookup
  • Outputs a list of misspelled words, including line number and column number
  • Shows the inline context of each misspelled word
  • Outputs a list of suggested words for each misspelled word
  • Handles proper nouns and capitalized words
  • Handles hypens and apostrophes
  • Use streams to read in text files

Installation

Requires nodejs version 20.0.0 or higher

  npm install

Usage

  ./spellchecker.js <path to dictionary> <path to file to check>

Example

  ./spellchecker.js ./dictionary.txt ./test.txt

Tests

  npm test

About

A spellchecker written for the command line, using nodejs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published