diction - print wordy and commonly misused phrases in sentences
Contents
Description
Diction finds all sentences in a document that contain phrases from a database of frequently misused, bad
or wordy diction. It further checks for double words. If no files are given, the document is read from
standard input. Each found phrase is enclosed in [] (brackets). Suggestions and advice, if any and if
asked for, are printed headed by a right arrow ->. A sentence is a sequence of words, that starts with a
capitalised word and ends with a full stop, double colon, question mark or exclaimation mark. A single
letter followed by a dot is considered an abbreviation, so it does not terminate a sentence. Various
multi-letter abbreviations are recognized, they do not terminate a sentence as well, neither do
fractional numbers.
Diction understands cpp(1) #line lines for being able to give precise locations when printing sentences.
Environment
LC_MESSAGES=de|en|nl
specifies the message language and is also used as default for the phrase language. The default
language is en.
Errors
On usage errors, 1 is returned. Termination caused by lack of memory is signalled by exit code 2.
Example
The following example first removes all roff constructs and headers from a document and feeds the result
to diction with a German database:
deroff -s file.mm | diction -L de | fmt
Files
${prefix}/share/diction/* databases for various languages
The file consists of lines, one per entry. Each line is divided by one or two tabs into two parts: Left
is the text to match and right is the suggestion. The text to match either starts with a space to match
a full word or with letters to match suffixes. If it ends with a tilde, it matches a prefix.
The suggestion may be empty to mark fill words, contain an explanation or start with an equal sign
followed by text to match for referring to the explanation of that text. The right part can consist of
an exclamation mark to mark exceptions that should not be matched.
If both parts are separated by two tabs, then this entry concerns mistakes typically made by beginners.
Empty lines or lines starting with a hash are ignored.
History
There has been a diction command on old UNIX systems, which is now part of the AT&T DWB package. The
original version was bound to roff by enforcing a call to deroff. This version is a reimplementation and
must run in a pipe with deroff(1) if you want to process roff documents. Similarly, you can run it in a
pipe with dehtml(1) or detex(1) to process HTML or TeX documents.
Name
diction - print wordy and commonly misused phrases in sentences
Options
-b, --beginner
Complain about mistakes typically made by beginners.
-d, --ignore-double-words
Ignore double words and do not complain about them.
-s, --suggest
Suggest better wording, if any.
-ffile, --filefile
Read the user specified database from the specified file in addition to the default database.
-n, --no-default-file
Do not read the default database, so only the user-specified database is used.
-Llanguage, --languagelanguage
Set the phrase file language (de, en, nl).
-h, --help
Print a short usage message.
--version
Print the version.
See Also
deroff(1), fmt(1), style(1) Cherry, L.L.; Vesterman, W.: WritingTools—TheSTYLEandDICTIONprograms, Computer Science Technical Report 91, Bell Laboratories, Murray Hill, N.J. (1981), republished as part of the 4.4BSD User's Supplementary Documents by O'Reilly. Strunk, William: Theelementsofstyle, Ithaca, N.Y.: Priv. print., 1918, http://coba.shsu.edu/help/strunk/ There is a huge and actively maintained Standard American English database at: https://mrsatterly.com/diction.html GNU September 2, 2017 DICTION(1)
Synopsis
diction [-b] [-d] [-ffile [-n|-Llanguage]] [file...]
diction [--beginner] [--ignore-double-words] [--filefile [--no-default-file|--languagelanguage]]
[file...]
diction-h|--helpdiction--version