Skip to content

Python wrapper around the DivvunSpell spell checking library.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

divvun/divvunspell-sdk-python

Repository files navigation

DivvunSpell SDK for Python

PyPI

Installation

From PyPI

pip install divvunspell

From source

  • Install Rust from https://rustup.rs/.
  • Run pip install . or the equivalent for your environment

Quick start

Import the library, then get the Speller instance via the SpellerArchive:

import divvunspell


# Load a speller archive
archive = divvunspell.SpellerArchive("path/to/my/speller-archive.zhfst")
# Get the speller
speller = archive.speller()

# Use the speller:
ranked_suggestions = speller.suggest("thier")
# Smaller numbers mean a smaller weight, which means it's a more likely correction
print(ranked_suggestions)
# [('their', 1.00), ('shier', 4.5), ('tier', 4.75), ('theif', 4.8), ('Thieu', 11.3)]

License

All code in this repository is licensed under either of

About

Python wrapper around the DivvunSpell spell checking library.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •