LinuxCommandLibrary

enchant

Spell check and correct text

SYNOPSIS

enchant [options] [file(s) or word(s)]

PARAMETERS

-a
    Add words to the personal word list interactively.

-d
    Use the specified dictionary.

-l
    List available dictionaries.

-p
    Prompt for replacements of misspelled words.

-r
    Replace misspelled words based on suggestions.

-w
    Treat the input as a single word.

-v
    Verbose mode. Show more information.

--version
    Show version information and exit.

--help
    Show help message and exit.

DESCRIPTION

The enchant command is a command-line interface to the Enchant spellchecking library.
It enables you to spellcheck individual words or entire files directly from the terminal. Enchant supports a variety of dictionaries and languages, making it a versatile tool for text editing and document preparation.
With enchant, you can check for misspelled words, suggest corrections, add words to personal dictionaries, and retrieve information about the dictionaries available on your system.
The command primarily interacts with Enchant's spellchecking backend and provides a convenient way to utilize its features in scripts and command-line workflows.
While enchant is powerful, it relies on properly configured dictionary resources to function effectively. Configuration files, typically located in /etc/enchant or $HOME/.config/enchant, define the dictionary providers, language settings, and search paths used by Enchant.

CAVEATS

Enchant relies on properly installed and configured dictionary files.
Incorrect dictionary configuration can lead to inaccurate spellchecking.
The exact behavior of options may vary slightly depending on the version of Enchant installed.

EXAMPLE USAGE

To check a single word: enchant hello.
To spellcheck a file: enchant my_document.txt.
To check a file with replacement enchant -p my_document.txt

DICTIONARY CONFIGURATION

Enchant uses configuration files to determine which dictionaries to use.
These files are typically located in /etc/enchant or $HOME/.config/enchant.
You can customize these files to add or remove dictionaries, or to change the default language.

SEE ALSO

aspell(1), ispell(1)

Copied to clipboard