diction man page
diction — print wordy and commonly misused phrases in sentences
diction [-b] [-d] [-f file [-n|-L language]] [file...]
diction [--beginner] [--ignore-double-words] [--file file [--no-default-file|--language language]] [file...]
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.
- -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.
- -f file, --file file
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.
- -L language, --language language
Set the phrase file language (de, en, nl).
- -h, --help
Print a short usage message.
Print the version.
On usage errors, 1 is returned. Termination caused by lack of memory is signalled by exit code 2.
The following example first removes all roff constructs and headers from a document and feeds the result to diction with a German database:
specifies the message language and is also used as default for the phrase language. The default language is en.
/usr/share/diction/* databases for various languages
This program is GNU software, copyright 1997–2007 Michael Haardt <email@example.com>.
The english phrase file contains contributions by Greg Lindahl <firstname.lastname@example.org>, Wil Baden, Gary D. Kline, Kimberly Hanks and Beth Morris. The dutch phrase file was contributed by Hans Lodder.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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.
deroff(1), fmt(1), style(1)
Cherry, L.L.; Vesterman, W.: Writing Tools—The STYLE and DICTION programs, 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: The elements of style, Ithaca, N.Y.: Priv. print., 1918, http://coba.shsu.edu/help/strunk/