Google Spell Checker
Project description
Google Spell Checker
It is a simple multilingual Spell Checker using Google Text Completion.
Installation
pip install google-spell-checker
Usage
GoogleSpellChecker.is_correct(word) returns a tuple, the first variable is the correctness of the text, the second variable is the most possible correct word (or None if it is a correct word).
from google_spell_checker import GoogleSpellChecker
spell_checker = GoogleSpellChecker()
print(spell_checker.check("developmnet"))
# (False, 'development')
print(spell_checker.check("martialartz"))
# (False, 'martial arts')
print(spell_checker.check("amoxicillin-clavulanic"))
# (True, None)
Different Language Code
The GoogleSpellChecker uses the default language code "en-EN", but you can change it by passing the parameter lang to GoogleSpellChecker() as follow:
# For example, we use lang="id" for Indonesian
spell_checker = GoogleSpellChecker(lang="id")
print(spell_checker.check("sayalaparsekali, say ingn makn dirumha"))
# (False, 'saya lapar sekali, saya ingin makan di rumah')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for google_spell_checker-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 828417606b06365fc70f1c4ea8859493c24280fbba4967edd40d67104f508a2b |
|
MD5 | d88751d8213f4f5f3d37c68b430fba88 |
|
BLAKE2b-256 | cac5f98e0da2818f8de455f2e45cbf860024f6560ca66be00a5646e174abeff1 |
Close
Hashes for google_spell_checker-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 524c8bd8ce28ee757d8a57a233f6da0aa65b864c7be2414bfd1879ae1c29d28d |
|
MD5 | c581d4281b942cdb74e225962baacae9 |
|
BLAKE2b-256 | 9c244e8506c62c3d1afcdb7b261e21adedf007299c8b193659acd6afc6a40779 |