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.1.20.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.1.20-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: grammarian-0.1.20.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.1.20.tar.gz
Algorithm Hash digest
SHA256 61d0bc8e77599ee36af9b71da5b798bd2fc53872f5ef04ea4449d2071c383636
MD5 07f53f47faa4db7acab99bf7d54f463f
BLAKE2b-256 15261b4ba88a3e21a26a8abecfe14679e367639da47cec8b4f69d267bbe9ac89

See more details on using hashes here.

File details

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

File metadata

  • Download URL: grammarian-0.1.20-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.1.20-py3-none-any.whl
Algorithm Hash digest
SHA256 456bf39fe6e564b8d157cb09a7a58a1e0684c81289f96c62aa8d99bd4f815ae6
MD5 f736ce5f1718283390f7a937e338fb51
BLAKE2b-256 f74c3d227bc46022735525313f6085a81e170c81f94cfd22e5cabc5554836e9d

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