Skip to main content

An easy and fast tool to check english grammar

Project description

Grammarian

Grammarian is a Python package that allows you to easily check the correctness of English words, and also suggests "what the author (potentially) meant" if the word is not correct.

Authors

Deployment

To deploy this package, you just need to run following commnd in your terminal:

pip install grammarian

Usage/Examples

To import grammarian package run

from grammarian import Grammarian

Grammarian is a python class. You run

g = Grammarian()

to create an instance of it. Constructor is meant to be empty. To check grammar of any english word run:

g.check_grammar("apple")

check_grammar returns an GrammarianCheck class instance. If the word you have given is correct, GrammarianCheck.is_correct will be True, and GrammarianCheck.suggestions will be None. If the word is incorrect, GrammarianCheck.is_correct will be False, and GrammarianCheck.suggestions will be a list of 5 suggested words (in str). Run:

str(g.check_grammar("appleq"))

to return a str in format of:

return ' '.join(self.suggestions)

to acces all of the words on their own run:

g.check_grammar("appleq")[i]

where 'i' variable is by deafault between 0-5. For "appleq" it returns:

apple appled apples apelet apoplex 

as mentioned, i is "by deafult" no higher than 5. Since grammarian 0.1.20 you can set the number of returned elements. If you set the size variable to zero or less, code will just return if its correct.

g.check_grammar("appleq", 10)

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

grammarian-0.2.1.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

grammarian-0.2.1-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file grammarian-0.2.1.tar.gz.

File metadata

  • Download URL: grammarian-0.2.1.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for grammarian-0.2.1.tar.gz
Algorithm Hash digest
SHA256 2e50d9c2aa9aab2a0d9206b32435cd32cf4ebba8ba57a24c4e3c51e9789e6041
MD5 dd4947e62b5040df396c7882d5e26d32
BLAKE2b-256 1b73c1449a05ff81932cfad8ba75f5c592904a15485d633712bb7f7f21642e6e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: grammarian-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for grammarian-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cbca001154960d5e697ec872d247f82ec4554567f24404f2a6de50f6168d1494
MD5 6a91df71b51708c2f88e0b13aa7bf00a
BLAKE2b-256 f60d042c5dadaeb72f7a0b8e5ff1d9cc836d3c38eae3cd7c53b63b181ab229a7

See more details on using hashes here.

Supported by

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