Aspell

From ArchWiki
Revision as of 08:36, 3 October 2017 by Chrissound (talk | contribs) (Mentioned addition of dictionary package)
Jump to: navigation, search

From the official website: "GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell. It can either be used as a library or as an independent spell checker."

Installation

Install the aspell dictionary for the language you require. Doing so will also pull in the aspell package as a dependency.

Usage

Many programs use aspell automatically and need no further configuration. Additionally one can use aspell manually. Here are some basic usages. See aspell(1) for more.

To spell check a single file:

$ aspell check somefile

You will then be dropped into a prompt with the file text displayed. From there you can select for aspell to make corrections to each misspelled word it detects, or you can choose to ignore its suggestions. Corrections you make will be saved to the file.

To list mispelled words from standard input:

$ cat somefile | aspell list

Dictionaries

Dictionaries are available: aspell-en for example.

Troubleshooting

All text is marked as misspelled

Ensure you have the correct dictionary installed. If installing the dictionary files does not resolve the problem, it is most likely a problem with enchant. Check for known dictionary files:

$ aspell dicts
en
en_GB
...etc

If your respective language dictionary is listed, add it to /usr/share/enchant/enchant.ordering. From the above example, it would be:

en_GB:aspell