A Python script to check a given text for grammer mistakes by using online AI tools.
This script has written for educational purpuoses only. It utilizes duck.ai under the hood, which doesn't violate the ToS. Still, this might change in the future. Use at your own risk.
- You need to install Python3.12
- Create a directory:
mkdir gramcheck
- Create a Python venv inside:
cd gramcheck && python -m venv .venv && source .venv/bin/activate
- Install duck_chat
- Run:
chmod +x gc
- Create a symbolic link:
ln -s -T /path/to/gramcheck/gc /path/to/link/gc
- Run:
./gc [FILE]
to grammer check a file where each line corresponds to a text, or./gc -t [TEXT]
to grammer check a text. - For more information, run:
./gc --help
If running gc
crashes with the error ERR_CHALLENGE
, you may need to do a small modification to
duck_chat source code, as this modification hasn't merged yet.
- Navigate to the duck_chat source code with
cd .venv/lib/python3.12/site-packages/duck_chat
- Open
api.py
with your favourite editor, likevim api.py
- At the line
29
, there is aheaders
dictionary. Insert"x-vqd-4": ""
inside it. - Save the file. Now the script should work.