DOKK / manpages / debian 12 / mwic / mwic.1.en
MWIC(1) MWIC(1)

mwic - Misspelled Words In Context

mwic [-l lang] [option...] [file...]

mwic is a spell-checker that groups possible misspellings and shows them in their contexts. This is useful for checking technical documents, which often contain words that are not included in standard dictionaries.

Spell-check for this language. The default is en.
Print list of available languages.
Treat words from the external dictionary as misspelled. The dictionary can be in the format used by Lintian, or in the format used by codespell, or in the format used by kde-spellcheck (part of kde-dev-scripts); or it can be plain newline-separated word list. This option can be used multiple times.
Split camel-cased compound words. For example, treat “eggBaconAndSpam” as 4 separate words.
Assume this input encoding. The default is UTF-8:replace (UTF-8 encoding with error handler replacing malformed characters with U+FFFD).
If fmt is plain, output plain text verbatim and highlight misspellings with the ^ character. This is the default if stdout is not a terminal.

If fmt is color, escape control characters and highlight misspellings with colors. This is the default if stdout is a terminal.

Print words in reverse order, that is, the most common words first.
Omit blank lines in output.
Assume that words that occurred more than n times are spelled correctly.
Limit context width to n characters. The default is 30.
Suggest up to n corrections.
Show help message and exit.
Show version information and exit.

If stdout is a terminal, mwic pipes the output through $PAGER. The default is pager (if it exists) or more.
If this variable is unset, mwic sets it to FX, or to FXR if the output is in color.
If this variable in unset, and the output is in color, mwic sets this variable to -c.

Spell-checking can be eased by using dictionaries of commonly misspelled words. mwic doesn't ship with one, but it can use a number of dictionaries from third-party projects:

  • Lintian:
    https://salsa.debian.org/lintian/lintian/raw/master/data/spelling/corrections
    https://salsa.debian.org/lintian/lintian/raw/master/data/spelling/corrections-case

  • Linux kernel:
    https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/scripts/spelling.txt

  • codespell:
    https://github.com/codespell-project/codespell/raw/master/codespell_lib/data/dictionary.txt

  • kde-dev-scripts:
    https://github.com/KDE/kde-dev-scripts/raw/master/kde-spellcheck.pl


$ mwic --blacklist /usr/share/lintian/data/spelling/corrections --compact rfc1927.txt
heirarchical:
| …g paper clips vs small ones; heirarchical assembly

^^^^^^^^^^^^ multipart: | …tes the degree of binding of multipart documents:
^^^^^^^^^ reycled: | 1) staples could be reycled for a small credit
^^^^^^^


...

EMail, edu, isi:
| EMail: rogers@isi.edu

^^^^^ ^^^ ^^^ electonic: | drawer of the electonic desk on home PCs | 3) electonic staples should have a standa…
^^^^^^^^^


spellintian(1), codespell(1);

“English for software localisation” <http://jbr.me.uk/linux/esl.html> by Justin B Rye

2018-11-14 mwic 0.7.8