https://github.com/pharo-ai/spelling-correction
A spelling correction algorithm that can identify and fix spelling mistakes
https://github.com/pharo-ai/spelling-correction
natural-language-processing pharo spelling spelling-correction
Last synced: 3 days ago
JSON representation
A spelling correction algorithm that can identify and fix spelling mistakes
- Host: GitHub
- URL: https://github.com/pharo-ai/spelling-correction
- Owner: pharo-ai
- License: mit
- Created: 2021-04-08T12:16:47.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-09-29T11:53:05.000Z (11 days ago)
- Last Synced: 2025-09-29T13:30:07.978Z (11 days ago)
- Topics: natural-language-processing, pharo, spelling, spelling-correction
- Language: Smalltalk
- Homepage:
- Size: 183 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Spelling Correction
[](https://github.com/pharo-ai/spelling-correction/actions/workflows/test.yml)
[](https://coveralls.io/github/pharo-ai/spelling-correction?branch=master)
[](https://raw.githubusercontent.com/pharo-ai/spelling-correction/master/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](https://pharo.org/) image and execute the following Metacello script (select it and press Do-it button or Ctrl+D):
```Smalltalk
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:
```Smalltalk
spec
baseline: 'AISpellingCorrection'
with: [ spec repository: 'github://pharo-ai/spelling-correction/src' ].
```If you are new to baselines and Metacello, check out the [Baselines](https://github.com/pharo-open-documentation/pharo-wiki/blob/master/General/Baselines.md) tutorial on Pharo Wiki.
## How to use it?
```Smalltalk
corrector := AISpellingCorrector new.
```
```Smalltalk
languageFile := 'pharo-local/iceberg/pharo-ai/spelling-correction/data/english.json' asFileReference.
corrector loadLanguageModelFrom: languageFile.
```
```Smalltalk
corrector isKnownWord: 'something'. "true"
corrector isKnownWord: 'somthing'. "false"
```
```Smalltalk
corrector correctionsFor: 'somthing'. "an OrderedCollection('something' 'soothing')"
```