The spellcheck Reference Manual

This is the spellcheck Reference Manual, version 0.0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:46:14 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 spellcheck

Peter Norvig’s spell corrector.

Author

Mikael Jansson <>

Version

0.0.1

Dependencies
  • alexandria (system).
  • cl-ppcre (system).
Source

spellcheck.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 spellcheck/spellcheck.asd

Source

spellcheck.asd.

Parent Component

spellcheck (system).

ASDF Systems

spellcheck.


3.1.2 spellcheck/package.lisp

Source

spellcheck.asd.

Parent Component

spellcheck (system).

Packages

spellcheck.


3.1.3 spellcheck/spellcheck.lisp

Dependency

package.lisp (file).

Source

spellcheck.asd.

Parent Component

spellcheck (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 spellcheck

Source

package.lisp.

Use List
  • alexandria.
  • common-lisp.
Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Special variables

Special Variable: *freq*
Package

spellcheck.

Source

spellcheck.lisp.


5.1.2 Ordinary functions

Function: correct (word &key frequency)

Returns the most likely spelling correction of word, or word itself.

Package

spellcheck.

Source

spellcheck.lisp.

Function: initialize ()

Initialize with default settings.

Package

spellcheck.

Source

spellcheck.lisp.

Function: reset ()

Resets the default frequency distribution to empty.

Package

spellcheck.

Source

spellcheck.lisp.

Function: train (words &key frequency)

Adds the given list of words to the frequency distribution.

Package

spellcheck.

Source

spellcheck.lisp.

Function: train-with-file (&optional filename &key frequency)

Adds the list of words from the given file to the frequency distribution.

Package

spellcheck.

Source

spellcheck.lisp.

Function: words (string)

Tokenizes string into a list of words.

Package

spellcheck.

Source

spellcheck.lisp.


5.2 Internals


5.2.1 Special variables

Special Variable: *alphabet*
Package

spellcheck.

Source

spellcheck.lisp.


5.2.2 Ordinary functions

Function: edits-1 (word)

Returns a list of one character edits of word.

Package

spellcheck.

Source

spellcheck.lisp.

Function: known (words &key frequency)

Looks up the list of words to see if they are known.

Package

spellcheck.

Source

spellcheck.lisp.

Function: known-edits-2 (word &key frequency)

Returns the list of two character edits of word.

Package

spellcheck.

Source

spellcheck.lisp.

Function: known-word-p (word &key frequency)

Returns true if word is known.

Package

spellcheck.

Source

spellcheck.lisp.


Appendix A Indexes


A.1 Concepts