Skip to content

Latest commit

 

History

History
38 lines (22 loc) · 872 Bytes

README.md

File metadata and controls

38 lines (22 loc) · 872 Bytes

Levenshtein Spelling Suggester

Spelling suggester implementation that uses word closeness comparison and word frequencies to suggest fixes to misspelled words.

Input:

  • frequent_words.csv - Contains list of common words and thier frequencies
  • misspelled.csv - Contains list of misspelled words

Output:

  • suggestions.txt - Spelling suggestions in the format: * <misspelled query>: <array of suggestions>

    Example: * basicly: ["basil","basic","easily","basically"]

Run

  • Uses NPM

var file = require('./spellingSuggestor.js'); file.spellingSuggestor.init();

Tests

Requires the following modules:

  • 'mocha'
  • 'chai'
  • 'fs'

Then run mocha.

Attributions