Google Spell Checker
Project description
Google Spell Checker
It is a simple multilingual Spell Checker using Google Text Completion.
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.is_correct("developmnet"))
# (False, 'development')
print(spell_checker.is_correct("martialartz"))
# (False, 'martial arts')
print(spell_checker.is_correct("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.is_correct("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.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e19fd829aecfd857905efb54ea99dcdad5bb7c333ee20d447f4aab924e31244 |
|
MD5 | 7ee3e6927508a963a124faf8ff706128 |
|
BLAKE2b-256 | 668ebacc013c73543b42d6e50b963856f74f40c9184266b08c11f568c4197d3b |
Close
Hashes for google_spell_checker-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc6b9f7aefd184eff6e461466763bdcd5332a92bd906077db7884637178745da |
|
MD5 | 5d05950afa03949712002aa232852bb4 |
|
BLAKE2b-256 | 0cfdad512e5baf40648a29e6d7367531b8a8c7f277129e18b4141bf65c236d81 |