Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

google_spell_checker-0.2.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

google_spell_checker-0.2.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

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

Hashes for google_spell_checker-0.2.1.tar.gz
Algorithm Hash digest
SHA256 82b77ec733e98275269e96e876dc48eaa80bf43d468ddc7be568f57cd2fa0854
MD5 10a73d87ff72a145912531e1e91d1e80
BLAKE2b-256 81a926a1c3e16dc949ada673c17795ec881791c130afc09bb052c9b5990e6293

See more details on using hashes here.

File details

Details for the file google_spell_checker-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for google_spell_checker-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4f7dd0b7f8a69fbe72e96dcb624092f94bbf0526430d7520ad741ce390f08dbb
MD5 bd283609d8ff55eff1f0c644a04b78a0
BLAKE2b-256 74624414d346a6a0c9121a86b4b66f58b78eb249c5030e463c4bb40351599bd7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page