Skip to content

pharo-ai/spelling-correction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spelling Correction

Build status Coverage Status License

A spelling correction algorithm that can identify and fix spelling mistakes.

How to install it?

To install spelling-correction, go to the Playground (Ctrl+OW) in your Pharo image and execute the following Metacello script (select it and press Do-it button or Ctrl+D):

Metacello new
  baseline: 'AISpellingCorrection';
  repository: 'github://pharo-ai/spelling-correction/src';
  load.

How to depend on it?

If you want to add a dependency on spelling-correction to your project, include the following lines into your baseline method:

spec
  baseline: 'AISpellingCorrection'
  with: [ spec repository: 'github://pharo-ai/spelling-correction/src' ].

If you are new to baselines and Metacello, check out the Baselines tutorial on Pharo Wiki.

How to use it?

corrector := AISpellingCorrector new.
languageFile := 'pharo-local/iceberg/pharo-ai/spelling-correction/data/english.json' asFileReference.
corrector loadLanguageModelFrom: languageFile.
corrector isKnownWord: 'something'. "true"
corrector isKnownWord: 'somthing'. "false"
corrector correctionsFor: 'somthing'. "an OrderedCollection('something' 'soothing')"

About

A spelling correction algorithm that can identify and fix spelling mistakes

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •