Skip to content

Latest commit

 

History

History
37 lines (30 loc) · 1.05 KB

README.md

File metadata and controls

37 lines (30 loc) · 1.05 KB

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