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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file grammarian-0.1.21.tar.gz.
File metadata
- Download URL: grammarian-0.1.21.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
774b1082133cfd36381b593eb41aa572447fed004bdbe812b33e7a3c447208d1
|
|
| MD5 |
dc91a969e6d408d06b8296fbaf64fc53
|
|
| BLAKE2b-256 |
44d982f3951ed9781953771180dd66fd90e9fa2253b716c6824db1867350634f
|
File details
Details for the file grammarian-0.1.21-py3-none-any.whl.
File metadata
- Download URL: grammarian-0.1.21-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd5520f0b3d5fbc4a435072b5d7dcd20e95c2ce5b059dede713cd78dc2934545
|
|
| MD5 |
9ec9f208d584a588afc252197f707661
|
|
| BLAKE2b-256 |
8cf474c3954ab3e584b7ea559bfd51e624600b0e70ac4586c8af008e799124d8
|