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.check(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
File details
Details for the file google_spell_checker-0.2.1.tar.gz
.
File metadata
- Download URL: google_spell_checker-0.2.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82b77ec733e98275269e96e876dc48eaa80bf43d468ddc7be568f57cd2fa0854 |
|
MD5 | 10a73d87ff72a145912531e1e91d1e80 |
|
BLAKE2b-256 | 81a926a1c3e16dc949ada673c17795ec881791c130afc09bb052c9b5990e6293 |
File details
Details for the file google_spell_checker-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: google_spell_checker-0.2.1-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f7dd0b7f8a69fbe72e96dcb624092f94bbf0526430d7520ad741ce390f08dbb |
|
MD5 | bd283609d8ff55eff1f0c644a04b78a0 |
|
BLAKE2b-256 | 74624414d346a6a0c9121a86b4b66f58b78eb249c5030e463c4bb40351599bd7 |