💾 Archived View for corstar.flounder.online › gemlog › 2021-05-28.gmi captured on 2023-09-08 at 16:00:54. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-11-30)

-=-=-=-=-=-=-

How to use Hunspell to spell check in the terminal

Spell checking before uploading is a clever thing to do, especially if you are like me and power through getting an idea written while making a few errors along the way. I seem to work efficiently like that.

But all those errors can't go online; I mean, they could but I like to have everything spelled correctly and hope for the best with my grammar and punctuation.

There are hundreds of tools online, but that means:

Oh, you are still focused on that word, right?

What was it again?

I'll just read this article for a bit after watching a video.

2 hours later.....

All this just to get the spelling checked....NOPE!

Enter Hunspell

In all my years using Linux, I am always learing something new. I've know about and sometimes used command line based spell-checkers, but always defaulted beck to the crappy method mentioned above.

Hunspell is a great tool and it follows the UNIX philosophy of doing one thing and doing it well.

Installing

Make sure you have two hunspell packages installed, in my case I'm using Australian English so I would install:

hunspell
hunspell-en_au

Taylor the language to your locale.

Usage

You have several options, but the two I mainly use are:

To check the spelling of a document simply use this command:


hunspell /path/to/file


To get a list of all the incorrect words, use this command;


hunspell -l /path/to/file

your
mispelled
words
will
appear
like
this

Many other options are available, best to check the man page for all of the options.

I'm regretting not using this amazing little application years ago, but never late than never.

Screenshots

screenshot-01

screenshot-02

Home