Kelvin Speller

Kelvin Speller

Kelvin Speller is a library that provides both out-of-the-box legal spelling correction and a framework for building custom disambiguation or spelling correction models. It is designed to be simple, powerful, and seamless to integrate into existing workflows. Kelvin Speller can be used as:

  • Correcting the spelling of words in timekeeper billing narratives
  • Correcting OCR errors in scanned documents
  • Grading the quality of OCR output
  • Disambiguating entity names like Acme Inc. and Acme, Inc.
  • Building type-ahead functionality for search or other UI components

Kelvin Speller currently ships with the following dictionary types built from high-quality, public domain sources of laws, rules, corporate filings, and litigation documents.

  • English (US, CA, UK, AU): Top 10,000 Words
  • English (US, CA, UK, AU): Top 50,000 Words
  • English (US, CA, UK, AU): Top 100,000 Words

All dictionaries are available in the following structures:

  • CSV/JSON word lists
  • Tries, Directed Acyclic Word Graphs (DAWG), and B-K Trees
  • Locally-Sensitive Hashing (LSH) Indexes

API and Library Documentation

You can learn more about Kelvin Speller by reviewing the PyDoc documentation and OpenAPI schemas provided with the library. To access the PyDoc documentation, you can run the following command:

kelvin --docs kelvin.speller

Examples