Metadata-Version: 2.4
Name: grammarian
Version: 0.2.1
Summary: An easy and fast tool to check english grammar
Home-page: https://github.com/hiko667/grammarian-grammar-checker-package
Author: StanisławKulesza
License: MIT
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Requires-Python: >=3.13
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Provides-Extra: dev
Requires-Dist: twine>=6.2.0; extra == "dev"
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-python
Dynamic: summary


# 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

- [@hiko667](https://github.com/hiko667)


## Deployment

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

```bash
pip install grammarian

```


## Usage/Examples

To import grammarian package run
```python
from grammarian import Grammarian

```

Grammarian is a python class. You run 

```python
g = Grammarian()

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

```python
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:
```python
str(g.check_grammar("appleq"))

```
to return a str in format of:
```python
return ' '.join(self.suggestions)
```
to acces all of the words on their own run:
```python
g.check_grammar("appleq")[i]
```
where 'i' variable is by deafault between 0-5. For "appleq" it returns:
```bash
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.
```python
g.check_grammar("appleq", 10)
```
