Skip to content

aliziyacevik/typo-fixer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IMPORTANT

There are still bugs and sometimes the words are not corrected the way we want it. Latter is due to engine choice. Default engine for type-fixer is textblob which is not the strongest one out there. Please feel free to contribute.

Typo Fixer

Typo Fixer is a command-line tool that corrects typos in text files and directories. It supports various options such as recursive correction, file extension filters, and automatic saving of changes.

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/typo-fixer.git
cd typo-fixer
  1. Create a virtual environment and activate it:
  • For Windows:
python -m venv venv
venv\Scripts\activate
  • For Unix-based systems:
python3 -m venv venv
source venv/bin/activate
  1. Install the required packages
pip3 install -r requirements.txt
  1. Make it runnable
chmod +x typo_fixer.py

Usage

Here are some examples of how to use Typo Fixer:

  • Fix typos in a single file:
./typo_fixer.py --file input.txt
  • Fix typos in all files in a directory (non-recursive):
./typo_fixer.py --dir path/to/directory
  • Fix typos in all files in a directory and its subdirectories (recursive):
./typo_fixer.py --dir path/to/directory -rec
  • Fix typos only in files with a specific extension in a directory (non-recursive):
./typo_fixer.py --dir path/to/directory --endsw .extension
  • Fix typos only in files with a specific extension in a directory and its subdirectories (recursive):
./typo_fixer.py --dir path/to/directory -rec --endsw .extension
  • Automatically save changes without asking for confirmation:
./typo_fixer.py --file input.txt -force
  • Choose a different typo correction engine:
./typo_fixer.py --file input.txt --engine textblob
  • Export typo report in JSON or CSV format:
./typo_fixer.py --file input.txt --export report.json
./typo_fixer.py --file input.txt --export report.csv

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue on GitHub.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages